/auto-audit:badge [--no-readme]from auto-audit
Installs auto-audit badges in a repo: publishes live status JSON to the autoaudit/status branch for a shields.io endpoint badge, and optionally opens a PR adding a static badge to the README.
Ships in auto-audit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are installing two things on the currently-active audited repo:
.auto-audit/status.json on a dedicated autoaudit/status branch. This is force-pushed by the plugin on every scan/merge so the shields.io endpoint badge reflects real state. It's not a PR — the plugin owns the branch.README.md. This is opened as a normal PR the user can accept or close.By default, do both. If the user passed --no-readme, skip the README PR and only publish the status branch.
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/common.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/state.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/git.sh"
SLUG="$(active_slug)" || { echo "no active auto-audit; run /auto-audit:start first" >&2; exit 1; }
with_lock "$SLUG"
WORKSPACE="$(workspace_dir)"
NO_README=0
case "${1:-}" in --no-readme) NO_README=1 ;; esac
Always do this. The status JSON reflects whatever the findings queue looks like right now — empty queue = clean badge, pending findings = N findings badge, confirmed critical = critical badge.
STATUS_JSON="$(bash "${CLAUDE_PLUGIN_ROOT}/scripts/status-json.sh")"
publish_status_branch "$STATUS_JSON"
iterations_append "badge_status_published" "" "$(echo "$STATUS_JSON" | jq -c '.message, .color | tostring' | paste -sd' ')"
echo "published status: $(echo "$STATUS_JSON" | jq -r .message) ($(echo "$STATUS_JSON" | jq -r .color))"
The shields.io URL the user puts in their README:
https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F<OWNER>%2F<REPO>%2Fautoaudit%2Fstatus%2F.auto-audit%2Fstatus.json
Print that URL to the user with <OWNER>/<REPO> filled in from config.json's .url.
--no-readme)if [ "$NO_README" -eq 0 ]; then
BRANCH="autoaudit/badge"
# Refresh the workspace to the default branch before branching so we
# don't trip guard_not_default_branch: we need to *leave* the default
# branch for the edit.
default="$(default_branch)"
git -C "$WORKSPACE" fetch origin "$default" 1>&2
git -C "$WORKSPACE" checkout "$default" 1>&2
git -C "$WORKSPACE" reset --hard "origin/$default" 1>&2
git -C "$WORKSPACE" branch -D "$BRANCH" 2>/dev/null || true
git -C "$WORKSPACE" checkout -b "$BRANCH" 1>&2
ensure_readme_badge
rc=$?
case "$rc" in
0)
SHA="$(commit_all "badge" "docs: add auto-audit badge" "See https://auto-audit.hesketh.pro")"
push_branch "$BRANCH"
TITLE="docs: add auto-audit badge"
BODY_FILE="$(mktemp)"
cat > "$BODY_FILE" <<'EOF'
Adds a static badge to the README indicating this repo is audited by
[auto-audit](https://auto-audit.hesketh.pro). Decline this PR if you'd
rather not show the badge — the plugin will still work either way.
The companion **dynamic status badge** is available too. The plugin
publishes `.auto-audit/status.json` to the `autoaudit/status` branch on
every scan. Add this markdown snippet anywhere in your README to render
it (replace `OWNER/REPO`):
Colour follows severity:
- `auto-audit: clean` (green) — no open findings
- `auto-audit: N findings` (amber) — findings pending
- `auto-audit: critical` (red) — at least one confirmed critical
---
_Generated by the auto-audit plugin. See https://auto-audit.hesketh.pro ._
EOF
PR_JSON="$(pr_open "$BRANCH" "$TITLE" "$BODY_FILE")"
rm -f "$BODY_FILE"
echo "README badge PR: $(echo "$PR_JSON" | jq -r .url)"
iterations_append "badge_pr_opened" "" "$(echo "$PR_JSON" | jq -r .url)"
;;
1) echo "README already has the badge — no PR needed" ;;
2) echo "no README.md in target repo — skipping README badge (status branch still published)" ;;
esac
fi
End with a one-line summary the loop operator can read:
badge: status=<color> readme_pr=<url|skipped|already-present|no-readme>
autoaudit/* — publish_status_branch and push_branch both enforce this.commit_all refuses.gh auth is missing or the user doesn't have write access to the target repo, the push will fail and the tick aborts cleanly.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
auto-audit@wrxck-claude-plugins is listed by wrxck/claude-plugins — review the source before installing
npx claudepluginhub wrxck/claude-plugins --plugin auto-audit9 skills in this plugin
/audit-securityScan the active auto-audit workspace for security vulnerabilities and add any new findings to the queue. Run as part of /auto-audit:start or periodically via /auto-audit:tick rescans. Uses LLM-based code review plus available CLI scanners (npm audit, pip-audit, gitleaks-like regexes)./feedbackRecord operator feedback against the active repo's audit so future triager and fixer runs incorporate it. Use when the user says 'don't write that pattern again', 'I reverted that PR because X', 'the triager got this one wrong', or 'remember this for next time'. The reviewer is independent and does NOT read this log — that's deliberate./reportGenerate a self-contained HTML audit report for the active repo (or a named one). The report includes summary stats, per-finding triage / PoC / fix / review detail, and the full activity log. Use when the user says 'generate a report', 'export findings', 'build the audit summary', 'write up the audit'./resumeResume a stopped or previously-interrupted autonomous audit without re-initialising the workspace. Re-establishes the active repo pointer and kicks off the loop again. Use when the user says 'resume auto-audit', 'continue the audit', or after a session restart./startAutonomously audit a GitHub repo. Clones the repo, runs a full audit scan (security by default), then kicks off a continuous loop that triages findings, writes proofs of concept, fixes issues in PRs, independently reviews, and merges. Use when the user says things like 'audit my repo', 'scan repo X for security issues', 'start auto-audit on <repo>'./statusShow the current state of the autonomous audit: active repo, findings breakdown by status, recent activity, next pending finding. Use when the user asks 'what's auto-audit doing?', 'audit status', 'audit progress'.Other plugins' skills for the same job