sync-branch
>-
compliance-audit
Audits codebases against compliance frameworks (SOC2, HIPAA, PCI-DSS, GDPR, ISO27001, etc.) using parallel agents per subdirectory/sub-repo. Produces a detailed markdown report with line-level code references. Use when you need to check a directory or monorepo for compliance violations before an audit or review.
Full skill instructions
Scan a codebase directory (single repo, multi-repo, or monorepo) against a compliance framework. Each subdirectory gets a parallel audit agent. Output is a structured markdown report where every finding references specific code lines.
On startup, use Read to load ~/.claude/skills/compliance-audit/preferences.md. If it does not exist, treat as "no preferences set".
On startup, use Bash to detect:
Skip any detection that fails.
Check $ARGUMENTS:
help → display help then stopconfig → interactive setup then stopreset → delete ~/.claude/skills/compliance-audit/preferences.md, confirm, stopCompliance Audit — Scan codebases against compliance frameworks
Usage:
/compliance-audit <standard> Audit current directory
/compliance-audit <standard> --dir <path> Audit a specific directory
/compliance-audit <standard> --output <path> Write report to specific path
/compliance-audit <standard> --severity <level> Filter by minimum severity
/compliance-audit config Set preferences
/compliance-audit reset Clear preferences
/compliance-audit help This help
Standards:
SOC2, HIPAA, PCI-DSS, GDPR, ISO27001, NIST-CSF, OWASP, CIS, FedRAMP
(or any compliance framework — latest requirements fetched from web)
Severity levels:
critical, high, medium, low (default: low — shows everything)
Examples:
/compliance-audit SOC2
/compliance-audit HIPAA --dir ./backend --output ./reports
/compliance-audit PCI-DSS --severity high "focus on payment processing modules"
/compliance-audit GDPR "check data retention and consent flows"
Current preferences:
(read from ~/.claude/skills/compliance-audit/preferences.md)
Use AskUserQuestion to collect:
./reports/, or custom pathSave to ~/.claude/skills/compliance-audit/preferences.md.
Delete ~/.claude/skills/compliance-audit/preferences.md and confirm: "Preferences cleared. Using defaults."
If no preferences file exists, show:
First time using /compliance-audit? Run
/compliance-audit configto set defaults, or just continue with sensible defaults.
Then proceed normally.
Extract from $ARGUMENTS:
<standard> — required. The compliance framework name (e.g., SOC2, HIPAA, PCI-DSS, GDPR)--output <path> — optional. Directory to write the report. Default: current directory--dir <path> — optional. Target directory to audit. Default: current directory--severity <level> — optional. Minimum severity: critical, high, medium, low. Default: lowIf <standard> is missing, use AskUserQuestion to ask which framework to audit against.
package.json (Node/JS/TS), requirements.txt/pyproject.toml (Python), Cargo.toml (Rust), go.mod (Go), Dockerfile, docker-compose.yml, .env/.env.example, CI configs{ directory: string, stack: string[], hasGit: boolean, remoteUrl?: string }Use WebSearch and WebFetch to retrieve the latest version of the specified compliance framework's technical controls:
"{standard} latest version technical controls checklist {year}"If the standard is not recognized or no good source is found, use AskUserQuestion to clarify.
For each directory unit identified in Step 2, launch a Task agent (subagent_type: "general-purpose") in parallel. Each agent receives:
Each agent MUST:
[file:line](https://remote-url/blob/branch/file#Lline)file:lineCRITICAL: No finding without a code reference. If a control cannot be mapped to a specific code location (e.g., "no encryption library found"), reference the most relevant file (e.g., package.json for missing dependencies, or the entry point file).
(pass / (pass + fail + warning)) * 100--severity filter if specifiedWrite a markdown report with this structure:
# Compliance Audit Report: {STANDARD}
**Date:** {date}
**Target:** {directory path}
**Standard:** {standard} ({version if known})
**Overall Score:** {score}% ({pass}/{total} controls passed)
## Executive Summary
{2-3 sentences summarizing the compliance posture, top risks, and priority actions}
## Summary
| Severity | Count |
|----------|-------|
| Critical | {n} |
| High | {n} |
| Medium | {n} |
| Low | {n} |
| Info | {n} |
| Passed | {n} |
## Critical & High Findings
### {Control ID}: {Control Name}
- **Severity:** Critical/High
- **Status:** Fail
- **Directory:** {subdirectory}
- **Finding:** {description}
- **Evidence:** [{file}:{line}]({remote-url}) or `{file}:{line}`
- **Recommendation:** {how to fix}
{repeat for each critical/high finding}
## Medium & Low Findings
{same format, grouped}
## Passed Controls
{brief list of controls that passed, with code references showing compliance}
## Per-Directory Breakdown
### {subdirectory-name}
- **Stack:** {detected tech stack}
- **Controls checked:** {n}
- **Score:** {score}%
- **Key findings:** {top 3 bullet points}
{repeat for each directory}
## Recommendations
1. {Priority-ordered action items}
2. ...
## Methodology
- Standard: {standard} {version}
- Source: {URL where requirements were fetched}
- Scanned: {list of directories}
- Date: {date}
--output specified: write to {output}/compliance-audit-{standard}-{date}.md./compliance-audit-{standard}-{date}.md{path}"Present a brief summary in the conversation:
Audit complete: {standard} compliance check on {directory}
Score: {score}% — {critical} critical, {high} high, {medium} medium, {low} low findings
Report: {output path}
Use AskUserQuestion to offer:
The skill should handle at minimum these frameworks (fetch latest from web):
For any standard not listed, search the web for its latest technical controls.
>-
>-
>-
>-
>-
>-
>-
>-
>-
>-
>-
>-
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience