agentleFS
BostonOrangeBostonOrange/claude-code-framework/skills/add-reference/SKILL.md

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.

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
  1. Very specific:

    Create or update structured reference documentation under a skill's references/ directory.

    line 8
  2. Distinctive:

    Ask user for source material

    line 33
  3. Distinctive:

    If none, scan codebase for clues

    line 34
  4. Distinctive:

    Existing file: Read current, merge new findings, preserve manual notes

    line 51
  5. Distinctive:

    New file: Create using formats below

    line 52

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 reference

Reference 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

  1. Ask user for source material
  2. If none, scan codebase for clues
  3. Structure with tables and categories
  4. Include source attribution

2b. Codebase Inventories

Scan relevant directories:

Reference TypeWhat to Extract
Entities/ModelsNames, key fields, types, relationships
Classes/ModulesNames, purpose, category, key methods
API EndpointsRoutes, methods, parameters, responses
ConfigurationConfig keys, types, defaults
Test HelpersFactories, 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
  • ## Contents section at top for large files

Edge Cases

ScenarioBehavior
Skill doesn't existCreate new skill directory
Reference file existsMerge new findings, preserve manual entries
No source materialScan codebase, flag gaps, ask user
Very large scan (100+ items)Categorize into sections

Related Skills

  • /ai-update — branch + PR after adding references

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.