explainlisted
Install: claude install-skill mehrad-dm/mastermind
# Document Package — make an internal package self-explaining to any model
Most internal packages ship with **no usage docs**, so every consumer — a teammate, *or an AI* — reads the
source, guesses the intended usage, and gets the gotchas wrong. This skill fixes that: **one colocated
usage doc per public unit**, capturing the API *and* the non-obvious rules, so the next reader is correct
on the first try. It applies to **any** package — a UI component kit, a utils library, a services/API
layer, a hooks package, an internal SDK.
> **Why it matters for portability:** these docs are the layer that makes your package understandable to
> *any* model. If you migrate from one AI to another (Claude → GPT → Gemini), the new model still
> understands your package immediately — the knowledge lives in the repo, not in one model's head.
## Ask first — always
This writes files into the user's repo. **Confirm before doing anything:** *"I can generate AI-friendly
usage docs for `<package>` so any model (and teammate) understands it correctly — one doc per public unit,
with the gotchas. Want me to? (I'll show one sample first.)"* Show a **sample doc** for one unit and get a
thumbs-up before fanning out across the package.
## Method
1. **Discover the public units.** Read the package's public entry (`index.ts`/exports) for the real list —
components, exported functions, hooks, services, classes. Note any existing docs' style and **match it**.
2. **Read the source of truth — don't guess.