add-reference
Skill2 starsChanged 6 months agoMITView on GitHub
Add or update knowledge reference files for skills — domain knowledge (business rules, external systems), codebase inventories (entities, classes, APIs), or both. Use when documenting knowledge for AI context.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- improveSkill
- teamSkill
- ccf-architecture-contractSkill
- ccf-build-and-envSkill
- ccf-change-controlSkill
- ccf-debugging-playbookSkill
- ccf-doc-sync-campaignSkill
- ccf-dogfood-and-driftSkill
- ccf-domain-referenceSkill
- ccf-failure-archaeologySkill
- ccf-onboarding-tourSkill
- ccf-parity-playbookSkill
- ccf-release-and-installSkill
- ccf-testing-and-qaSkill
- improveSkill
- teamSkill
- ai-updateSkill
- app-blueprintSkill
- buildSkill
- check-readinessSkill
- deploySkill
- developSkill
- draft-storySkill
- error-analyzeSkill
- factorySkill
- fetch-docsSkill
- generate-internal-appSkill
- impactSkill
- improveSkill
- indexSkill
- iterative-reviewSkill
- merge-resolveSkill
- mock-endpointSkill
- planSkill
- promoteSkill
- refine-storySkill
- scaffold-design-systemSkill
- searchSkill
- setupSkill
- teamSkill
- skill-nameSkill
- update-trackerSkill
- validateSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Create or update structured reference documentation under a skill's references/ directory.
- Distinctive: line 33
Ask user for source material
- Distinctive: line 34
If none, scan codebase for clues
- Distinctive: line 51
Existing file: Read current, merge new findings, preserve manual notes
- Distinctive: line 52
New file: Create using formats below
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add Reference
Create or update structured reference documentation under a skill's references/ directory.
Usage
/add-reference my-domain entities # Update entity inventory
/add-reference my-domain api-endpoints # Document API surface
/add-reference my-domain # Update all references for skill
/add-reference my-domain new-topic # Create new referenceReference Types
Domain Knowledge
Business rules, regulations, external system behavior. Not generated from code.
Codebase Inventories
Generated by scanning project source. Kept in sync as codebase evolves.
Process
1. Determine Scope
Parse skill name and topic. If no topic, update all references.
2a. Domain Knowledge
- Ask user for source material
- If none, scan codebase for clues
- Structure with tables and categories
- Include source attribution
2b. Codebase Inventories
Scan relevant directories:
| Reference Type | What to Extract |
| Entities/Models | Names, key fields, types, relationships |
| Classes/Modules | Names, purpose, category, key methods |
| API Endpoints | Routes, methods, parameters, responses |
| Configuration | Config keys, types, defaults |
| Test Helpers | Factories, fixtures, builder patterns |
3. Generate or Update
- Existing file: Read current, merge new findings, preserve manual notes
- New file: Create using formats below
Write to: .claude/skills/{skill}/references/{topic}.md
Output Formats
Domain Knowledge
# {Topic} Reference
## Overview
{One paragraph context}
## {Category}
| {Key Column} | {Details} | {Notes} |
|--------------|-----------|---------|
## Source
{Attribution}Codebase Inventory — Entities
# {Skill} Entities Reference
## {Entity_Name}
**Purpose:** {one-line description}
| Property | Type | Notes |
|----------|------|-------|
| `field` | String | {note} |
**Key Relationships:**
- Parent: `ParentEntity` via `parent_id`Codebase Inventory — Classes/Modules
# {Skill} Code Reference
## {Category}
| Module/Class | Purpose |
|-------------|---------|
| `ClassName` | Short description |Format Rules
- Tables for inventories and lists
- Sections for grouped categories
- Identifiers, not display names
- One line per entry
## Contentssection at top for large files
Edge Cases
| Scenario | Behavior |
| Skill doesn't exist | Create new skill directory |
| Reference file exists | Merge new findings, preserve manual entries |
| No source material | Scan codebase, flag gaps, ask user |
| Very large scan (100+ items) | Categorize into sections |
Related Skills
/ai-update— branch + PR after adding references
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

