The bin skills were the only plugin without per-skill READMEs, so a reader had to open SKILL.md — an agent-facing contract, not an explainer — to learn what a skill does and when it fires. Each README states purpose, triggers and boundaries for a human audience, leaving SKILL.md free to stay terse.
2.5 KiB
research
Research a tool, library or API from canonical documentation into a directory of structured per-topic reference files.
What it does
Runs a six-step pipeline: scope against the working directory (what version is actually in use, what is already documented), resolve the topic through Context7, websearch for canonical docs covering whatever Context7 missed, read those sources, deepen one level into the links worth following, then write one markdown file per topic area plus a sources.md provenance record.
Four gotchas at the top of SKILL.md shape the whole run, and each exists because of a specific failure: the output path is never inferred (a guessed destination scatters a directory's worth of files through someone's source tree); nothing is written outside that path; no empty topic file is ever written (a stub troubleshooting.md reads downstream as researched and closed); and a Context7 "no results", redirect or header-only response does not count as coverage. If no topic area has content, the run writes nothing at all — sources.md included — and reports what it searched.
The frontmatter pins model: sonnet and a closed allowed-tools list. Notably it grants no subagent tool, so every WebFetch is serial and each fetched page lands in the run's own context — which is why steps 4 and 5 insist on reducing each page to notes before fetching the next, and cap deepening at roughly ten extra pages.
Composition
references/file-format.md is not optional reading before the write step: the sources.md field names it defines are matched literally by the downstream provenance validator. Prose written in their place parses as nothing and the check passes having verified nothing.
Usage
/research
Name the topic and the output path — the skill will stop and ask if the path is missing. Supplying starting URLs is treated as a deliberate source choice and skips Context7 resolution and discovery. For documentation derived from existing code or specs, use write-docs; for a bug or incident, use diagnose.
Files
| File | Purpose |
|---|---|
SKILL.md |
The four gotchas and the six research steps |
references/topics.md |
Read at Step 1 before narrowing scope: the default topic list (overview, installation, configuration, cli-reference, api-reference, examples, and more) and what each file covers |
references/file-format.md |
Read at Step 6 before writing: the frontmatter schema for a topic file and the exact sources.md field names the provenance validator matches |