agentleFS
spboyerspboyer/sensei/AGENTS.md

sensei

AGENTS.md58 starsChanged 9 months agoMITView on GitHub

Instructions for AI coding agents working with this repository. This is Sensei, a skill for improving SKILL.md frontmatter compliance. It follows the Agent Skills specification (maintained by Anthropic). The SKILL.md file follows Anthropic's skill specification: ⚠️ "DO NOT USE FOR:" is actively discouraged — causes keyword contamination on Claude Sonnet. Use inline double-quoted strings for descriptions (not >- folded scalars — incompatible with skills.sh). Skills that invoke MCP tools get additional checks: - MCP Tools Used table - Documents tool…

  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository4 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Low: No triggers, short description

    line 86
  2. Very specific:

    Keep SKILL.md focused on instructions, not documentation

    line 105
  3. Distinctive:

    Use references/ for detailed explanations

    line 106
  4. Very specific:

    Run npm run tokens -- check after changes to verify limits

    line 107
  5. Very specific:

    Run npm run tokens -- score .

    line 109
  6. Distinctive:

    Add routing clarity (INVOKES/FOR SINGLE OPERATIONS) for High score

    line 110
  7. Distinctive:

    Use skill type prefixes when appropriate

    line 111
  8. Very specific:

    Add README-style content to SKILL.md (use README.md instead)

    line 115
  9. Distinctive:

    Remove trigger or anti-trigger phrases without replacement

    line 117
  10. Very specific:

    Run npm run tokens -- check references/new-topic.md to verify limits

    line 173
  11. Very specific:

    Add link in SKILL.md under "Reference Documentation" section

    line 174
  12. Very specific:

    Create template in references/test-templates/{framework}.md

    line 194
  13. Very specific:

    Document usage in references/configuration.md

    line 195
  14. Distinctive:

    No runtime dependencies for the skill itself

    line 214

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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
AGENTS.md

AGENTS.md

Instructions for AI coding agents working with this repository.

Overview

This is Sensei, a skill for improving SKILL.md frontmatter compliance. It follows the Agent Skills specification (maintained by Anthropic).

Repository Structure

sensei/
├── SKILL.md              # Core skill (DO NOT add README-style content here)
├── README.md             # Human documentation
├── AGENTS.md             # This file - agent instructions
├── LICENSE.txt           # MIT license
├── package.json          # Root package for npm run tokens
├── .token-limits.json    # Custom token limits configuration
├── references/           # Progressive disclosure docs (loaded on-demand)
│   ├── scoring.md        # Scoring algorithm details
│   ├── mcp-integration.md # MCP tool integration patterns
│   ├── loop.md           # Ralph loop workflow
│   ├── examples.md       # Before/after transformations
│   ├── configuration.md  # Project config patterns
│   └── test-templates/   # Framework-specific test templates
│       ├── jest.md       # Jest test template
│       ├── pytest.md     # pytest test template
│       ├── waza.md       # Waza trigger test format
│       └── ...
└── scripts/              # TypeScript token management tools
    ├── package.json      # Dependencies (tsx, vitest, typescript)
    ├── tsconfig.json
    ├── vitest.config.ts
    └── src/
        ├── tokens/
        │   ├── cli.ts        # CLI entry point
        │   └── commands/
        │       ├── types.ts  # Interfaces, constants, utilities
        │       ├── utils.ts  # Config loading, file discovery
        │       ├── count.ts  # Token counting
        │       ├── check.ts  # Limit validation
        │       ├── suggest.ts # Optimization suggestions
        │       ├── compare.ts # Git-based comparison
        │       └── score.ts  # Advisory scoring
        └── gepa/
            ├── auto_evaluator.py  # GEPA auto-evaluator CLI
            └── requirements.txt   # Python dependencies (gepa)

Key Conventions

SKILL.md Format

The SKILL.md file follows Anthropic's skill specification:

---
name: skill-name          # lowercase, hyphens only
description: "**WORKFLOW SKILL** — What the skill does. WHEN: \"trigger 1\", \"trigger 2\", \"trigger 3\". INVOKES: tools/MCP servers used. FOR SINGLE OPERATIONS: when to bypass."
---

# Skill Body (Markdown)
Instructions loaded only after skill triggers.

