Skip to content
/

cc-audit

cc-audit · sisyphusse1-ops/cc-audit · ★ 0 · last commit 2026-05-10

Primitive shape
No installable primitives
00

Summary

cc-audit — Summary

cc-audit is a single-file Python script (~240 lines, no dependencies) that lints CLAUDE.md or AGENTS.md files against a 12-rule baseline for AI coding agents, detecting missing rules, leaked secrets, and files past the 200-line compliance cliff.

Problem it solves: Most agent configuration files miss critical baseline rules — a scan of 492 public CLAUDE.md files found median compliance of 3/12 rules, with 98% missing "don't edit out of scope." cc-audit provides a fast, zero-install check that can run in CI via a GitHub Action.

Distinctive trait: Minimal design philosophy — one Python file, no dependencies, ~240 lines. Pairs with the claude-code-pro-pack methodology (sisyphusse1-ops/claude-code-pro-pack) as a CI gate for CLAUDE.md quality. The 12 rules are explicitly borrowed from the pro-pack's methodology.

Target audience: Developers and teams who want a lightweight CI gate to prevent CLAUDE.md regressions (leaked secrets, missing baseline rules) on every pull request.

Production-readiness: Minimal/experimental (0 stars, MIT, Python). Last commit May 2026. The value is in the GitHub Action integration and the empirical data (492 public file scan published on dev.to).

Differs from seeds: cc-audit is the smallest framework in the corpus — a single Python checker closer to a linting utility than a framework. It is most similar to AgentLint (harness quality checking) but far simpler: 12 keyword-signal rules vs AgentLint's 58 evidence-backed checks, no CLI flags beyond --json, no interactive mode, no hook validation. The 12 rules are a subset of what AgentLint checks but framed around a specific companion methodology (claude-code-pro-pack).

01

Overview

cc-audit — Overview

Origin

cc-audit was created by sisyphusse1-ops as a companion linter to the claude-code-pro-pack methodology. The 12-rule baseline it checks against comes directly from that companion project.

Philosophy

Minimal and zero-dependency by design:

"One Python file, no dependencies, ~240 lines. Pairs with claude-code-pro-pack."

The project shares empirical data: a scan of 492 public CLAUDE.md files from GitHub code search, published on dev.to. Headline numbers:

  • Median compliance: 3/12
  • Perfect (12/12): 0
  • Leaked production secrets: 0
  • Most-missed: "don't edit out of scope" (98% missed)

The 12 Rules Checked

  1. Think before coding — surface tradeoffs and assumptions
  2. Simplicity first — minimum code for the problem
  3. Surgical changes — touch only relevant code, match existing style
  4. Goal-driven execution — define success criteria upfront, verify before done
  5. Don't make the model do non-language work — route deterministic logic through code
  6. Hard token budget — cap per-task token spend
  7. Surface conflicts — don't average two incompatible patterns
  8. Read before you write — understand adjacent code first
  9. Tests gated by correctness — assert behavior, not shape
  10. Checkpoints for long operations — commit between multi-step changes
  11. Convention beats novelty — follow established patterns
  12. Fail visibly — surface partial failures, skipped rows, truncated output

Secret Detection Patterns

ANTI_PATTERNS = [
    (r"paypal\.me/[\w-]+",        "leaked paypal link"),
    (r"ghp_[A-Za-z0-9]{10,}",    "leaked GitHub PAT token"),
    (r"sk-[A-Za-z0-9]{20,}",     "leaked API key (sk-...)"),
    (r"\bAKIA[0-9A-Z]{16}\b",    "leaked AWS access key"),
    (r"\bpassword\s*[:=]\s*['\""]", "literal password in clear text"),
]
02

Architecture

cc-audit — Architecture

Distribution

  • Type: Single Python script + GitHub Action
  • License: MIT
  • No pip package — direct curl download

Install Methods

