agentleFS
jatinmishrajatinmishra/claude-skills-monorepo/agentic-audit/SKILL.md

agentic-audit

Skill0 starsChanged 22 days agoMITView on GitHub

Audits the full multi-tool agentic setup (AGENTS.md, Claude Code, GitHub Copilot, Cursor, Codex) against context engineering and security best practices. Covers cross-tool consistency, security guardrails, prompt injection surfaces, destructive command guards, and token efficiency. Use when the user invokes /agentic-audit, adds new agents/skills, onboards a new AI tool, or does periodic health checks on the agentic setup.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After adding new agents, skills, or onboarding a new AI tool

    line 17
  2. Distinctive:

    After auditing each tool individually, check for consistency across all tools present:

    line 129
  3. Distinctive:

    Only flag real issues backed by evidence

    line 155
  4. Distinctive:

    Every finding must reference a specific principle from Step 3 or Step 9

    line 156

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

Agentic Setup Audit

When to Use

  • User invokes /agentic-audit
  • After adding new agents, skills, or onboarding a new AI tool
  • Periodic health checks on the agentic setup

When NOT to Use

  • Mid-session code reviews or task progress checks
  • Single-file edits that don't touch agent/skill configuration

Perform a comprehensive audit of the full multi-tool AI configuration against context engineering and security best practices. Sources: Anthropic Claude Code Security docs, OpenAI Codex Agent Approvals & Security, GitHub Agentic Workflows Security Architecture, Anthropic "Effective Context Engineering for AI Agents" guide, Cursor security guidance, and the AGENTS.md open standard.

Core Principle

Find the smallest set of high-signal tokens that maximize the likelihood of the desired outcome — across every tool in the stack. And ensure no agent can take an action the developer did not explicitly approve.

Context is finite. Agent authority is a liability until constrained. Both must be managed deliberately.


Audit Workflow

Copy this checklist and track progress:

Audit Progress:
- [ ] Step 1: Discover and Measure
- [ ] Step 2: Audit AGENTS.md
- [ ] Step 3: Security Guardrail Audit
- [ ] Step 4: Audit Claude Code
- [ ] Step 5: Audit OpenAI Codex
- [ ] Step 6: Audit GitHub Copilot
- [ ] Step 7: Audit Cursor
- [ ] Step 8: Cross-Tool Consistency
- [ ] Step 9: Context Engineering Checklist
- [ ] Step 10: Quality Safety Check
- [ ] Step 11: Present Findings
StepWhatReference
1Discover and Measure — scan all tool config files, detect active tools, measure token budgetBelow
2Audit AGENTS.md — cross-tool standard validationBelow
3Security Guardrail Audit — highest priorityreferences/security-audit.md
4Audit Claude Code — agents, skills, CLAUDE.md, coding standardsreferences/tool-audits.md
5Audit OpenAI Codex — instructions, lessons, configreferences/tool-audits.md
6Audit GitHub Copilot — instructions, prompts, copilot-instructionsreferences/tool-audits.md
7Audit Cursor — rules, rule types, legacy .cursorrulesreferences/tool-audits.md
8Cross-Tool Consistency — convention alignment across all toolsBelow
9Context Engineering Checklist — 10 universal principlesreferences/context-engineering.md
10Quality Safety Check — verify optimizations don't degrade outputreferences/context-engineering.md
11Present Findings — structured output formatreferences/findings-format.md

Step 1 — Discover and Measure

1a. Scan for all tool config files

ToolConfig files
AGENTS.mdAGENTS.md, AGENTS.override.md at any directory level
Claude CodeCLAUDE.md, CLAUDE.local.md, .claude/settings.json, .claude/agents/*.md, .claude/skills/*/SKILL.md, .claude/commands/*.md, .mcp.json, plus any files these import or reference (project-context docs, coding-standard docs — wherever the repo keeps them, e.g. docs/ or a shared .agents/ folder)
Codex.codex/config.toml, .codex/agents/*.toml, .codex/rules/default.rules, any lessons/learnings file the project keeps for agents
Copilot.github/copilot-instructions.md, .github/instructions/*.instructions.md, .github/prompts/*.prompt.md
Cursor.cursor/rules/*.mdc (or .md), .cursor/cli.json, .cursorignore, .cursorrules (legacy)
GeminiGEMINI.md

1b. Detect which tools are actively used

A missing config file is a finding only if that tool is actively used. Check for activity signals: .claude/ directory, .codex/config.toml, .github/copilot-instructions.md, .cursor/ directory, GEMINI.md.

1c. Measure token budget

For every always-loaded file, estimate token count (~1 token per 4 chars) and report a budget table. Flag any always-loaded file exceeding 1,500 tokens — context rot research shows accuracy degrades with token count even within the supported window. Exception: AGENTS.md is the single source of truth and is judged against the 32 KiB limit in Step 2, not this threshold.


Step 2 — Audit AGENTS.md (Cross-Tool Standard)

AGENTS.md is the most impactful file — read by 30+ tools including Copilot, Cursor, Codex, Devin, Jules, Gemini CLI.

Content completeness — all six elements should be present:

  1. Project overview — what the app does, audience, key features
  2. Repository layout and key directories
  3. Build, test, and lint commands (validated by actually running them)
  4. Engineering conventions and architecture rules
  5. Constraints and restrictions (security, deployment targets, framework policies)
  6. Routing map to skill/instruction files for deeper context

Size: Total combined AGENTS.md chain ≤ 32 KiB (Codex default project_doc_max_bytes).

Hierarchy integrity: Nested AGENTS.override.md files specialize (not contradict) the parent.

No duplication: AGENTS.md owns cross-tool conventions. Tool-specific content belongs in that tool's own config.


Step 3 — Security Guardrail Audit

Read references/security-audit.md for the full checklist. This is the highest-priority step — run before individual tool audits.

Covers: minimal privilege, destructive operation guards, prompt injection surfaces, secrets scanning, write-operation approval gates, MCP security, audit trail, and tool-specific security checks for Claude Code, Codex, Copilot, and Cursor.


Steps 4–7 — Tool-Specific Audits

Read references/tool-audits.md for detailed checklists covering Claude Code (Step 4), OpenAI Codex (Step 5), GitHub Copilot (Step 6), and Cursor (Step 7).


Step 8 — Cross-Tool Consistency Check

After auditing each tool individually, check for consistency across all tools present:

CheckWhat to look for
Convention alignmentDo all tools agree on branch naming, commit format, PR conventions?
Testing policyDo all tools agree on the testing framework and conventions?
Platform version policyDo all tools agree on deployment target and language version baseline?
Architecture rulesDo all tools agree on module boundaries, DI patterns, inter-module communication?
Security policyIs the security ruleset consistent and present across tools?
Write-gate consistencyThe "no write without approval" principle must be present in every tool's always-loaded config
Content ownershipIs each convention owned by exactly one file? No duplication
Coverage gapsIs a critical convention missing from ALL tools?
Shared file awarenessAGENTS.md is read by multiple tools — verify no tool-specific content leaked in

Steps 9–11 — Context Engineering, Quality Safety, and Findings

Read reference files for detailed guidance:

  • references/context-engineering.md — 10 universal context engineering principles + quality safety checks
  • references/findings-format.md — output format, severity levels, priority rules

Rules

  • This is a read-only audit — do NOT modify any files
  • Security findings are never deprioritized for token savings
  • Only flag real issues backed by evidence
  • Every finding must reference a specific principle from Step 3 or Step 9

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.