audit-coverage

audit-coverage is a command for Claude Code from authzed/authzed-marketplace. It costs 33 tokens per session (1,578 once invoked), scanned A, original, Apache-2.0.

A code audit for SpiceDB, a system that stores application permissions. It compares permissions declared in a `.zed` schema with permission checks found in the code.

In plain words
What is it for?
Use it to list every schema permission, scan the codebase for `CheckPermission` calls, and produce a matrix showing which permissions are checked and which are not.
Why use it?
It reveals permissions that exist in the design but are not checked by the application. This helps find authorization gaps before unprotected actions reach users.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the spicedb-dev plugin — 8 skills, 15 commands, 3 agents shipped together

Good fit Use it to list every schema permission, scan the codebase for CheckPermission calls, and produce a matrix showing which permissions are checked and which are not.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/authzed/authzed-marketplace/audit-coverage
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/authzed/authzed-marketplace

Made for: Claude Code.

Or install spicedb-dev, the plugin that ships this one along with the rest of its 8 skills, 15 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audit-coverage

README.md
[![agentmods](https://agentmods.dev/badge/commands/authzed/authzed-marketplace/audit-coverage/github.svg)](https://agentmods.dev/commands/authzed/authzed-marketplace/audit-coverage)
Your own site
<a href="https://agentmods.dev/commands/authzed/authzed-marketplace/audit-coverage"><img src="https://agentmods.dev/badge/commands/authzed/authzed-marketplace/audit-coverage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for audit-coverage

Your own site · 80×15
<a href="https://agentmods.dev/commands/authzed/authzed-marketplace/audit-coverage"><img src="https://agentmods.dev/badge/commands/authzed/authzed-marketplace/audit-coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,578 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.01578
Opus 5.5 $0.00013 $0.00631
Sonnet 5.5 $0.00007 $0.00316
Haiku 4.5 $0.00003 $0.00158

Measured 1mo ago against content hash c219b286dc51, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

audit-coverage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

spicedb-dev/commands/audit-coverage.md · 181 lines

How it starts

The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Audit Authorization Coverage

Produce a coverage matrix: for every permission declared in the schema, report whether an explicit CheckPermission call exists in application code.

Progress Tracking

Before starting, use TaskCreate to create a task for each step. Use TaskUpdate to mark each task in_progress when starting and completed when done.

Process

Step 1: Locate Schema

  • Use provided path if given
  • Otherwise glob for *.zed in current directory
  • If multiple found, ask with AskUserQuestion

Step 2: Parse Schema for Permission Inventory

Read the .zed file. Extract every definition name and every permission name declared within each definition. Build a list of (definition, permission) pairs. Example: document: [view, edit, delete] organization: [view, manage] project: [view, edit, delete, manage]

Step 3: Detect Language

Grep for CheckPermission call patterns to detect language:

  • Go: CheckPermission(ctx
  • TypeScript: checkPermission(
  • Python: CheckPermission(CheckPermissionRequest

Ask if ambiguous.

Step 4: Inventory Existing Checks

Grep the codebase for all existing CheckPermission calls. For each, extract the ObjectType and Permission string values.

Go patterns: ObjectType: ObjectType:\s+"([^"]+)" Permission: Permission:\s+"([^"]+)"

TypeScript patterns: objectType: objectType:\s+'([^']+)' permission: permission:\s+'([^']+)'

Python patterns: object_type: object_type="([^"]+)" permission: permission="([^"]+)"

Record: (object_type, permission, file, approximate line) for each match.

Step 5: Inventory Relationship Writes

Grep the codebase for WriteRelationships and DeleteRelationships calls. For each, extract the ObjectType of the resource being written.

Go pattern: ObjectType:\s+"([^"]+)" near WriteRelationships TypeScript: objectType:\s+'([^']+)' near writeRelationships Python: object_type="([^"]+)" near WriteRelationships

For each resource type in the schema, check:

  • ✅ Has write: at least one WriteRelationships call uses this object type
  • ❌ No write: no WriteRelationships call found for this resource type (SpiceDB will have no relationships to evaluate -- all checks will return NO_PERMISSION)
  • ✅ Has delete: at least one DeleteRelationships call cleans up this resource type on deletion
  • ⚠️ Missing delete: resource type has no DeleteRelationships cleanup (orphaned relationships remain after resource deletion)

Read the full file on GitHub · 181 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 181 lines · 33 tokens per session scan A c219b286dc51

Subscribe to this mod's changes

audit-coverage is a command published in the GitHub repository authzed/authzed-marketplace (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 33 tokens to every session and 1,578 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.