obsidian-wikilinks-converter
БесплатноЗапускает вложенные скриптыНе проверенConvert Obsidian WikiLinks ([[...]]) to standard Markdown links ([...](...)) for GitHub compatibility. This skill should be used when users need to make…
от hacket★ 39 звёзд на GitHubОб этом скилле
Obsidian WikiLinks Converter
This skill provides tools and workflows for converting Obsidian WikiLinks (...) to standard Markdown links ([...](...)) to ensure GitHub compatibility.
When to Use This Skill
Use this skill when you need to:
- 📄 Make README.md files GitHub-compatible
- 🔗 Convert WikiLinks to standard Markdown in batch
- 🔄 Maintain dual compatibility (Obsidian + GitHub)
- 📝 Prepare Obsidian notes for publishing to platforms that don't support WikiLinks
Core Concepts
WikiLink Formats
Obsidian supports several WikiLink patterns:
| WikiLink Format | Standard Markdown | Notes |
|---|---|---|
file |
[file](file.md) |
Simple file reference |
path/file |
[file](path/file.md) |
With path |
file|Display |
[Display](file.md) |
Custom display text |
../path/file |
[file](../path/file.md) |
Relative path |
Conversion Rules
Display Text Priority:
- If
|separator exists: use specified display text - Otherwise: use filename (without path and extension)
- If
Path Handling:
- Preserve relative paths (
../,./) - Add
.mdextension if missing - URL-encode spaces:
My File.md→My%20File.md
- Preserve relative paths (
Special Cases:
README→[README](README.md)folder/README→[README](folder/README.md)
Usage
Quick Start
# Preview changes without modifying files
python3 .claude/skills/obsidian-wikilinks-converter/scripts/convert.py --dry-run
# Convert all README.md files in current directory
python3 .claude/skills/obsidian-wikilinks-converter/scripts/convert.py
# Convert a specific file
python3 .claude/skills/obsidian-wikilinks-converter/scripts/convert.py --file path/to/file.md
# Convert all README files in a specific directory
python3 .claude/skills/obsidian-wikilinks-converter/scripts/convert.py --root ./06-AI
Common Workflows
Workflow 1: Convert All README Files
For maintaining GitHub-compatible documentation:
# 1. Review what will be changed
python3 .claude/skills/obsidian-wikilinks-converter/scripts/convert.py --dry-run
# 2. Apply changes
python3 .claude/skills/obsidian-wikilinks-converter/scripts/convert.py
# 3. Verify in Git
git diff
Workflow 2: Convert Single File
For preparing a specific document:
# Convert and review
python3 .claude/skills/obsidian-wikilinks-converter/scripts/convert.py \
--file Level-6-Best-Practices/README.md
Workflow 3: Batch Convert by Pattern
For converting all files matching a pattern:
# Find and convert all README files
find . -name "README.md" -type f | while read file; do
python3 .claude/skills/obsidian-wikilinks-converter/scripts/convert.py --file "$file"
done
Implementation Details
Conversion Logic
The converter uses regex pattern matching with the following logic:
# Pattern: content
pattern = r'\[\[([^\]]+)\]\]'
# Conversion function
def convert(match):
content = match.group(1)
# Split by | for display text
if '|' in content:
path, display = content.split('|', 1)
else:
path = content
display = path.split('/')[-1] # Use filename
# Add .md extension if needed
if not path.endswith('.md'):
path = path + '.md'
# URL encode spaces
path = path.replace(' ', '%20')
return f'[{display}]({path})'
Edge Cases Handled
- Code Blocks: WikiLinks inside code blocks are NOT converted
- Front Matter: YAML front matter is preserved
- Empty Links:
[[]]is skipped - Special Characters: Properly escaped in URLs
- Nested Paths: Relative and absolute paths preserved
Best Practices
1. Always Use Dry-Run First
# GOOD: Preview before applying
python3 convert.py --dry-run
python3 convert.py
# BAD: Direct conversion without review
python3 convert.py
2. Commit Before Conversion
# Save current state
git add .
git commit -m "Before WikiLinks conversion"
# Apply conversion
python3 convert.py
# Review and commit
git diff
git add .
git commit -m "Convert WikiLinks to standard Markdown"
3. Test on Sample Files First
# Test on a single file
cp README.md README.md.backup
python3 convert.py --file README.md
diff README.md README.md.backup
4. Use Obsidian-Compatible Markdown
Both Obsidian and GitHub support standard Markdown links:
# ✅ RECOMMENDED: Works everywhere
[Display Text](path/to/file.md)
# ❌ Obsidian-only: Breaks on GitHub
path/to/file|Display Text
Limitations
- Code Block Detection: Basic implementation may convert WikiLinks in code blocks
- Image Links: Assumes all WikiLinks are document links (not images)
- Section Links:
file#sectionnot fully supported yet - Block References:
file^blocknot supported
Future Enhancements
- Preserve WikiLinks in code blocks/inline code
- Support image WikiLin
Установить obsidian-wikilinks-converter в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл obsidian-wikilinks-converter?
Convert Obsidian WikiLinks ([[...]]) to standard Markdown links ([...](...)) for GitHub compatibility. This skill should be used when users need to make README files or other Markdown documents GitHub-compatible while maintaining Obsidian functionality, or when batch converting WikiLinks across multiple files.
Как установить скилл obsidian-wikilinks-converter?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл obsidian-wikilinks-converter запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic