Point Claude Code at a package name, repo URL, or documentation URL and
invoke with the /skill-from-docs <source> or an appropriately phrased
natural-language prompt, and this meta-skill generates a focused, prescriptive
skill at ~/.claude/skills/use-<name>/ — distilling the docs into terse,
task-organized prose that Claude can pull in on demand, whenever such specific
knowledge is needed. This is a skill factory, sometimes called a meta-skill or skill
generator: a single skill whose job is to produce other skills.
It's built for anyone who wants their coding assistant to learn a new API, library, CLI tool, or package from its developer documentation, without manually writing the skill by hand or pasting raw doc dumps into context.
Given a target like pip:requests, npm:react, cargo:tokio,
brew:ffmpeg, apt:jq, a GitHub repo URL, or a bare docs URL (like https://<packagename>.readthedocs.com), the
skill drives Claude through a deterministic pipeline:
intake → discover sources → fetch → extract → outline → CHECKPOINT
↓
rewrite each section
↓
validate → write
Four bundled Python scripts handle the mechanical work (parsing HTML, sniffing package metadata, validating frontmatter). The host model (Claude) does the distillation — picking which sections matterm, and whether or not and how to break up large docs sources into manageable main- and sub-section parts, condensing prose, cleaning up code examples, and drafting the trigger description and SKILL.md structure.
The result is a skill directory with:
SKILL.md— terse orchestrator with a prescriptive frontmatter description that makes Claude reach for the skill at the right moment - i.e. whenever the package or library or project is explicitly mentioned (work-in-progress: or is a major dependency of the current project.)reference.md(orcli-cheatsheet.mdfor CLI tools) — the long-form API reference, only loaded into context when warrantedexamples/01_*.py… — runnable, self-contained example scripts which can be used as a starting point for new code or when adding functionality that is similar to use cases provided in the documentation.
Distill, don't dump — the skill never just copies raw docs into a file. Output shape is chosen adaptively based on the source (see the table in skill-from-docs/reference.md).
Dependencies:
First, make sure you have uv installed and available in $PATH or in a venv that is active, as we make use of it for managing python dependencies both for the metaskill and the skills it produces.
pip -m venv .venv
. .venv/bin/activate
pip install uvOr, system-wide (use caution):
pip install uv --break-system-packagesOne-liner (tarball, no clone, idempotent):
mkdir -p ~/.claude/skills/skill-from-docs && \
curl -L https://github.com/un1tz3r0/skill-from-docs-metaskill/archive/refs/heads/main.tar.gz \
| tar -xz --strip-components=2 -C ~/.claude/skills/skill-from-docs \
skill-from-docs-metaskill-main/skill-from-docsGit clone (for tracking updates):
mkdir -p ~/.claude/skills
git clone --depth 1 https://github.com/un1tz3r0/skill-from-docs-metaskill.git /tmp/sfdm
rsync -a --delete /tmp/sfdm/skill-from-docs/ ~/.claude/skills/skill-from-docs/
rm -rf /tmp/sfdmBootstrap the venv (idempotent — safe to re-run):
bash ~/.claude/skills/skill-from-docs/setup.shThe setup script creates a uv-managed venv inside the skill
directory with pyyaml, beautifulsoup4, markdownify, requests,
and packaging. If uv isn't on your PATH, install it first:
curl -LsSf https://astral.sh/uv/install.sh | shInside Claude Code, just ask:
- "Create a skill for using
httpx." - "Skillify
pip:polars." - "Turn these docs into a reusable skill: https://docs.modular.com/mojo/"
- "Make a skill for the
ghCLI frombrew:gh." /skill-from-docs <target>
Claude will discover candidate doc sources, ask you to pick one, fetch
and extract the content, draft a description and section outline,
checkpoint with you before writing anything, then write the skill
into either ~/.claude/skills/use-<name>/ (user-global) or
./.claude/skills/use-<name>/ (project-local).
Two example skills that were generated and verified end-to-end during development:
use-requests— Python HTTP client skill. Full shape:SKILL.md+reference.md+setup.sh+ 3 runnable examples. Validator-clean; example 01 hitshttpbin.organd returns real200JSON.use-jq— CLI tool skill. CLI shape:SKILL.md+cli-cheatsheet.md+ verify-onlysetup.sh. Noexamples/, noreference.md— the adaptive-shape table routes CLI tools to a cheatsheet instead.
See CHANGELOG.md for the full verification log.
The shape of the generated skill depends on the source. Excerpt from skill-from-docs/reference.md:
| Source signal | Output addition |
|---|---|
| Has extractable code samples | examples/01_*.py … 06_*.py |
| On PyPI / npm / cargo / apt / brew | setup.sh with idempotent install |
| CLI tool, no importable API | cli-cheatsheet.md, skip setup.sh |
| C/C++ library only | reference.md only (API + linker flags) |
| Distilled docs < 2k tokens | Inline everything into SKILL.md |
| Distilled docs > 30k tokens | Multi-file split, linked from SKILL.md |
- Claude Code (CLI, IDE extensions, web, desktop) — the host that
reads
~/.claude/skills/and surfaces skills by description match. - Cross-compatible with the Claude Agent SDK model of skills.
- The generated skills are plain markdown + scripts — no runtime, no dependencies on this meta-skill once they're written.
skill-from-docs-metaskill/
├── README.md ← you are here
├── CHANGELOG.md
├── .github/workflows/lint.yml ← frontmatter + shellcheck + link check
└── skill-from-docs/ ← the actual skill (copy into ~/.claude/skills/)
├── SKILL.md
├── reference.md
├── setup.sh
└── scripts/
├── 01_discover_sources.py
├── 02_fetch.py
├── 03_extract.py
├── 04_validate.py
└── lib/
Issues and PRs welcome. Particularly useful contributions:
- New source adapters (more package managers, language ecosystems)
- Edge cases in the JS-wall detector (the heuristic that decides whether to bail out to a headless-browser scraper)
- Examples of broken/awkward inputs the validator should catch
- Claude Code documentation — the host that runs skills
- Claude Code Skills overview — the format this meta-skill produces
- Anthropic Skills examples — official starter skills
MIT — see LICENSE.