⚠️ "DO NOT USE FOR:" is actively discouraged — causes keyword contamination on Claude Sonnet. Use inline double-quoted strings for descriptions (not >- folded scalars — incompatible with skills.sh).

Skill Type Prefixes

PrefixWhen to Use
**WORKFLOW SKILL**Multi-step orchestration, decisions
**UTILITY SKILL**Single-purpose helper
**ANALYSIS SKILL**Read-only analysis/reporting

Token Budgets

FileSoft LimitHard Limit
SKILL.md500 tokens5000 tokens
references/*.md2000 tokens—

Scoring Levels

  • Low: No triggers, short description
  • Medium: Has triggers, >60 words or missing quoted phrases
  • Medium-High: Has WHEN: (preferred) or USE FOR: with ≤60 words ← TARGET
  • High: Medium-High + routing clarity (INVOKES/FOR SINGLE OPERATIONS)

MCP Integration (when INVOKES present)

Skills that invoke MCP tools get additional checks:

  • MCP Tools Used table - Documents tool dependencies
  • Prerequisites section - Lists required tools
  • CLI fallback pattern - Fallback when MCP unavailable
  • Name collision detection - Warns when skill name matches MCP tool

See references/mcp-integration.md for patterns.

When Modifying This Skill

DO

  • Keep SKILL.md focused on instructions, not documentation
  • Use references/ for detailed explanations
  • Run npm run tokens -- check after changes to verify limits
  • Maintain the frontmatter format with WHEN: / USE FOR: (prefer positive routing)
  • Run npm run tokens -- score . to check advisory compliance
  • Add routing clarity (INVOKES/FOR SINGLE OPERATIONS) for High score
  • Use skill type prefixes when appropriate

DON'T

  • Add README-style content to SKILL.md (use README.md instead)
  • Exceed 1024 characters in the description field
  • Remove trigger or anti-trigger phrases without replacement
  • Omit INVOKES when skill calls MCP tools or other skills
  • Embed CLI commands without MCP option when MCP tools exist

Testing Changes

# Install dependencies (first time only)
cd scripts && npm install && cd ..

# Check all files against token limits
npm run tokens -- check

# Count tokens in specific files
npm run tokens -- count SKILL.md references/*.md

# Get optimization suggestions
npm run tokens -- suggest

# Compare with previous commit
npm run tokens -- compare HEAD~1

# Score skill against advisory checks
npm run tokens -- score .

# Run unit tests
cd scripts && npm test

# GEPA: Score a skill (no LLM calls)
python scripts/src/gepa/auto_evaluator.py score --skill my-skill --skills-dir skills --tests-dir tests

# GEPA: Score all skills
python scripts/src/gepa/auto_evaluator.py score-all --skills-dir skills --tests-dir tests

Token CLI Reference

npm run tokens -- count [paths...]     # Count tokens in markdown files
npm run tokens -- check [paths...]     # Check files against token limits
npm run tokens -- suggest [paths...]   # Get optimization suggestions
npm run tokens -- compare [refs...]    # Compare tokens between git refs
npm run tokens -- score [skillDir]    # Advisory checks

# Options
--format=json       # Output as JSON instead of table
--strict            # Exit with error if limits exceeded (check only)
--sort=tokens       # Sort by token count (count only)
--min-tokens=100    # Filter files below threshold (count only)

Common Tasks

Adding a New Reference File

  1. Create references/new-topic.md
  2. Run npm run tokens -- check references/new-topic.md to verify limits
  3. Add link in SKILL.md under "Reference Documentation" section

Updating Token Limits

Edit .token-limits.json:

{
  "defaults": {
    "SKILL.md": 5000,
    "references/*.md": 2000,
    "*.md": 4000
  },
  "overrides": {
    "README.md": 4000
  }
}

Adding Test Framework Support

  1. Create template in references/test-templates/{framework}.md
  2. Document usage in references/configuration.md

Commit Message Format

type: description

Examples:
- feat: add support for vitest test framework
- fix: handle multi-line descriptions in scorer
- docs: clarify token budget in scoring.md

Dependencies

  • Node.js 18+ (for token management scripts)
  • npm (for running scripts)
  • Python 3.10+ (for GEPA auto-evaluator, optional)
  • gepa package (for GEPA optimization, pip install gepa)
  • No runtime dependencies for the skill itself

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.