Установка
SKILL.md
Article Exporter - Export Articles to Obsidian
Version: 0.5.0 | Last Updated: 2026-03-13
You are an expert at web content archiving and Obsidian workflow automation.
Lessons from Failed Exports
These rules were extracted from real export failures. Each one prevents a specific class of error:
- Twitter/X needs AI reformatting —
fetchreturns flat text because Twitter uses custom UI without semantic HTML. The AI reformatting step reconstructs headings, lists, and code blocks. Seereferences/twitter-handling.md. - Ask for output path first — users have different vault locations. Assuming a default creates files in the wrong place and wastes time moving them.
- Check actionbook version >= 0.9.1 — the
--wait-hintparameter was added in 0.9.1. Without it, dynamic content (SPAs, lazy-loaded pages) returns empty or partial results. - Wait after navigation — use
--wait-hint heavyfor Twitter, Medium, and other dynamic sites. Without it, the page hasn't finished rendering when content is extracted. - Rate limit batch exports — 3-5s delay between requests prevents being flagged as a bot (ToS compliance).
Quick Reference
| Task | Command | Success Criteria |
|---|---|---|
| Check deps | actionbook --version | Shows version >= 0.9.1 |
| Fetch article | actionbook browser fetch <url> --wait-hint heavy | Returns plain text (AI reformats to Markdown in Step 1b) |
| Translate | AI session directly | README_CN.md created |
| Open in Obsidian | obsidian-cli open "path/index.md" | File opens in Obsidian |
Complete Export Workflow
Goal: Export web article to Obsidian directory with images and optional translation
Success criteria:
- Article directory created with README.md
- All images downloaded to images/
- index.md navigation file created
- Optional: README_CN.md translation
- Opened in Obsidian (if obsidian-cli available)
Step 1: Fetch Article Content
Execution: Direct (Bash)
# Fetch article as readability text (with log cleaning)
actionbook browser fetch "$URL" --wait-hint heavy 2>/dev/null | \
sed '/^[[:space:]]*$/d;/^\x1b\[/d;/^INFO/d' > /tmp/article_raw.txt
Success criteria:
/tmp/article_raw.txtexists and size > 0 bytes- Content contains the article's main text
The fetch command returns readability-extracted plain text (not Markdown). AI reformatting in Step 1b is always needed to produce proper Markdown.
Rules:
- Use
--wait-hint heavyfor Twitter, Medium, dynamic content - Use
--wait-hint lightfor static blogs 2>/dev/nullsuppresses stderr logssedremoves ANSI codes, INFO lines, empty lines
Twitter/X Special Handling
Twitter uses non-semantic HTML, so fetch output loses all structure (headings become flat text, code blocks disappear). If the URL contains x.com or twitter.com, pay extra attention to structure reconstruction in Step 1b. See references/twitter-handling.md.
Step 1b: AI Reformat to Markdown
Execution: Direct (AI session)
Read /tmp/article_raw.txt and convert the plain text into well-structured Markdown. Save the result to /tmp/article.md.
Reformatting rules:
- Reconstruct headings (
#,##,###) from the text structure - Preserve original image URLs as
references - Format code blocks, lists, tables, and blockquotes
- Keep the original article title as the first
# H1heading
Success criteria:
/tmp/article.mdexists and starts with# <Title>- Image URLs are preserved as Markdown image syntax
Step 2: Extract Metadata
Execution: Direct (Bash)
# Extract title (first H1 heading from AI-reformatted markdown)
TITLE=$(grep -m 1 "^# " /tmp/article.md | sed 's/^# //')
# Extract image URLs (filter out data: URLs)
IMAGE_URLS=$(grep -o '!\[[^]]*\]([^)]*)' /tmp/article.md | \
sed -E 's/!\[[^]]*\]\(([^)]*)\)/\1/' | \
grep -v '^data:')
Success criteria:
$TITLEis non-empty$IMAGE_URLScount matches expected (usewc -l)
Step 3: Ask Output Directory
Execution: [human] Human checkpoint: Confirm output location before creating files
Ask user: "Where should I save the exported article?"
Suggested paths:
~/Work/Write/Articles(default)~/Documents/Obsidian/Articles~/Notes/Imported- (or custom path from
$output_dirargument)
Success criteria: User confirms output directory
Artifacts: $OUTPUT_DIR variable set
Step 4: Create Directory Structure
Execution: Direct (Bash)
# Use argument if provided, otherwise use confirmed path
OUTPUT_DIR="${output_dir:-$USER_CONFIRMED_PATH}"
# Sanitize title for directory name
SAFE_TITLE=$(echo "$TITLE" | sed 's/[/:*?"<>|]//g' | cut -c1-100 | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
# Create output directory
ARTICLE_DIR="$OUTPUT_DIR/$SAFE_TITLE"
mkdir -p "$ARTICLE_DIR/images"
Success criteria:
- Directory
$ARTICLE_DIRexists - Subdirectory
images/exists - Directory is writable
Rules:
- Remove special characters:
/ : * ? " < > | - Limit title length to 100 characters
- Trim leading/trailing whitespace
Step 5: Download Images (Parallel if possible)
Execution: Direct (Bash)
counter=1
for url in $IMAGE_URLS; do
ext=$(echo "$url" | grep -oE '\.(jpg|jpeg|png|gif|webp|svg)' || echo ".jpg")
curl -L -s "$url" -o "$ARTICLE_DIR/images/image_${counter}${ext}"
# Check file size (detect 0-byte failures)
if [ ! -s "$ARTICLE_DIR/images/image_${counter}${ext}" ]; then
# Try alternative format (Twitter)
curl -L -s "${url}?format=jpg&name=orig" -o "$ARTICLE_DIR/images/image_${counter}.jpg"
fi
counter=$((counter + 1))
done
Success criteria:
- All image files exist and size > 0 bytes
- File count matches
$IMAGE_URLScount
Rules:
- Use
curl -Lto follow redirects - Check file size after download
- Try alternative formats for Twitter images
Step 6: Update Image References
Execution: Direct (Bash)
# Replace remote URLs with local paths
counter=1
for url in $IMAGE_URLS; do
ext=$(echo "$url" | grep -oE '\.(jpg|jpeg|png|gif|webp|svg)' || echo ".jpg")
sed -i.bak "s|$url|./images/image_${counter}${ext}|g" /tmp/article.md
counter=$((counter + 1))
done
# Save updated markdown
cp /tmp/article.md "$ARTICLE_DIR/README.md"
rm /tmp/article.md.bak
Success criteria:
README.mdcontains./images/image_N.*references- No remote URLs remain in image links
Step 7: AI Translation (Optional)
Execution: Direct (AI session)
Human checkpoint: Ask user: "Do you want to translate the article? (y/n)"
If yes:
- Read
$ARTICLE_DIR/README.md - Translate using AI capabilities (no external API)
- Write to
$ARTICLE_DIR/README_CN.md(or other language code)
Translation Prompt Template:
Translate the following Markdown article to [LANGUAGE] while preserving:
- All Markdown formatting (headings, lists, code blocks, tables)
- Image references exactly as-is: 
- Links and URLs unchanged
- Code blocks and technical terms in original language
Only output the translated Markdown content.
---
[Paste README.md content]
Success criteria: Translation file exists and size ≈ original ± 20%
Supported languages: en, zh, es, fr, de, ja, ko
Step 8: Create Navigation Index
Execution: Direct (Bash)
# Auto-detect source from URL
case "$URL" in
*x.com*|*twitter.com*) SOURCE="X" ;;
*medium.com*) SOURCE="Medium" ;;
*dev.to*) SOURCE="Dev.to" ;;
*openai.com*) SOURCE="OpenAI Blog" ;;
*substack.com*) SOURCE="Substack" ;;
*github.com*) SOURCE="GitHub" ;;
*) SOURCE=$(echo "$URL" | sed 's|https\?://||' | cut -d/ -f1) ;;
esac
# Create index.md
cat > "$ARTICLE_DIR/index.md" <<EOF
# $TITLE
> **Export Date**: $(date +%Y-%m-%d)
> **Original URL**: $URL
> **Source**: $SOURCE
## 📚 Language Versions
- 🇬🇧 **English**: [[README]]
- 🇨🇳 **Chinese**: [[README_CN]] <!-- if translated -->
## 📊 Metadata
| Property | Value |
|----------|-------|
| **Source** | $SOURCE |
| **Images** | $(ls images/ 2>/dev/null | wc -l) images |
| **Export Tool** | actionbook CLI |
| **Export Date** | $(date +%Y-%m-%d) |
---
**Exported using**: actionbook browser automation + AI assistant
EOF
Success criteria: index.md exists with metadata table
Step 9: Open in Obsidian
Execution: Direct (Bash)
if command -v obsidian-cli &> /dev/null; then
VAULT_ROOT="$OUTPUT_DIR"
REL_PATH=$(echo "$ARTICLE_DIR" | sed "s|$VAULT_ROOT/||")
obsidian-cli open "$REL_PATH/index.md"
echo "✓ Opened in Obsidian: $REL_PATH/index.md"
else
# Fallback: Open in file manager
case "$(uname)" in
Darwin) open "$ARTICLE_DIR" ;;
Linux) xdg-open "$ARTICLE_DIR" ;;
CYGWIN*|MINGW*|MSYS*) start "$ARTICLE_DIR" ;;
esac
echo "⚠️ Install obsidian-cli for automatic opening: npm install -g obsidian-cli"
fi
Success criteria:
- File opens in Obsidian OR directory opens in file manager
- User sees success message
Step 10: Report Success
Execution: Direct (Output)
echo ""
echo "════════════════════════════════════════════"
echo "✓ Article exported successfully!"
echo ""
echo "📁 Location: $ARTICLE_DIR"
echo "📄 Files:"
echo " - README.md (original)"
[ -f "$ARTICLE_DIR/README_CN.md" ] && echo " - README_CN.md (translation)"
echo " - index.md (navigation)"
echo "🖼️ Images: $(ls images/ 2>/dev/null | wc -l) files"
echo "════════════════════════════════════════════"
Common Issues
| Issue | Cause | Solution |
|---|---|---|
| "actionbook: command not found" | CLI not installed | npm install -g @actionbookdev/cli@latest |
| "unknown flag: --wait-hint" | Version < 0.9.1 | Upgrade: npm install -g @actionbookdev/cli@latest |
| Twitter format broken | fetch loses structure | Use AI reformatting (see references/twitter-handling.md) |
| Images 0 bytes | URL expired | Try ?format=jpg&name=orig |
| obsidian-cli not found | Not installed | npm install -g obsidian-cli |
| Batch export blocked | Too fast, flagged as bot | Add 3-5s sleep between requests |
Detailed troubleshooting: See ./references/troubleshooting.md
Edge Cases Handled
- Long titles → Auto-truncate to 100 chars
- Special characters → Sanitized (
/ : * ? " < > |removed) - No images → Steps 5-6 skip gracefully
- 0-byte images → Auto-retry with alternative formats
- Data URLs → Filtered out in Step 2
When Using This Skill
- Check dependencies first —
actionbook --version >= 0.9.1 - Test with one article — Verify before batch processing
- Twitter/X requires special handling — See references/twitter-handling.md
- Respect ToS — Personal use only, rate limit batch exports
References (Progressive Disclosure)
For detailed documentation, see:
./references/twitter-handling.md— Twitter/X special handling (AI reformatting)./references/batch-export.md— Batch export with rate limiting./references/troubleshooting.md— Detailed troubleshooting guide./references/obsidian-setup.md— obsidian-cli setup and configuration./references/supported-websites.md— Complete website compatibility list
Last Updated: 2026-03-13 | Version: 0.5.0
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: article-exporter](https://darkplay.ru/ai/skills/actionbook-actionbook-article-exporter)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
Azure Iac Exportergithub · Экспорт существующих ресурсов Azure в шаблоны Infrastructure as Code через анализ Azure…
cavemanalirezarezvani · Режим сверхсжатого общения. Сокращает расход токенов на 20–50% (до 75%), убирая воду и…
chief-ai-officer-advisoralirezarezvani · Советник Chief AI Officer для стартапов: калькулятор build-vs-buy для моделей с 3-летней…
compliance-team-eu-ai-actalirezarezvani · Соответствие EU AI Act: классификатор рисков, оценка соответствия, трекер обязанностей.
beautiful-article-skillsconardli · Превращение URL, PDF, DOCX, Markdown и скриншотов в офлайн HTML-статьи через reacticle.
16mindsanthropics · 16-minds вызывает агентов на основе 16 разных типов личности — у каждого свои ценности…
chat-auto-exporteranthropics · Плагин Claude Code, который автоматически сохраняет диалоги в читаемые текстовые файлы…
distill-designanthropics · Плагин Claude Code, воссоздающий стиль Distill: токены, UI-кит статей, диаграммы и…
dopamineanthropics · Хук для Claude Code: в режиме Degrade открывает YouTube Shorts рядом с терминалом, в…
eu-ai-act-complianceanthropics · Инструменты соответствия EU AI Act: классификатор рисков, FRIA, проверка прозрачности.Лучшие ИИ-инструменты для генерации изображений
Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты
MagviMagvi
DALL-E 3OpenAI
SupaLabSupalab
Freestyling.aiFreestyling
ArtGeneration.meArtgeneration
BigjpgBigjpg
Художник от VKVK
Avato AI12ai
Virton AIVirtonЛучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachat