Omniscio

OmniscioSkills examplesAPI docs

A Claude Code skill that writes API reference docs

One complete SKILL.md for documenting a module. It is written for a code reference, not a prose guide: each claim is anchored to a signature or a line of code. The example is shaped for JavaScript or TypeScript exports; in another language, read "export" as its public functions and classes.

Checked against Anthropic's documentation on November 25, 2026. By the Omniscio team. Updated .

When this skill fires

The description names API docs, a reference page and documentation for a module, so the automatic route has something to match; the direct route uses the command name.

  • On its own when you ask "document this module", "write API docs for the client", or "what does this export do".
  • Directly with /api-docs src/api/users.ts, or with no argument to be asked which path to document.
  • With the read tools pre-approved: allowed-tools: Read Grep Glob covers reading the file, searching for callers and listing the folder. It grants no write, and it clears on your next message.

The whole skill, ready to copy

Save this as SKILL.md inside a folder named api-docs, with the frontmatter as the file's first line.

---
name: api-docs
description: Writes a Markdown API reference for the exported functions and classes in a file, using only signatures and behaviour it can find in the code. Use when the user asks for API docs, a reference page, or documentation for a module.
argument-hint: [path]
allowed-tools: Read Grep Glob
---

## Instructions

1. Read the file named in the arguments. If nothing is named, ask which path to document.
2. List every export, in the order it appears in the file.
3. For each export, write:
   - its signature exactly as the code declares it,
   - one sentence saying what it does,
   - a table of parameters: name, type, required or optional, default,
   - what it returns,
   - every error it throws or returns, with the condition that causes it,
   - one example call, taken from the code or its tests.
4. Mark anything the code does not answer as `Not documented in the source` rather than inventing it. Purpose and example are inferences: mark a purpose as a gap when there is no comment, and label an example you construct from the signature as constructed.
5. End with a Missing details list naming the gaps the author should fill.

Show the reference in Markdown. Do not edit the source file.

What the output looks like

One export with one gap, as the reference renders it:

### createUser(input)

Creates a user and returns the stored record.

| name | type | required | default |
| --- | --- | --- | --- |
| `input.email` | string | yes | none |
| `input.role` | string | no | `member` |
| `input.locale` | string | no | Not documented in the source |

Returns: `Promise<User>`.

Throws: `ValidationError` when the email is already taken.

Example (constructed from the signature):

```js
await createUser({ email: 'ada@example.com' })
```

## Missing details

- `input.locale`: the source does not state a default.

What each field does

The four fields this file sets. Every field is optional; only description is recommended.
FieldWhat it does here
name: api-docsThe command in the / menu; the folder name would otherwise supply it
descriptionWhat the skill does and when to use it. Claude matches a request against this text
argument-hint: [path]The autocomplete hint for the one argument. Use square brackets: Claude Code displays angle brackets in a description as escaped text
allowed-tools: Read Grep GlobPre-approves the read-only tools for the invoking turn, so reading the file costs no prompts. No write is granted
  • "Every export, in source order" gives the page a shape a reader can scan, and it stops a large module losing the exports nobody asked about.
  • The six fields per export are the smallest set that answers "how do I call this, and what happens when it fails".
  • "Not documented in the source" is the honesty rule. A reference that invents a parameter is worse than one that lists the gap, because a reader trusts it.
  • "Do not edit the source" keeps the skill on documentation. Docstrings are a separate request with a separate review.

About twenty lines. Because a loaded skill stays in the conversation, the body stays short; the reference itself is the output, not part of the file.

Where to put it: personal or project

Personal covers your work; project covers the repository.
ChoosePathWho gets it
Personal~/.claude/skills/api-docs/SKILL.mdYou, in every project on this machine, but not Cowork or cloud sessions
Project.claude/skills/api-docs/SKILL.mdEveryone in this repository once committed. Better if the body should name your docs folder and house style

When two of the enterprise, personal and project locations share a name, personal beats project, so a single home avoids the rule.

Edits show up in the session, except in bare mode, the fast launch that skips optional startup work. If a new skill does not appear, run /reload-skills.

How to confirm it loads

  1. Find the command. Type /api-docs, or open the /skills menu.
  2. Ask the listing question. What skills are available? should name it.
  3. Run it on a small file with a known gap. Pick a module with at least one undocumented parameter, default or error, and check that /api-docs <module> marks the gap rather than filling it.
  4. Check the automatic route. Say "write API docs for the users module". If nothing happens, check that the YAML parses, any paths limit and the listing; then add words the description does not already carry, such as "endpoint" or "public API".

The failures to watch for

The failure to watch for is a confident, wrong reference: a parameter that does not exist, a default the code never applies, an error the function never raises. It reads exactly like the correct parts, which is why the rule is in the body.

  • If the output drifts from the code, add one sentence to step 4: "If a field cannot be read from the code, write the marker; never leave it blank or guess." Pass the path explicitly rather than relying on the automatic route.
  • If the skill fires on files it should not, the optional paths field limits automatic loading to work on matching files, such as src/api/**. It is left out to keep the file minimal. Adding it would only limit automatic loading; it would not stop /api-docs working, so it is a fifth optional frontmatter field rather than a missing part of this one.
  • If it never fires, check that the YAML parses, any paths limit and the listing; then add words the description does not already carry, such as "endpoint" or "public API".

As with every skill, frontmatter that does not start on the file's first line is read as body text, and YAML that does not parse still loads with no fields set — the command works, the description does not.

Where this fits

The pair to this one is the test-writing skill: its tests are a good place to find real calls to document. If you would rather have the documentation written away from your conversation, use a subagent.

Other complete examples are in the skills examples library, and the fields this file uses, plus the rest of the frontmatter reference, are in the skills guide.

Where these answers come from

  • Extend Claude with skills, read November 25, 2026: the frontmatter reference including paths, allowed-tools, where skills load, live change detection and the troubleshooting order.
  • The frontmatter reference: the exact field names, the optional paths field and what it scopes.
  • The changelog: release 2.1.332, dated November 25, 2026.

Common questions

Does it invent documentation for undocumented code?

No. Step 4 tells it to mark anything the code does not answer as Not documented in the source, and the reference ends with a list of those gaps for the author to fill.

Will it add docstrings to my code?

Not under this file: it shows the reference and leaves the source alone. Asking for docstrings is a separate request, which you can review as a code change.

Why is the path the argument?

It is preferred, not required: a repository can have several modules with the same export names, and naming the path removes the guess. With no argument the skill asks instead of choosing.

Can I limit it to my API folder?

Yes. Add paths: src/api/** to the frontmatter, and automatic loading will only consider work on matching files. Files outside the directory the patterns are relative to, which is Claude’s working directory, will not activate it.