tapestry-sources
Unified content extraction and action planning. Use when user says "learn-this <URL>", "learn this <URL>", "weave <URL>", "help me plan <URL>", "extract and plan <URL>", "make this actionable <URL>", or similar phrases indicating they want to extract content and create an action plan. Automatically detects content type (YouTube video, article, PDF) and processes accordingly.
1How It Works & Mechanism
The site entry 'Tapestry Sources' has no directory by the same name at this pinned commit (the repository only contains 7 skills: learn-this / article-extractor / youtube-transcript / ship-learn-next / scrum-sage / session-log / unblock-action). Based on the description 'download source materials from articles, PDFs, and YouTube subtitles', this report maps to the content acquisition orchestrator learn-this, using article-extractor and youtube-transcript, which it actually invokes, as the evidentiary basis for the download implementation.
| [Learn This](#0-learn-this-) | One command to extract content from any URL and turn it into an action plan. |
Content acquisition is dispatched based on URL type: YouTube routes to yt-dlp, articles route to readability/trafilatura, and PDFs route to curl+pdftotext. Detection and dispatching are entirely written as directly executable inline bash.
elif [[ "$URL" =~ \.pdf$ ]] || curl -sI "$URL" | grep -iq "Content-Type: application/pdf"; then CONTENT_TYPE="pdf"
The YouTube branch follows a fixed pattern of fetching automatic subtitles with yt-dlp and deduplicating/cleaning them into plain text via inline Python, naming the output file after the video title.
yt-dlp --write-auto-sub --skip-download --sub-langs en --output "temp_transcript" "$URL"
The article branch uses a three-tier fallback chain: reader (Mozilla Readability) → trafilatura → curl + inline HTMLParser, installing missing tools on the spot via npm/pip.
### Option 1: reader (Recommended - Mozilla's Readability) ```bash command -v reader ```
The PDF branch is the simplest: downloads via curl -L and extracts text using pdftotext; if poppler is missing, it does not block—it keeps the PDF and prints the installation command.
echo "⚠️ pdftotext not found. PDF downloaded but not extracted." echo " Install with: brew install poppler"
All branches conclude with 'convert title to a safe filename + save to the current working directory': stripping / : ? " < > | and truncating to 80-100 characters before appending .txt.
FILENAME=$(echo "$ARTICLE_TITLE" | tr '/' '-' | tr ':' '-' | tr '?' '' | tr '"' '' | cut -c 1-80 | sed 's/ *$//')
Content acquisition is only the first half: after obtaining the txt, learn-this strictly ('Always create an action plan') calls ship-learn-next to generate a 5-rep action plan, delivering two artifacts: 'content file + plan file'.
**IMPORTANT**: Always create an action plan after extracting content.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | yt-dlp(字幕/元数据/音频下载) |
| cli | reader(@mozilla/readability-cli 或 reader-cli,文章提取首选) |
| cli | trafilatura(Python 文章提取备选) |
| cli | curl(PDF 下载与文章兜底抓取) |
| cli | pdftotext(poppler,PDF 取文) |
| cli | whisper(openai-whisper,仅在完全无字幕时使用) |
| cli | python3(VTT 去重清洗与 HTML 兜底解析的内联脚本) |
| network | YouTube(经 yt-dlp 取字幕/元数据/音频) |
| network | 目标网页(用户给的任意 URL:HEAD 探测、curl 抓 HTML、reader/trafilatura 拉正文) |
| network | 包管理器源(Homebrew / apt / PyPI / npm registry)——依赖自动安装路径上的网络出口 |
4Recommended Governance & Evidence
- scripts/: Executes local scripts or commands: yt-dlp --list-subs / --write-sub / --write-auto-sub --skip-download --sub-l
- scripts/ 或 SKILL.md: Declares dynamic installation of external language package dependencies
- 网络端点: Declares external network access: YouTube (yt-dlp: subtitles, metadata, audio when necessary; youtube.com / youtu.be / /shorts/)
- 本地工作目录: File read/write and artifact output: Current working directory: <title>.txt (cleaned main text/transcript, final artifact)
5Second-Pass Verification
- [unlocatable] 任务表 name_slug=tapestry-sources 对应的 skill 目录 — git ls-tree -r HEAD 列名:LICENSE、README.md、article-extractor/SKILL.md、install.sh、learn-this/SKILL.md、scrum-sage/SKILL.md、session-log/SKILL.md、ship-learn-next/SKILL.md、unblock-action/SKILL.md、youtube-transcript/SKILL.md——无 tapestry-sources 或任何 sources 命名的目录/SKILL.md;pool.json 侧该条目 path="{空}"、来源为 awesome-skills.com 的 repo 级摘要。按任务书规则记为 unlocatable,不硬造目录。
- [discrepancy] 映射决定:以 learn-this 作为本条目主体 — 站点摘要『Download sources from articles, PDFs, and YouTube video transcripts』与 learn-this frontmatter description 的三源检测('Automatically detects content type (YouTube video, article, PDF)')逐项对应,仓库内没有第二个覆盖三源的入口(article-extractor 只做文章、youtube-transcript 只做视频)。故 skill.path 记为 learn-this,报告显式说明这是映射而非同名命中;如需严格一一对应,本条目应在站点侧标注为 repo 级条目。
- [ok] 文章三级降级链真实存在 — article-extractor/SKILL.md '## Extraction Methods' 依次 Method 1 reader、Method 2 trafilatura、Method 3 兜底 curl + 内联 HTMLParser;'## Complete Workflow' 用 if command -v reader / elif command -v trafilatura / else 分支实现,与 learn-this Step 2 的 case 一致。
- [ok] YouTube 三段策略与确认门 — youtube-transcript/SKILL.md 明列 Option 1 --write-sub、Option 2 --write-auto-sub、Option 3 Whisper('**ONLY use this if both manual and auto-generated subtitles are unavailable.**'),且 Whisper 前有体积展示+等待确认、安装前再次等待确认、转写后询问是否删除音频——确认门原文均在。
- [ok] PDF 分支的 pdftotext 与降级 — learn-this Step 2 PDF 段:curl -L 下载 → if command -v pdftotext → pdftotext 取文并可选删 PDF;否则打印 'pdftotext not found' 与 brew/apt 安装提示并保留 PDF 作为产物。
- [ok] 无凭证读取(重要:决定档位) — 对 learn-this/article-extractor/youtube-transcript/install.sh/README 扫描 .env|API_KEY|token|secret|cookie|login 无命中;yt-dlp 未使用 --cookies-from-browser,Whisper 为本地模型,无任何账号依赖。故 credential_reads 为空、档位落黄而非橙。
- [ok] 文件名清洗与写盘范围 — 清洗链在 learn-this(article 行)与 article-extractor(tr '/' '-' / tr ':' '-' / cut -c 1-80|100)均存在;产物写当前目录,中间文件 rm;install.sh 只写 $HOME/.claude/skills(SOURCE 目录为脚本自身所在目录)。
- [ok] 安装命令是否需要提权 — youtube-transcript/SKILL.md 的 Linux 路径为 'sudo apt update && sudo apt install -y yt-dlp'(需要 sudo);macOS/pip/npm 路径无需提权。已如实写入 scripts_executed 与 external_deps。
6Verdict & Scenarios
1da7c419a2dedca5…