cairo-auditor

cairo-auditor is a skill for Claude Code, Codex from keep-starknet-strange/starknet-agentic. It costs 47 tokens per session (6,786 once invoked), scanned A, original, MIT.

A security review workflow for Cairo code, the programming language used for Starknet smart contracts.

In plain words
What is it for?
Use it to audit a Cairo/Starknet repository, run deeper adversarial checks, or review selected contract files.
Why use it?
It searches for contract security problems and combines findings into one structured report.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present. Also seen: mentions Claude Code; mentions Codex; $skill-name invocation.

Part of the cairo-auditor plugin — 1 skill shipped together

Good fit Use it to audit a Cairo/Starknet repository, run deeper adversarial checks, or review selected contract files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/keep-starknet-strange/starknet-agentic/cairo-auditor
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.

Any agent
npx skills add keep-starknet-strange/starknet-agentic --skill cairo-auditor
Clone the repo
git clone --depth 1 https://github.com/keep-starknet-strange/starknet-agentic

Made for: Claude Code, Codex.

Or install cairo-auditor, the plugin that ships this one along with the rest of its 1 skill.

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 cairo-auditor

README.md
[![agentmods](https://agentmods.dev/badge/skills/keep-starknet-strange/starknet-agentic/cairo-auditor/github.svg)](https://agentmods.dev/skills/keep-starknet-strange/starknet-agentic/cairo-auditor)
Your own site
<a href="https://agentmods.dev/skills/keep-starknet-strange/starknet-agentic/cairo-auditor"><img src="https://agentmods.dev/badge/skills/keep-starknet-strange/starknet-agentic/cairo-auditor/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 cairo-auditor

Your own site · 80×15
<a href="https://agentmods.dev/skills/keep-starknet-strange/starknet-agentic/cairo-auditor"><img src="https://agentmods.dev/badge/skills/keep-starknet-strange/starknet-agentic/cairo-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,786 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high System Prompt Leakage · line 450
    Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
    Fix: Remove any instructions that reveal, print, or output system prompts or internal rules. System instructions should never be exposed to end users.
  • medium Data Exfiltration · line 106
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Privilege Escalation · line 153
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 160
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 173
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
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.00047 $0.06786
Opus 5 $0.00023 $0.03393
Sonnet 5 $0.00009 $0.01357
Haiku 4.5 $0.00005 $0.00679

Measured 10d ago against content hash 220d4e18c4ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

cairo-auditor scanned grade A with 2 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 10d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/doctor.sh, scripts/quality/audit_local_repo.py, scripts/quality/deep_integrity.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Otherwise create one with `mktemp -d "${TMPDIR:-/tmp}/cairo-auditor.XXXXXX"` and `chmod 700`.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `command -v curl` must succeed, and
skills/cairo-auditor/SKILL.md · 460 lines

How it starts

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

Cairo/Starknet Security Audit

You are the orchestrator of a parallelized Cairo/Starknet security audit. Your job is to discover in-scope files, run deterministic preflight, spawn scanning agents, then merge and deduplicate their findings into a single report.

Quick Start

Starknet.js Examples

import { Account, Contract, RpcProvider } from "starknet";

const provider = new RpcProvider({ nodeUrl: process.env.STARKNET_RPC! });
const account = new Account({ provider, address: process.env.ACCOUNT_ADDRESS!, signer: process.env.PRIVATE_KEY! });
const contract = new Contract({ abi, address: process.env.CONTRACT_ADDRESS!, providerOrAccount: account });

try {
  // View call for quick sanity checks while triaging findings.
  const owner = await contract.call("owner", []);

  // State-changing probe used during exploit-path validation.
  const tx = await contract.invoke("set_owner", [owner]);
  const receipt = await provider.waitForTransaction(tx.transaction_hash);
  console.log({ finality: receipt.finality_status });
} catch (err) {
  console.error("audit probe failed", err);
}

Error Codes and Recovery

Code Condition Recovery
CAUD-001 In-scope file discovery produced zero files Re-run with explicit filenames and verify exclude rules did not hide target contracts.
CAUD-002 Preflight scan failed or unavailable Run python3 "{skill_root}/scripts/quality/audit_local_repo.py" manually and attach output to the audit context.
CAUD-003 Agent bundle generation failed Rebuild {workdir}/cairo-audit-agent-*-bundle.md and confirm each bundle has non-zero line count.
CAUD-004 Conflicting findings across agents Keep the highest-confidence root cause, then request a focused re-run on the disputed file.
CAUD-005 Report includes only low-confidence items Re-run deep mode with the host-specific cairo-auditor entrypoint (for example, /starknet-agentic-skills:cairo-auditor deep in Claude Code) and add deterministic checks from Semgrep/audit findings.
CAUD-006 Deep mode requested but specialist agents unavailable Re-run in an environment with Agent tool support. Where fail-closed enforcement is enabled, --allow-degraded explicitly permits fallback.
CAUD-007 Deep mode host capability preflight failed For hosts with preflight enforcement enabled, surface remediation and stop before findings unless --allow-degraded is explicitly present.
CAUD-008 Agent transport instability or stalled specialist completion Retry failed/stalled specialists once. In hosts with deep-mode enforcement enabled, unresolved specialist outages are treated as fail-closed unless explicitly degraded.
CAUD-009 Strict-model requirement could not be satisfied Re-run on a host that supports required models, or omit --strict-models to allow documented fallback.

Read the full file on GitHub · 460 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 460 lines · 47 tokens per session scan A 220d4e18c4ae

Subscribe to this mod's changes

cairo-auditor is a skill published in the GitHub repository keep-starknet-strange/starknet-agentic (80 stars, last pushed 2d ago), licensed MIT. It adds 47 tokens to every session and 6,786 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.