All skills
mblode avatar

/ax-audit

@57eb304
by Matthew Blodemblode/agent-skills134 stars
12

Audits agentic products for tool parity, authority, approval payloads, recovery, and trust using 27 rules and a ship verdict. Use when asked for an "AX audit", to review an agent approval flow, or whether an agent can operate the product. For human-facing API ergonomics use dx-audit; for ordinary UI use ui-design.

Use this Skill: https://skilld.dev/gh/mblode/agent-skills/ax-audit

This session only. Nothing lands on disk.

rules-archcontext-starvation.md

≈751 tokens on demand. Your agent reads this file only when SKILL.md points to it.

System prompt missing resource injection

System prompt says "You are a helpful assistant" with zero dynamic context. Agent asks "What files do you have?" instead of using them. Violates Improvement Over Time: agents should accumulate context, not start blind.

What goes wrong

User opens a project management agent. System prompt has role instructions but nothing about 3 active projects or 12 unread notifications. First message: "What would you like to work on today?"

Detection

Surfaces: agent-config

Static signals:

  1. Find system prompt assembly: string templates, prompt builders, message arrays.
  2. Check whether the prompt injects: (a) available resources, (b) capabilities, (c) recent activity.
  3. Flag prompts missing any of the three.

Concrete commands:

rg 'role:\s*["\x27]system["\x27]' --type=ts -A 10 src/ | rg -v '\$\{|concat|join|append'
rg '(availableResources|recentActivity|capabilities|context\.md)' --type=ts src/

Judgment signals:

  • Missing any of the three sections is the usual fail (too little).
  • A prompt that injects every tool and every procedure on every run also fails: the run should carry what this task needs, not the whole product. A small agent with a short resident toolset is not this.

False-positive guards:

  • Skip files with // ax-audit-ignore:context-starvation.
  • Skip test files and fixtures.
  • Skip prompts that delegate context loading to a separate init step.
  • Just-in-time retrieval counts. A prompt that names what exists and hands the agent a read_context or list_* tool to fetch the rest passes the resources section; the fail is data that is neither present nor discoverable.

Fix

// before
const messages = [{ role: "system", content: "You are a helpful assistant." }, ...userMessages];

// after: inject Available Data, What You Can Do, Recent Context
const ctx = await loadProjectContext(session.userId);
const messages = [
  { role: "system", content: `You are an assistant.\n\n## Available Data\n${ctx.resources}\n\n## Capabilities\n${ctx.capabilities}\n\n## Recent Context\n${ctx.recent}` },
  ...userMessages,
];

Default tier and overrides

Defaults to: fix-this-sprint

Surface Tier
Agent config fix-this-sprint

Examples

Anti-pattern (fails):

const messages = [{ role: "system", content: "You are a helpful assistant." }];

Applied (passes):

const ctx = await loadProjectContext(userId);
const messages = [{ role: "system", content: `You assist with code.\n\n${ctx.format()}` }];

Suppression

// ax-audit-ignore:context-starvation, bootstrapping prompt, context injected by middleware
const basePrompt = "You are a helpful assistant.";

Source: SKILL.md on GitHub

No alerts13d3 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    The skill is a specialized auditing framework for AI agent products, focusing on architectural integrity and user trust. It uses standard shell tools for static analysis of codebases. The analysis found no malicious behavior, obfuscation, or data exfiltration risks.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

Signed by skilld at 57eb304. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for mblode/agent-skills/ax-audit