agentleFS
Leo-AtienzaLeo-Atienza/atlas-claude/skills/trailofbits-security/AGENTS.md

atlas-claude / trailofbits-security

AGENTS.md4 starsChanged 4 months agoMITView on GitHub

Official Anthropic documentation (always check these first): Reference skills - learn by example at different complexity levels: When in doubt, copy one of these and adapt it. Deep dives on skill authoring: - Claude Skills Deep Dive - Comprehensive analysis of skill architecture Example plugins worth studying: - superpowers - Advanced workflow patterns, TDD enforcement, multi-skill orchestration - compound-engineering-plugin - Production plugin structure - getsentry/skills — Production Sentry skills; security-review is a standout routing + progressive disclosure example For Claude:…

The file

Show its rules and text

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

13 rules. About 0 are common, 4 are distinctive, and 9 are 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.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    For Claude: Use the claude-code-guide subagent for plugin/skill questions - it has access to official documentation.

    line 31
  2. Very specific:

    Do not add .agents/plugins/marketplace.json, .codex/, or plugins/<name>/.codex-plugin/.

    line 41
  3. Very specific:

    Keep plugin components at the plugin root using Codex-compatible default paths: skills/, hooks/hooks.json, .mcp.json, and .app.json.

    line 42
  4. Very specific:

    If a plugin needs MCP configuration, put it in .mcp.json at the plugin root rather than embedding an object in .claude-plugin/plugin.json.

    line 43
  5. Distinctive:

    If this check fails in CI, update the canonical Claude marketplace or plugin root components so Codex can load them through Claude …

    line 51
  6. Very specific:

    Use {baseDir} for paths, never hardcode absolute paths

    line 95
  7. Very specific:

    Use forward slashes (/) even on Windows

    line 96
  8. Distinctive:

    When skills include Python scripts with dependencies:

    line 100
  9. Very specific:

    Include pyproject.toml: - Keep in scripts/ for development tooling (ruff, etc.)

    line 115
  10. Distinctive:

    Behavioral guidance over reference dumps: - Don't paste entire specs.

    line 145
  11. Very specific:

    Every SKILL.md must include:

    line 159
  12. Very specific:

    Keep SKILL.md under 500 lines - split into references/, workflows/

    line 180
  13. Distinctive:

    Use progressive disclosure - quick start first, details in linked files

    line 181

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

Contributing Skills

Resources

Official Anthropic documentation (always check these first):

Reference skills - learn by example at different complexity levels:

ComplexitySkillWhat It Demonstrates
Basicask-questions-if-underspecifiedMinimal frontmatter, simple guidance
Intermediateconstant-time-analysisPython package, references/, language-specific docs
Advancedculture-indexScripts, workflows/, templates/, PDF extraction, multiple entry points

When in doubt, copy one of these and adapt it.

Deep dives on skill authoring:

Example plugins worth studying:

For Claude: Use the claude-code-guide subagent for plugin/skill questions - it has access to official documentation.

Technical Reference

Codex Compatibility

This repository uses Claude plugin marketplace metadata as the canonical source for both Claude Code and Codex. Codex supports .claude-plugin/marketplace.json and plugins/<name>/.claude-plugin/plugin.json directly, so do not add duplicate Codex-only sidecar metadata.

Rules:

  • Do not add .agents/plugins/marketplace.json, .codex/, or plugins/<name>/.codex-plugin/.
  • Keep plugin components at the plugin root using Codex-compatible default paths: skills/, hooks/hooks.json, .mcp.json, and .app.json.
  • If a plugin needs MCP configuration, put it in .mcp.json at the plugin root rather than embedding an object in .claude-plugin/plugin.json.
  • Before submitting, run:
python3 .github/scripts/check_claude_loadability.py
python3 .github/scripts/check_codex_loadability.py
  • If this check fails in CI, update the canonical Claude marketplace or plugin root components so Codex can load them through Claude marketplace compatibility.

Plugin Structure

plugins/
  <plugin-name>/
    .claude-plugin/
      plugin.json         # Plugin metadata (name, version, description, author)
    commands/             # Optional: slash commands
    agents/               # Optional: autonomous agents
    skills/               # Optional: knowledge/guidance
      <skill-name>/
        SKILL.md          # Entry point with frontmatter
        references/       # Optional: detailed docs
        workflows/        # Optional: step-by-step guides
        scripts/          # Optional: utility scripts
    hooks/                # Optional: event hooks
    README.md             # Plugin documentation

Important: Component directories (skills/, commands/, agents/, hooks/) must be at the plugin root, NOT inside .claude-plugin/. Only plugin.json belongs in .claude-plugin/.

Frontmatter

---
name: skill-name              # kebab-case, max 64 chars
description: "Third-person description of what it does and when to use it"
allowed-tools:                # Optional: restrict to needed tools only
  - Read
  - Grep
---

Naming Conventions

  • kebab-case: constant-time-analysis, not constantTimeAnalysis
  • Gerund form preferred: analyzing-contracts, processing-pdfs (not contract-analyzer, pdf-processor)
  • Avoid vague names: helper, utils, tools, misc
  • Avoid reserved words: anthropic, claude

Path Handling

  • Use {baseDir} for paths, never hardcode absolute paths
  • Use forward slashes (/) even on Windows

Python Scripts

When skills include Python scripts with dependencies:

  1. Use PEP 723 inline metadata - Declare dependencies in the script header:
    # /// script
    # requires-python = ">=3.11"
    # dependencies = ["requests>=2.28", "pydantic>=2.0"]
    # ///
  2. Use uv run - Enables automatic dependency resolution:
    uv run {baseDir}/scripts/process.py input.pdf
  3. Include pyproject.toml - Keep in scripts/ for development tooling (ruff, etc.)
  4. Document system dependencies - List non-Python deps (poppler, tesseract) in workflows with platform-specific install commands

Hooks

PreToolUse hooks run on every Bash command—performance is critical:

  • Prefer shell + jq over Python—interpreter startup (Python + tree-sitter) adds noticeable latency
  • Fast-fail early - exit 0 immediately for non-matching commands so most invocations are instant
  • Favor regex over AST parsing - accept rare false positives if performance gain is significant and Claude can rephrase
  • Anticipate false positive patterns - diagnostic commands (which python), search tools (grep python), and filenames (cat python.txt) shouldn't trigger interception
  • Document tradeoffs in PR descriptions so reviewers understand deliberate design choices

Quality Standards

These are Trail of Bits house standards on top of Anthropic's requirements.

Description Quality

Your skill competes with 100+ others. The description must trigger correctly.

  • Third-person voice: "Analyzes X" not "I help with X"
  • Include triggers: "Use when auditing Solidity" not just "Smart contract tool"
  • Be specific: "Detects reentrancy vulnerabilities" not "Helps with security"

Value-Add

Skills should provide guidance Claude doesn't already have, not duplicate reference material.

  • Behavioral guidance over reference dumps - Don't paste entire specs; teach when and how to look things up
  • Explain WHY, not just WHAT - Include trade-offs, decision criteria, judgment calls
  • Document anti-patterns WITH explanations - Say why something is wrong, not just that it's wrong

Example: The DWARF skill doesn't include the full DWARF spec. It teaches Claude how to use dwarfdump, readelf, and pyelftools to look up what it needs, plus judgment about when each tool is appropriate.

Scope Boundaries

Prescriptiveness should match task risk:

  • Strict for fragile tasks - Security audits, crypto implementations, compliance checks need rigid step-by-step enforcement
  • Flexible for variable tasks - Code exploration, documentation, refactoring can offer options and judgment calls

Required Sections

Every SKILL.md must include:

## When to Use
[Specific scenarios where this skill applies]

## When NOT to Use
[Scenarios where another approach is better]

Security Skills

For audit/security skills, also include:

## Rationalizations to Reject
[Common shortcuts or rationalizations that lead to missed findings]

Content Organization

  • Keep SKILL.md under 500 lines - split into references/, workflows/
  • Use progressive disclosure - quick start first, details in linked files
  • One level deep - SKILL.md links to files, files don't chain to more files

Note: Directory depth is fine (references/guides/topic.md). Reference chains are not (SKILL.md → file1.md → file2.md where file1 references file2). The problem is chained references, not nested folders.

Progressive Disclosure Pattern

## Quick Start
[Core instructions here]

## Advanced Usage
See [ADVANCED.md](references/ADVANCED.md) for detailed patterns.

## API Reference
See [API.md](references/API.md) for complete method documentation.

PR Checklist

Before submitting:

Technical (CI validates these):

  • Valid YAML frontmatter with name and description
  • Name is kebab-case, ≤64 characters
  • All referenced files exist
  • No hardcoded paths (/Users/..., /home/...)
  • python3 .github/scripts/check_claude_loadability.py passes
  • python3 .github/scripts/check_codex_loadability.py passes

Quality (reviewers check these):

  • Description triggers correctly (third-person, specific)
  • "When to use" and "When NOT to use" sections present
  • Examples are concrete (input → output)
  • Explains WHY, not just WHAT

Documentation:

  • Plugin has README.md
  • Added to root README.md table
  • Registered in root .claude-plugin/marketplace.json (repo-level, not the plugin's own .claude-plugin/)
  • Added to CODEOWNERS with plugin-specific ownership (/plugins/<name>/ @gh-username @dguido)
    • To find the GitHub username: run gh api user --jq .login (most reliable — uses authenticated GitHub identity)

Version updates (for existing plugins):

  • Increment version in both plugins/<name>/.claude-plugin/plugin.json and the root .claude-plugin/marketplace.json when making substantive changes (clients only update plugins when the version number increases)
  • Ensure version numbers match between the plugin's plugin.json and its entry in the root .claude-plugin/marketplace.json

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.