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-archparity-no-tool-parity.md

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

UI action with no agent tool equivalent

A route or UI handler performs an operation no available tool exposes. User asks the agent to do it; it says "I can't do that." Parity means the agent can do everything the user can do.

Scope: codebase-wide. This rule enumerates every mutating handler that ships today against the whole tool registry, so it fires on gaps nobody introduced in this PR. Run it in full-sweep mode or when auditing a config surface. For gaps the diff under review adds, use parity-orphan-ui-action, which is diff-scoped and tiered lower because new drift has an owner in the room.

What goes wrong

UI has an "Archive" button calling POST /api/projects/:id/archive, but no tool exposes the endpoint. The agent responds "I don't have the ability to archive projects."

Detection

Surfaces: agent-config

Static signals:

  1. Enumerate every mutating handler in the tree, not only changed files: POST/PUT/PATCH/DELETE route exports, server actions, form actions.
  2. Enumerate the full tool registry.
  3. Match one list against the other by operation, not by name; archive_project and POST /projects/:id/archive are the same capability under different spellings.
  4. Report the unmatched handlers as a list. An empty grep is not a pass here: cite the handler count you compared.

Concrete commands:

rg -l 'export (async )?function (POST|PUT|PATCH|DELETE)' --type=ts src/app/api/ | sort   # handler inventory
rg -o 'name:\s*["\x27]\w+' --no-filename --type=ts src/tools/ | sed 's/.*["\x27]//' | sort   # tool inventory
rg -c 'export (async )?function (POST|PUT|PATCH|DELETE)' --type=ts src/app/api/ | wc -l   # count to cite

False-positive guards:

  • Skip health-check endpoints (/api/health), webhook receivers, test files.
  • Skip files with // ax-audit-ignore:parity-no-tool-parity.

Fix

For every UI capability, ensure an equivalent tool exists.

// before: route exists, no tool
// POST /api/projects/[id]/archive exists; no archive_project tool

// after: tool mirrors the UI action
export const archiveProject = tool({
  name: "archive_project",
  description: "Archive a project by ID.",
  parameters: { projectId: { type: "string", required: true } },
  execute: async ({ projectId }) => api.post(`/projects/${projectId}/archive`),
});

Default tier and overrides

Defaults to: release-blocker: a missing tool is a hard wall the agent cannot work around.

Surface Tier
Agent tool execution release-blocker
Agent config release-blocker

Config does not taper: a GUI-only setting is exactly the capability gap this rule exists to catch.

Examples

Anti-pattern (fails):

// Route handler exists, tools array has no archive tool
export const tools = [createProject, listProjects, getProject];

Applied (passes):

export const tools = [createProject, listProjects, getProject, archiveProject];

Suppression

// ax-audit-ignore:parity-no-tool-parity, internal admin endpoint
export async function POST(req: Request) { ... }

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