Skip to content

un1tz3r0/skill-from-docs-metaskill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skill-from-docs

A meta-skill that turns any library's documentation into a Claude Code skill.

License: MIT GitHub stars GitHub issues Works with Claude Code Lint


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.

What it does

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 (or cli-cheatsheet.md for CLI tools) — the long-form API reference, only loaded into context when warranted
  • examples/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).

Install

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 uv

Or, system-wide (use caution):

pip install uv --break-system-packages

One-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-docs

Git 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/sfdm

Bootstrap the venv (idempotent — safe to re-run):

bash ~/.claude/skills/skill-from-docs/setup.sh

The 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 | sh

Use it

Inside 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 gh CLI from brew: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).

What you get out the other side

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 hits httpbin.org and returns real 200 JSON.
  • use-jq — CLI tool skill. CLI shape: SKILL.md + cli-cheatsheet.md + verify-only setup.sh. No examples/, no reference.md — the adaptive-shape table routes CLI tools to a cheatsheet instead.

See CHANGELOG.md for the full verification log.

How it picks the output shape

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_*.py06_*.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

Built for

  • 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.

Repo layout

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/

Contributing

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

Related

License

MIT — see LICENSE.


keywords: claude-skill · claude-code · anthropic · agent-skill · llm-tools · meta-skill · skill-factory · skill-generator · api-reference · developer-docs · documentation-to-code · docs-to-skill · coding-assistant

About

A skill that enables Claude to create skills from package/project docs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors