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:…
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,736 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 repository162 other files it gives its agents.
- agents/AGENTS.mdAGENTS.md
- skills/compound-engineering/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- examples/CLAUDE.mdCLAUDE.md
- skills/compound-engineering/CLAUDE.mdCLAUDE.md
- skills/trailofbits-security/CLAUDE.mdCLAUDE.md
- app-store-reviewSkill
- advanced-javascriptSkill
- ai-native-uiSkill
- anime-jsSkill
- app-l100Skill
- barba-jsSkill
- brand-guidelinesSkill
- cinematic-web-engineSkill
- codebase-knowledge-graphSkill
- crossplatform-monorepoSkill
- css-first-uiSkill
- design-auditSkill
- design-critiqueSkill
- dev-cycleSkill
- device-hardware-bridgeSkill
- discovery-docSkill
- docxSkill
- edge-intelligenceSkill
- graph-aware-reviewSkill
- linkedin-posterSkill
- local-first-architectureSkill
- modern-build-pipelineSkill
- motion-nativeSkill
- nano-bananaSkill
- playwrightSkill
- pptxSkill
- project-initSkill
- remotionSkill
- sensory-nativeSkill
- spline-3dSkill
- streaming-cacheSkill
- tanstack-ecosystemSkill
- design-taste-frontendSkill
- tauri-desktopSkill
- threejsSkill
- transition-nativeSkill
- ui-design-stackSkill
- visual-nativeSkill
- web-l100Skill
- web-platform-apisSkill
- xlsxSkill
- better-authSkill
- claude-real-videoSkill
- clone-websiteSkill
- css-keyframe-animationsSkill
- design-checkSkill
- design-dnaSkill
- design-polishSkill
- drizzle-neonSkill
- fastlaneSkill
- angular-architectSkill
- api-designerSkill
- architecture-designerSkill
- atlassian-mcpSkill
- The first 60 shown.
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
- Very specific: line 31
For Claude: Use the claude-code-guide subagent for plugin/skill questions - it has access to official documentation.
- Very specific: line 41
Do not add .agents/plugins/marketplace.json, .codex/, or plugins/<name>/.codex-plugin/.
- Very specific: line 42
Keep plugin components at the plugin root using Codex-compatible default paths: skills/, hooks/hooks.json, .mcp.json, and .app.json.
- Very specific: line 43
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.
- Distinctive: line 51
If this check fails in CI, update the canonical Claude marketplace or plugin root components so Codex can load them through Claude …
- Very specific: line 95
Use {baseDir} for paths, never hardcode absolute paths
- Very specific: line 96
Use forward slashes (/) even on Windows
- Distinctive: line 100
When skills include Python scripts with dependencies:
- Very specific: line 115
Include
pyproject.toml: - Keep in scripts/ for development tooling (ruff, etc.) - Distinctive: line 145
Behavioral guidance over reference dumps: - Don't paste entire specs.
- Very specific: line 159
Every SKILL.md must include:
- Very specific: line 180
Keep SKILL.md under 500 lines - split into references/, workflows/
- Distinctive: line 181
Use progressive disclosure - quick start first, details in linked files
≈ “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.
Files
Contributing Skills
Resources
Official Anthropic documentation (always check these first):
- Claude Code Plugins
- Agent Skills
- Best Practices
- Skill Authoring Best Practices — progressive disclosure, degrees of freedom, workflow checklists
- The Complete Guide to Building Skills (text) — evaluation-driven development, iterative testing
Reference skills - learn by example at different complexity levels:
| Complexity | Skill | What It Demonstrates |
| Basic | ask-questions-if-underspecified | Minimal frontmatter, simple guidance |
| Intermediate | constant-time-analysis | Python package, references/, language-specific docs |
| Advanced | culture-index | Scripts, workflows/, templates/, PDF extraction, multiple entry points |
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-reviewis a standout routing + progressive disclosure example
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/, orplugins/<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.jsonat 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 documentationImportant: 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, notconstantTimeAnalysis - Gerund form preferred:
analyzing-contracts,processing-pdfs(notcontract-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:
- Use PEP 723 inline metadata - Declare dependencies in the script header:
# /// script # requires-python = ">=3.11" # dependencies = ["requests>=2.28", "pydantic>=2.0"] # /// - Use
uv run- Enables automatic dependency resolution:uv run {baseDir}/scripts/process.py input.pdf - Include
pyproject.toml- Keep inscripts/for development tooling (ruff, etc.) - 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
nameanddescription - Name is kebab-case, ≤64 characters
- All referenced files exist
- No hardcoded paths (
/Users/...,/home/...) python3 .github/scripts/check_claude_loadability.pypassespython3 .github/scripts/check_codex_loadability.pypasses
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)
- To find the GitHub username: run
Version updates (for existing plugins):
- Increment version in both
plugins/<name>/.claude-plugin/plugin.jsonand the root.claude-plugin/marketplace.jsonwhen making substantive changes (clients only update plugins when the version number increases) - Ensure version numbers match between the plugin's
plugin.jsonand its entry in the root.claude-plugin/marketplace.json
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.

