repo-compliance-audit

repo-compliance-audit is a skill for Claude Code, Codex from okwinds/miscellany. It costs 160 tokens per session (1,215 once invoked), scanned A, original, MIT.

A code-repository compliance audit that checks project rules, documentation, testing evidence, reproducibility, secrets, and repository cleanliness, then produces Markdown and JSON reports.

In plain words
What is it for?
Use it to review an unfamiliar repository, perform a pre-delivery check, create an evidence-based audit report, or prepare a selected list of low-risk fixes.
Why use it?
It helps find rule violations, missing records, weak test evidence, leaked credentials, and other delivery risks before they cause problems. Optional fixes require a person to choose specific findings and avoid changing business logic by default.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it to review an unfamiliar repository, perform a pre-delivery check, create an evidence-based audit report, or prepare a selected list of low-risk fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/okwinds/miscellany/repo-compliance-audit
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 okwinds/miscellany --skill repo-compliance-audit
Clone the repo
git clone --depth 1 https://github.com/okwinds/miscellany

Made for: Claude Code, Codex.

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 repo-compliance-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/okwinds/miscellany/repo-compliance-audit/github.svg)](https://agentmods.dev/skills/okwinds/miscellany/repo-compliance-audit)
Your own site
<a href="https://agentmods.dev/skills/okwinds/miscellany/repo-compliance-audit"><img src="https://agentmods.dev/badge/skills/okwinds/miscellany/repo-compliance-audit/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 repo-compliance-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/okwinds/miscellany/repo-compliance-audit"><img src="https://agentmods.dev/badge/skills/okwinds/miscellany/repo-compliance-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 160 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,215 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.00160 $0.01215
Opus 5 $0.00080 $0.00607
Sonnet 5 $0.00032 $0.00243
Haiku 4.5 $0.00016 $0.00121

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

Security

Grade A, and why

repo-compliance-audit 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/audit_repo.py, scripts/remediate_repo.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.

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.

agent/skills/repo-compliance-audit/SKILL.md · 88 lines

How it starts

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

Repo Compliance Audit

本 skill 提供一个两阶段工作流:先审计出报告,再由人类勾选需要整改的条目,最后执行选择性整改。核心目标是“合规审查可取证”和“整改最小化、默认不改业务逻辑”。

工作流(Audit → 人类勾选 → Remediation)

1) Audit(只读审计,默认不改仓库)

在目标仓库根目录运行(或用 --repo 指定):

python3 scripts/audit_repo.py --repo . --out /tmp/repo-compliance-audit

输出:

  • report.md:人类可读审计报告(结论摘要、风险分级、证据、整改清单)
  • findings.json:机器可读发现列表(包含 finding.id、证据与建议修复)

CI / 门禁用法(可选):

python3 scripts/audit_repo.py --repo . --out /tmp/repo-compliance-audit --fail-on high

推荐门禁策略(面向“执行过程对齐 AGENTS.md”)

  • 最小门禁(推荐默认):用 --fail-on high,主要拦截:
    • 规则文件完整性高风险:AGENTS_MD_DELETED / AGENTS_MD_MODIFIED
    • 过程证据高风险:AGENTS_EXECUTION_TEST_EVIDENCE_MISSING
    • 明显安全风险:POSSIBLE_SECRET_FOUND
  • 严格门禁(按需启用):用 --fail-on medium,会额外拦截:
    • Spec-first 证据缺失类(例如 SPEC_ENTRYPOINT_MISSINGAGENTS_EXECUTION_SPEC_FIRST_EVIDENCE_MISSING
    • worklog 过程证据缺失类(例如 AGENTS_EXECUTION_WORKLOG_EVIDENCE_MISSING

输出脱敏(共享报告时建议开启):

# 仅脱敏 report.md(保留 findings.json 供系统编排/整改使用)
python3 scripts/audit_repo.py --repo . --out /tmp/repo-compliance-audit --redact report

# report.md + findings.json 均脱敏(对外共享)
python3 scripts/audit_repo.py --repo . --out /tmp/repo-compliance-audit --redact all

降低泄露/噪声(可选):

python3 scripts/audit_repo.py --repo . --out /tmp/repo-compliance-audit --no-git-meta
python3 scripts/audit_repo.py --repo . --out /tmp/repo-compliance-audit --no-secret-scan

2) 人类勾选要整改的条目

report.mdfindings.json 里选择 finding.id,用逗号分隔或写入文件。

3) Remediation(选择性整改,默认只跑 safe-to-autofix)

python3 scripts/remediate_repo.py \
  --repo . \
  --findings /tmp/repo-compliance-audit/findings.json \
  --select DOCS_INDEX_MISSING,ENV_EXAMPLE_MISSING

约束:

  • 默认仅执行 safe_to_autofix=true 的修复项
  • 默认不覆盖已有文件(除非显式 --overwrite
  • 默认不改业务逻辑(只做“合规骨架/证据/仓库卫生”类修复)

输出如何被系统使用(强结构 vs 生态兼容)

  • 控制面强结构findings.json 用于系统级交互(可编排、可审计、可做门禁)。
  • 对人类生态友好report.md 以可读性优先,不强制结构化 JSON。
  • 避免每个节点都强制结构化:仅在“门禁/节点确实需要机器可读判断”时启用 --fail-on 或只对某些 finding 做 gate。
  • 规则文件完整性优先:如果你关注编码智能体的规则被“删除/篡改”,可以重点关注审计输出中的 AGENTS_MD_DELETED/AGENTS_MD_MODIFIED/AGENTS_MD_UNTRACKED(基于 git 取证,若非 git 仓库则仅能提示)。

Read the full file on GitHub · 88 lines

Files

What ships with it

5 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. 11d ago First seen · 88 lines · 160 tokens per session scan A 41aaca180e3c

Subscribe to this mod's changes

repo-compliance-audit is a skill published in the GitHub repository okwinds/miscellany (50 stars, last pushed 4mo ago), licensed MIT. It adds 160 tokens to every session and 1,215 once invoked, about $0.0008 per session on Opus 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-30.

Related

Other skills, from other repositories

specification-writing

A workflow for writing complete patent specifications from patent claims and an invention disclosure. It adapts the document to a chosen jurisdiction, such as the US, Europe, or China.

wanshuiyin/Auto-claude-code-research-in-sleep · 49 tokens

regulatory-research-fallback

Fallback workflow for regulatory research when web extraction tools fail on government PDFs.

HKUDS/OpenSpace · 20 tokens

x-scorecard

OpenSSF Scorecard for assessing open source project security. Check security best practices and compliance. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill for installation options). see x-cmd skill for installation.

x-cmd/x-cmd · 57 tokens

gesellschaftsrechtliche-satzungen-agb

Für Gesellschaftsrechtliche Satzungen AGB Abgrenzung: ordnet Norm, Beweislast und Gegenargument; Ergebnis: Prüfprodukt mit Risiko und nächstem Schritt. Fachgebiet: AGB-Recht-Prüfer. Route: gesellschaftsrechtliche-satzungen-agb.

Klotzkette/claude-fuer-deutsches-recht · 69 tokens

memstack-business-gdpr

Use this skill when the user says 'GDPR', 'data protection', 'privacy compliance', 'DPA', 'DSAR', 'data subject request', 'cookie consent', 'privacy audit', 'CCPA', or asks 'do I need GDPR for this repo'. Scans the repository to detect what personal data is collected, classifies sensitivity, determines whether GDPR…

cwinvestments/memstack · 121 tokens

nda-review

Use when the user uploads or pastes a non-disclosure agreement and asks for review, redline, risk assessment, or a recommendation on whether to sign. Identifies missing standard protections, one-sided or unusual provisions, and operational issues; produces a structured report with severity ratings and citations to…

LegalQuants/lq-ai · 79 tokens