# One-time, zero install
curl -fsSL https://raw.githubusercontent.com/sisyphusse1-ops/cc-audit/main/cc_audit.py -o cc_audit.py
python3 cc_audit.py CLAUDE.md

# GitHub Action
uses: sisyphusse1-ops/cc-audit@v1

Required Runtime

  • Python 3 (no dependencies — stdlib only)

Directory Structure

cc-audit/
├── cc_audit.py          # Single-file Python linter (~240 lines)
├── action.yml           # GitHub Action definition
├── data/
│   └── scan-500.json    # Dataset: 492 public CLAUDE.md scan results
├── README.md
└── LICENSE

GitHub Action Inputs

Input Default Description
path auto Path to file; auto-detects CLAUDE.md or AGENTS.md
fail-on-warning false Exit non-zero on warnings
json-output empty Path to write JSON report

GitHub Action Outputs

Output Description
score 0-100 compliance score
rules-hit Number of baseline rules covered, 0-12
leaked-secrets Count of leaked-secret patterns detected
status pass, warn, or fail

Exit Codes

  • 0 — pass
  • 1 — warn (missing rules, size over limit)
  • 2 — fail (critical: leaked secrets)

Score Formula

def score(self) -> int:
    base = int(len(self.rules_hit) / len(RULE_SIGNALS) * 80)  # rules: 80%
    base += 10 if self.has_project_specifics else 0            # +10 for project section
    base += 10 if not self.anti_patterns else 0                # +10 for no secrets
    if self.size_warning: base -= 10                            # -10 over 200 lines
    return max(0, min(100, base))
03

Components

cc-audit — Components

Scripts (1)

Name Purpose
cc_audit.py Single-file Python linter: reads CLAUDE.md/AGENTS.md, checks 12 rule keyword signals, detects 5 secret patterns, validates project-specifics section, reports score

GitHub Action (1)

Name Purpose
action.yml CI integration: runs cc_audit.py on PR/push for CLAUDE.md/AGENTS.md changes; exports score, rules-hit, leaked-secrets, status as Action outputs

Data (1)

Name Purpose
data/scan-500.json Dataset of 492 public CLAUDE.md files scored against the 12-rule baseline; empirical evidence for the checker

No Commands, Skills, Hooks, MCP, or Subagents

cc-audit is a standalone Python utility. It has no Claude Code integration, no hooks, and no interactive mode beyond --json flag.

Check Types

Category Implementation
File existence Path.exists() check
Size check Line count vs COMPLIANCE_CLIFF = 200
Rule signals Regex keyword match (permissive — any signal word counts)
Project-specifics Regex for project-specific or project specific section
Secret patterns 5 regex patterns for PAT, AWS key, API key, PayPal link, clear-text password
YAML frontmatter Basic validity check if frontmatter is present

Rule Signal Matching (permissive)

Rules are detected by keyword presence anywhere in the file. Example:

("3: surgical changes",
 ["surgical", "touch only", "adjacent code", "match existing style"]),

A rule is "covered" if any signal word appears. Deliberately permissive — the goal is "rule mentioned at all" not "rule stated correctly."

05

Prompts

cc-audit — Prompts

cc-audit is a Python script, not an AI-powered system. It has no LLM calls and no prompts. The "rules" are regex keyword signals, not prompts.

Rule Signal Patterns (from cc_audit.py)

Technique: Keyword-signal enumeration. Each rule maps to a list of acceptable signal words — any match counts as "rule covered." Deliberately permissive — the checker does not validate rule quality, only presence.

RULE_SIGNALS: list[tuple[str, list[str]]] = [
    ("1: think before coding",
     ["assumption", "think before", "surface tradeoffs", "push back"]),
    ("2: simplicity first",
     ["simplicity", "minimum code", "speculative", "simplest"]),
    ("3: surgical changes",
     ["surgical", "touch only", "adjacent code", "match existing style"]),
    ("4: goal-driven execution",
     ["goal-driven", "success criteria", "define success", "until verified"]),
    ("5: don't make the model do non-language work",
     ["non-language", "deterministic code", "deterministic logic",
      "retry policy", "routing is code"]),
    ("6: hard token budget",
     ["token budget", "budget", "spiral", "ceiling", "re-chew"]),
    ("7: surface conflicts",
     ["surface conflict", "two pattern", "pick one", "conflict"]),
    ("8: read before you write",
     ["read before", "understand adjacent", "adjacent code"]),
    ("9: tests gated by correctness",
     ["tests are gated", "behavior, not shape", "assertions", "not just"]),
    ("10: checkpoints for long operations",
     ["checkpoint", "long-running", "commit between", "multi-step"]),
    ("11: convention beats novelty",
     ["convention", "established pattern", "novelty"]),
    ("12: fail visibly",
     ["fail visibly", "partial failure", "silent", "skipped rows",
      "truncated output"]),
]

Secret Detection Patterns

ANTI_PATTERNS: list[tuple[str, str]] = [
    (r"paypal\.me/[\w-]+",           "leaked paypal link — remove before committing"),
    (r"ghp_[A-Za-z0-9]{10,}",       "leaked GitHub PAT token"),
    (r"sk-[A-Za-z0-9]{20,}",        "leaked API key (sk-...)"),
    (r"\bAKIA[0-9A-Z]{16}\b",       "leaked AWS access key"),
    (r"\bpassword\s*[:=]\s*['\"]",  "literal password in clear text"),
]

Note: No AI-generated prompts exist in this framework. All "checking" is deterministic regex matching.

09

Uniqueness

cc-audit — Uniqueness

Differs from Seeds

cc-audit is closest to AgentLint (harness quality checking via static analysis of CLAUDE.md/AGENTS.md) but is dramatically simpler: one Python file, no dependencies, 12 rules vs 58 checks, keyword-signal matching vs sophisticated multi-dimensional analysis. Unlike AgentLint, cc-audit has no Claude Code integration, no interactive mode, no harness-specific checks (no hook validation). The GitHub Action integration is its primary deployment mechanism, making it a CI gate rather than a developer workflow tool. No seed framework directly matches — the closest analogy is a simplified version of one dimension of AgentLint deployed as a GitHub Action.

Key Differentiators

  1. Zero dependencies: Pure Python stdlib. curl | python3 install — no npm, no pip.
  2. GitHub Action first: The Action integration is the primary use case, not the CLI.
  3. Empirical data: Published a scan of 492 real CLAUDE.md files with compliance statistics.
  4. Companion to claude-code-pro-pack: The 12 rules are explicitly borrowed from a companion methodology project.
  5. Minimalism: ~240 lines is a design constraint, not an accident.

Positioning

cc-audit occupies the "CI gate for CLAUDE.md quality" niche — the simplest possible tool to prevent CLAUDE.md regressions in a pull request workflow. It is not a comprehensive harness auditor (that's AgentLint) and not a methodology framework (that's any of the seed frameworks). It is a sanity check that takes <1 second to run.

Observable Failure Modes

  • Keyword-signal gaming: Any file containing the word "surgical" passes rule 3, regardless of meaning.
  • False positives on secrets: sk- prefix is common in non-secret strings (e.g., skip-, skeleton-).
  • No YAML frontmatter depth: Basic validity only, not semantic check.
  • Static keyword list: New valid phrasings for rules are not detected until the signal list is updated.
  • No size calibration: 200-line cliff is a fixed constant, not project-dependent.

Companion Project

sisyphusse1-ops/claude-code-pro-pack — the source of the 12-rule baseline. cc-audit is the CI gate; claude-code-pro-pack is the methodology that defines the rules.

04

Workflow

cc-audit — Workflow

CLI Workflow

python3 cc_audit.py [path] [--json]
  → Detect CLAUDE.md or AGENTS.md (or use explicit path)
  → Check file existence and size
  → Match 12-rule keyword signals
  → Check project-specifics section
  → Scan for 5 secret patterns
  → Validate YAML frontmatter (if present)
  → Output: score (0-100), missing rules, anti-patterns found
  → Exit: 0 (pass) / 1 (warn) / 2 (fail/secrets)

CI Workflow (GitHub Action)

PR opened/pushed with CLAUDE.md or AGENTS.md changes
  → action.yml triggers cc_audit.py
  → Results posted to GitHub Actions run summary
  → Outputs: score, rules-hit, leaked-secrets, status
  → Build fails on leaked secrets (exit 2)
  → Build warns (exit 1) on missing rules (unless fail-on-warning=true)

Phase-to-Artifact Map

Phase Artifact
CLI run stdout: compliance report
CLI run with --json JSON file at specified path
GitHub Action Action outputs (score, rules-hit, leaked-secrets, status)

Approval Gates

None — fully automated.

No Planning, No Tasks, No Specs

cc-audit is a validator only. It does not generate plans, tasks, or any workflow artifacts.

06

Memory Context

cc-audit — Memory & Context

State Storage

None. cc-audit is a stateless Python script.

Persistence Model

None — each run is independent.

Context Injection

None — cc-audit has no Claude Code integration and injects no context.

Compaction Handling

Not applicable.

Cross-Session Handoff

The GitHub Action outputs (score, rules-hit) are the only persistent artifacts — they exist as GitHub Actions metadata in CI.

07

Orchestration

cc-audit — Orchestration

No orchestration. cc-audit is a single-file Python script with no agents, no subprocesses, no LLM calls, and no multi-step execution beyond sequential regex checks.

Execution Mode

One-shot.

All Other Dimensions

Not applicable — cc-audit has no multi-agent, multi-model, isolation, consensus, or chaining capabilities.

08

Ui Cli Surface

cc-audit — UI / CLI Surface

CLI

python3 cc_audit.py                    # scans ./CLAUDE.md, ./AGENTS.md
python3 cc_audit.py path/to/file.md    # explicit path
python3 cc_audit.py --json             # machine-readable output

No binary — invoked directly as python3 cc_audit.py. No pip install required.

GitHub Actions Integration

The primary production use case. The Action runs on PR/push to CLAUDE.md or AGENTS.md and posts a compliance report to the Actions run summary.

Output Example

cc-audit: path/to/CLAUDE.md

Score: 42/100
Rules hit: 5/12
Missing rules:
  - 5: don't make the model do non-language work
  - 6: hard token budget
  - 7: surface conflicts
  ...
No leaked secrets detected.
Size warning: 243 lines (cliff: 200)

With --json:

{
  "path": "CLAUDE.md",
  "exists": true,
  "lines": 243,
  "score": 42,
  "rules_hit": [...],
  "rules_missing": [...],
  "anti_patterns": [],
  "has_project_specifics": true,
  "size_warning": "file is 243 lines (past the 200-line compliance cliff)"
}

No Dashboard, No TUI

Purely CLI and CI. No interactive mode, no web UI.

Related frameworks

same archetype · same primary tool · same memory type

OpenHarness ★ 13k

Open-source Python agent runtime providing complete harness infrastructure: tools, memory, governance, swarm coordination, and…

Trae Agent ★ 12k

Research-friendly open-source CLI coding agent by ByteDance, designed for academic ablation studies and modular LLM provider…

Sweep AI ★ 7.7k

Autonomous GitHub bot that converts issues to pull requests using a sequential multi-agent pipeline.

Agent Governance Toolkit (microsoft) ★ 2.3k

Enterprise-grade AI agent governance: YAML policy enforcement, 12-vector prompt injection defense, zero-trust identity,…

TDD Guard ★ 2.1k

Mechanically enforces the Red-Green-Refactor TDD cycle by blocking file writes that violate TDD principles via a PreToolUse hook…

Agentic Coding Flywheel Setup (ACFS) ★ 1.5k

Take a complete beginner from laptop to three AI coding agents running on a VPS in 30 minutes via an idempotent manifest-driven…