Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Audit Agentsmd

ASecurity

Audit AGENTS.md (or CLAUDE.md) for length, attention-zone misplacement, and extraction opportunities. Produces a prioritized report with reordering and extraction recommendations. Use when AGENTS.md exceeds 400 lines, after major additions, or when agent instruction compliance is poor.

39 stars
0 votes
0 copies
0 views
Added 9/20/2026
ai-agentsgorails

Works with

cli

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add benjaminshoemaker/ai_coding_project_base --skill audit-agentsmd --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Audit Agentsmd?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Audit Agentsmd
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/benjaminshoemaker-audit-agentsmd/badge)](https://www.skillsdirectory.com/skills/benjaminshoemaker-audit-agentsmd)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: audit-agentsmd
description: Audit AGENTS.md (or CLAUDE.md) for length, attention-zone misplacement, and extraction opportunities. Produces a prioritized report with reordering and extraction recommendations. Use when AGENTS.md exceeds 400 lines, after major additions, or when agent instruction compliance is poor.
---

# Audit AGENTS.md

Analyzes an AGENTS.md (or CLAUDE.md) file for structural problems that cause AI agents to miss critical instructions — primarily length bloat and attention-zone misplacement.

## Why This Matters

LLMs exhibit a well-documented "lost in the middle" effect: instructions at the start (primacy) and end (recency) of long context get significantly higher attention than those in the middle. A 500+ line AGENTS.md has a ~60% "dead zone" where behavioral rules are likely to be ignored. This audit identifies misplacements and recommends fixes.

## Workflow

Copy this checklist and track progress:

```
Audit Progress:
- [ ] Step 1: Locate and measure the file
- [ ] Step 2: Parse section structure
- [ ] Step 3: Classify each section
- [ ] Step 4: Map to attention zones
- [ ] Step 5: Identify misplacements
- [ ] Step 6: Recommend extractions
- [ ] Step 7: Output report
```

### Step 1: Locate and Measure

Find the target file. Check in order:
1. Argument path (if provided via `$ARGUMENTS`)
2. `./AGENTS.md`
3. `./CLAUDE.md`

Record the line count. Flag if over 500 lines (Anthropic's recommended maximum for SKILL.md files, equally applicable to AGENTS.md when inlined via `@`).

If the file is under 300 lines, report "No structural issues — file is within optimal range" and stop.

### Step 2: Parse Section Structure

Identify every `## ` heading. For each section, record:
- Section name
- Start line number
- End line number (start of next section or EOF)
- Line count
- Whether it contains code blocks (count code block lines separately)

Use Grep to find headings, then Read to measure each section.

### Step 3: Classify Each Section

Classify every section into one of two categories using the rules in [EXTRACTION_RULES.md](EXTRACTION_RULES.md):

| Category | Description | Extraction Safety |
|----------|-------------|-------------------|
| **Behavioral** | Rules, guardrails, policies agents must always follow | UNSAFE to extract — must stay inline |
| **Reference** | Lookup material needed only for specific task types | SAFE to extract to docs/ |

**Key heuristic**: If the section contains words like NEVER, MUST, ALWAYS, "do not", or establishes a rule that applies to every task — it is behavioral. If it contains code examples, schema definitions, or step-by-step processes needed only situationally — it is reference.

### Step 4: Map to Attention Zones

Using the total line count, calculate the attention zones per [ATTENTION_MODEL.md](ATTENTION_MODEL.md):

| Zone | Range | Attention Level |
|------|-------|-----------------|
| Primacy | First ~20% of lines | **Strong** |
| Fade | ~20-35% | Moderate, declining |
| Dead zone | ~35-65% | **Weakest** |
| Recovery | ~65-80% | Moderate, rising |
| Recency | Last ~20% of lines | **Strong** |

Map each section's midpoint to a zone.

### Step 5: Identify Misplacements

Flag these anti-patterns:

**Critical misplacements (fix first):**
- Behavioral section in the dead zone → agent likely ignores the rule
- Reference section in the primacy zone → wastes highest-attention position on lookup material

**Medium misplacements:**
- Behavioral section in fade/recovery zone → rule may be partially followed
- Large code blocks (>20 lines) in primacy zone → displaces behavioral content

**Low priority:**
- Reference section in recency zone → not harmful but wastes prime position
- Duplicate/overlapping sections → consolidation opportunity

### Step 6: Recommend Extractions

For each reference section, evaluate extraction safety:

1. **Safe to extract**: Pure reference — code examples, schema details, process templates, syntax guides. Claude reads these on-demand when encountering a relevant task.
2. **Partially extractable**: Contains both a behavioral rule AND detailed process. Keep the rule stub inline (3-5 lines), extract the process details.
3. **Must stay inline**: Pure behavioral — guardrails, session workflows, policies. If removed, agents won't read the linked file proactively.

See [EXTRACTION_RULES.md](EXTRACTION_RULES.md) for the full classification checklist.

Calculate projected line count after recommended extractions.

### Step 7: Output Report

```markdown
# AGENTS.md Audit Report

Generated: {date}
File: {path}
Lines: {count} ({over/under} 500-line target)
Sections: {count}
Code block lines: {count} ({percent}% of file)

## Attention Zone Map

| Zone | Lines | Sections | Issues |
|------|-------|----------|--------|
| Primacy (1–{N}) | {list} | {count of behavioral vs reference} |
| ...

## Critical Misplacements

{For each: section name, current zone, recommended zone, why}

## Extraction Candidates

| Section | Lines | Category | Action |
|---------|-------|----------|--------|
| {name} | {N} | Safe to extract | → docs/{filename}.md |
| {name} | {N} | Partial | Keep {N}-line stub, extract {N} lines |
| {name} | {N} | Must stay inline | — |

## Recommended Section Order

{Numbered list showing optimal ordering:}
1. {Behavioral sections → primacy zone}
2. {Core patterns → early-middle}
3. {Reference/situational → middle}
4. {Process/workflow → late}
5. {Reminders section → EOF}

## Projected Result

| Metric | Before | After |
|--------|--------|-------|
| Total lines | {N} | {N} |
| Behavioral in dead zone | {N} sections | 0 |
| Reference in primacy zone | {N} sections | 0 |

## Reminders Section (Recommended)

If the file exceeds 300 lines, recommend adding a "## Reminders (Critical)"
section at EOF that repeats the 5-6 most important behavioral rules in
one-line form. This exploits recency bias to reinforce primacy-zone rules.
```

## Error Handling

| Situation | Action |
|-----------|--------|
| No AGENTS.md or CLAUDE.md found | Report "No agent instruction file found" and stop |
| File under 300 lines | Report "No structural issues" and stop |
| File uses `@` imports | Note that imported content is inlined — audit the combined effective content |
| CLAUDE.md contains only `@AGENTS.md` | Audit AGENTS.md (it's the real content) |

---

**REMINDER**: The goal is not to make AGENTS.md as short as possible — it's to ensure behavioral rules are in high-attention zones and reference material is either in low-attention zones or extracted to on-demand files. A 450-line file with good ordering beats a 300-line file missing critical context.

Attribution

benjaminshoemakerbenjaminshoemaker
View sourceMore from benjaminshoemaker →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman

Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.

1023331 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3331 votes

catchup

Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.

611 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →