agent-instruction-audit
Skill15 starsChanged 6 days agoMITView on GitHub
Audit Anvia (@anvia/core) agent instructions, context assembly, middlewares, and tool/runtime configuration against coding-agent operating principles, prompt-caching hygiene, and tool-schema alignment. Use when reviewing, debugging, or optimizing Anvia Agent instances and prompt-building code. Manual invocation only — do not auto-invoke unless explicitly requested by the user.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ruslanlap/agent-maintenance-skillsettheir own version, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ruslanlap/agent-maintenance-skillset★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- agent-tool-auditSkill
- changes-verificationSkill
- cheap-ui-auditSkill
- code-reviewSkill
- create-prSkill
- debuggingSkill
- engineering-decisionSkill
- formal-verificationSkill
- micro-animationSkill
- optimistic-uiSkill
- optimize-ciSkill
- oxlint-setupSkill
- test-auditSkill
- zstack-modeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Read references/agent-instruction-principles.md for Anvia-specific criteria and anti-patterns, then grade the agent setup against these 9 …
- Very specific: line 42
Keep the output strictly TL;DR (Scorecard Table + Top Issues).
- Very specific: line 43
Always inspect runtime assembly, not just static strings: Anvia concatenates [options.instructions, skills.instructions], injects …
- Very specific: line 45
Never auto-invoke agent-instruction-audit.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
Agent Instruction Audit (Anvia)
Evaluate an Anvia (@anvia/core) Agent definition, its instructions, context, skills, middlewares, and runtime options against core autonomous agent conventions, producing a concise TL;DR scorecard and gap analysis.
- Invocation: Manual-only (
disable-model-invocation: true). Run only when explicitly invoked by the user.
When to Use
- Auditing an Anvia
new Agent({ ... })setup or instruction builder for missing guardrails, behavioral drift, or conflicting directives. - Checking Anvia prompt-caching hygiene across
Agent.instructions,Agent.skills,Agent.context(Document,ContextSource,VectorContext), andonCompletionRequestmiddlewares. - Verifying alignment between
instructionsand registeredtools,mcpServers,skills,ToolIndex,toolConcurrency,maxTurns, andrequiresApproval/guardrails.
Evaluation Rubric
Read references/agent-instruction-principles.md for Anvia-specific criteria and anti-patterns, then grade the agent setup against these 9 rules:
- Autonomous Persistence: Owns tasks end-to-end without stopping for routine confirmations, and sets a sufficient
maxTurnsbudget (avoiding premature exhaustion on multi-step tool loops). - Inspect First: Reads state/files and inspects schemas or callers before mutating; zero guessing.
- Parallel Batching: Instructs parallel read/search tool calls AND enables
toolConcurrency > 1onagent.generate(...)/agent.stream(...)(noting Anvia serializes batches containingrequiresApprovalor question tools). - Dedicated Tools Over Shell: Prefers dedicated registered
createTool(...)/skills/mcpServerstools over rawexec_commandshell invocations whenever a dedicated tool exists. - Minimal Diffs: Scopes edits and mutations strictly to the task; avoids unrequested refactors or side effects.
- Self-Verification: Runs verification tools/checks after mutations and resolves failures before producing the final output (or matching
outputSchema). - Action & Workspace Safety: Protects destructive/irreversible actions structurally via
requiresApproval,Agent.guardrails, or@anvia/tool-sandboxcommand/path policies—not prose alone—and forbids reverting unrelated user changes. - Context Precedence: Separates static
instructions, progressiveskills, static/retrievedAgent.context(Document/ContextSource/VectorContext), and trailing runtime context with a clear override hierarchy. - Harness Hygiene (Anvia): Keeps
Agent.instructions,skills, andTool.definition(examples) static and deterministic for prefix caching; places volatile per-turn context at the tail; matches every referenced tool/arg name to registeredtools/mcpServers/skills/ToolIndex; contains zero conflicting rules.
Audit Workflow
- Locate & Read: Find
new Agent(...)constructors, instruction builders,createMiddleware({ onCompletionRequest })hooks,Agent.contextsources,loadSkills(...),guardrails,agent.generate(...)/agent.stream(...)call sites, and all registeredcreateTool(...)/mcpServers/ToolIndex/agent.asTool(...)definitions. - Score Each Rule: Grade every rule from 1 to 9 as
PASS,PARTIAL, orMISSING, citing exact file paths and line numbers from the codebase. - Identify Anvia Risks: Flag contradictory directives, prefix-cache breakers (timestamps,
runId,sessionId, or dynamic state interpolated intoAgent.instructionsor prepended inonCompletionRequest), bloatedcreateTool({ examples })prompt overhead,toolConcurrencybottlenecks,maxTurnsstarvation, and phantom/mismatched tool names. - Deliver TL;DR Report: Present a concise Markdown Scorecard Table (
Rule,Status,Evidence / Gap) followed by a prioritized Top Issues section with exact file/line citations and concrete Anvia fixes.
Gotchas
- Keep the output strictly TL;DR (Scorecard Table + Top Issues). Do not generate a full rewritten
instructionsblock unless the user explicitly asks for one. - Always inspect runtime assembly, not just static strings: Anvia concatenates
[options.instructions, skills.instructions], injectsAgent.contextdocuments before non-systemchatHistory(orderedRequestMessages), and allowsonCompletionRequestmiddleware to mutaterequest.instructionsorrequest.chatHistoryper turn. - Remember
createTool({ examples })appends worked examples to every tool'sdescriptionon every turn—flag verbose examples that bloat the static prefix. - Never auto-invoke
agent-instruction-audit; wait for explicit user activation.
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.

