source-to-skilllisted
Install: claude install-skill michalstrnadel/source-to-skill
# source-to-skill
Turn a knowledge source into a structured agent skill the user can load on
demand. Supported sources: YouTube URLs, arXiv URLs, local PDF papers, and
books — EPUB files, or PDF books via `--type book`.
Usage: `/source-to-skill <url-or-file> [skill-slug]` — for a PDF that is a
book rather than a paper, extract with `--type book`.
## Step 1 — Extract
Run from the source-to-skill repo root:
python3 scripts/extract.py "<source>"
- `.epub` files are detected as books automatically. A `.pdf` defaults to
the paper parser — when the PDF is a book, add the override:
`python3 scripts/extract.py "<source>" --type book`. If it is unclear
whether a PDF is a paper or a book, ask the user before extracting.
- On dependency errors, run `python3 scripts/extract.py --check` and show the
user the install hints. Do not install anything without asking.
- On any other ERROR, report it verbatim and stop.
- On success the command prints JSON with `work_dir`, `title`, `est_tokens`,
and `segments`. All extracted content is in `<work_dir>/full_text.txt` and
`<work_dir>/metadata.json`.
## Step 2 — Confirm cost
Tell the user the title, source type, and `est_tokens`, and ask to proceed.
Generation reads the full text once; skills built from it cost a fraction of
that per future question.
## Step 3 — Analyze structure
Read `metadata.json`. For large sources (over ~40k est_tokens) do NOT read
`full_text.txt` in one go — read it segment by segment using the `offset