Skip to content
cccskills
FreePublished on GitHub

repo-audit

Use this skill when the user wants to audit a repository for baseline compliance, check code quality, security posture, CI/CD setup, testing, documentation, and ecosystem configuration. Runs 9 checklist categories and emits a Markdown report plus JSON sidecar at .orchestrator/metrics/repo-audit-<timestamp>.json. <example>Context: User is in a project repo and wants a baseline compliance check. user: "/repo-audit" assistant: "Running repo-audit across 9 categories — Configuration, Code Quality, Git Hygiene, CI/CD, Testing, Security, Documentation, Clank Integration (optional), and MCP Configuration. Will produce a Markdown checklist report and JSON sidecar." <commentary>The user wants a compliance check; this skill is appropriate because it runs all 9 categories with pass/fail/warn/skipped statuses and writes structured output.</commentary></example>

The English summary is being prepared. Showing the original description.

Kanevry/session-orchestrator52 stars(GitHub 52 + cccskills 0)

Run score Not tested

See how to install

Files included (1)

  • SKILL.md13.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Repo Audit Skill

Perform a comprehensive audit of the host repository against the ecosystem baseline. Emits a structured Markdown checklist report and a JSON sidecar for trend tracking.

Invocation

There are no arguments — ignore $ARGUMENTS; anything passed is discarded.

Do NOT skip any category (except Clank when not detected). Do NOT auto-fix findings — report only.

Purpose

Answer the question: "Does this repo match the ecosystem baseline?" — a compliance-focused, checkable question with a fixed 9-category checklist. Distinct from /discovery (broad quality probes) and /harness-audit (plugin installation health).

Phase 1: Read Session Config

Read the project's ## Session Config section in CLAUDE.md (or AGENTS.md for Codex CLI). Store resolved values as $CONFIG.

Command resolution follows skills/quality-gates/SKILL.md priority order:

  1. .orchestrator/policy/quality-gates.json — canonical policy file (if present).
  2. Session Config test-command / typecheck-command / lint-command — fallback.
  3. Hardcoded defaults: npm test, npm run typecheck, npm run lint.

If any command is set to the literal string skip, skip that check entirely and mark it skipped.

Phase 2: Clank Detection

Check for Clank integration markers:

ls .clank/ 2>/dev/null || ls clank.config.* 2>/dev/null || ls clank.config.json 2>/dev/null

Set $CLANK_DETECTED=true if any marker exists, false otherwise.

Also check Session Config for ecosystem: baseline — if set, treat Clank checks as required rather than optional.

Phase 3: Run 9 Audit Categories

Run all checks in parallel where possible. For each check use the status symbols:

  • ✓ — passes
  • ✗ — fails (action required)
  • ⚠ — warning (review recommended)
  • skipped — intentionally skipped

Category 1: Configuration

CheckMethod
CLAUDE.md exists (at most 80 non-exempt lines; runtime ## Session Config block exempt)node "$PLUGIN_ROOT/scripts/lib/claude-md-budget-lint.mjs" --file CLAUDE.md
.claude/rules/ has path-scoped rulesls .claude/rules/*.md 2>/dev/null
.claude/settings.json existsls .claude/settings.json
.mcp.json exists with serversls .mcp.json
.gitignore covers .env*, node_modules, build artifacts`grep -E '.env*

Category 2: Code Quality

Commands resolved from Session Config per Phase 1.

CheckMethod
ESLint v9 flat config (eslint.config.mjs)ls eslint.config.mjs 2>/dev/null
Prettier config (.prettierrc or prettier.config.*)ls .prettierrc* prettier.config.* 2>/dev/null
TypeScript strict mode ("strict": true in tsconfig.json)grep '"strict": true' tsconfig.json
0 TypeScript errorsRun {typecheck-command} 2>&1 — pass if exit code 0
No console.log in production code (excluding tests)`grep -r 'console.log' --include='.ts' --include='.mts' --exclude-dir=tests --exclude-dir=node_modules . 2>/dev/null
Lint passesRun {lint-command} 2>&1 — pass if exit code 0

Category 3: Git Hygiene

CheckMethod
Husky + lint-staged configuredls .husky/ 2>/dev/null && grep 'lint-staged' package.json
commitlint (Conventional Commits)`ls commitlint.config.* 2>/dev/null
Gitleaks pre-commit or CI`ls .gitleaks.toml 2>/dev/null
No secrets in git history`git log --all -p 2>/dev/null

Category 4: CI/CD

CheckMethod
CI config exists (.gitlab-ci.yml or .github/workflows/)ls .gitlab-ci.yml 2>/dev/null || ls .github/workflows/*.yml 2>/dev/null
Stages include validate → security → test → deployRead CI config, check for these stage names
Typecheck in CI`grep -E 'tsgo
Tests in CI`grep -E 'vitest
Dependency audit in CI`grep -E 'audit

Category 5: Testing

CheckMethod
Vitest configured (vitest.config.ts or vitest.config.mjs)ls vitest.config.* 2>/dev/null
Test coverage configuredgrep 'coverage' vitest.config.* 2>/dev/null
E2E tests (Playwright) for frontend reposls playwright.config.* 2>/dev/null — only required if next.config.* or nuxt.config.* exists
Test scripts in package.jsongrep '"test"' package.json 2>/dev/null
Tests passRun {test-command} 2>&1 — pass if exit code 0

Category 6: Security

CheckMethod
Auth-at-boundary pattern (requireAuth)grep -r 'requireAuth' --include='*.ts' src/ 2>/dev/null || echo "N/A (no src/)"
Zod validation on inputsgrep -r 'z\.object|z\.string|z\.parse|safeParse' --include='*.ts' src/ 2>/dev/null || echo "N/A"
No hardcoded secrets (scan for API key patterns)grep -r 'sk-|api_key\s*=\s*"' --include='*.ts' --include='*.mts' --exclude-dir=node_modules . 2>/dev/null — warn if found
No PAT/token in settings-allowlist entries (.claude/settings.json, .claude/settings.local.json — on-disk, incl. untracked)grep -nEo 'glpat-[A-Za-z0-9_-]{20,}|ghp_[A-Za-z0-9]{36,}|github_pat_[A-Za-z0-9_]{22,}|sk-ant-[A-Za-z0-9_-]{20,}|AKIA[0-9A-Z]{16}' .claude/settings.json .claude/settings.local.json 2>/dev/null | grep -vE 'AKIAIOSFODNN7EXAMPLE|-PLACEHOLDER' — fail if any match (hard — unlike the sk- heuristic above, these 5 prefixes are high-signal; see SEC-025 in .claude/rules/security.md). This check is required because check-owner-leakage.mjs scans git ls-files only — settings.local.json is gitignored/untracked by convention and structurally invisible to it.
.env* files not tracked`git ls-files
.env.example documents all secretsls .env.example 2>/dev/null

Note: RLS, rate limiting, and CORS checks are ⚠ review items — they require human judgment and cannot be fully automated. Flag them as ⚠ manual-review-recommended.

Category 7: Documentation

CheckMethod
README.md existsls README.md 2>/dev/null
.env.example exists with documented varsls .env.example 2>/dev/null
Architecture documented in CLAUDE.mdgrep -i 'architecture|structure|stack' CLAUDE.md 2>/dev/null

Category 8: Clank Integration (Optional)

If $CLANK_DETECTED=false AND ecosystem: baseline is NOT set in Session Config:

### 8. Clank Integration
Status: skipped — Clank not detected (.clank/ and clank.config.* absent; ecosystem: baseline not set)

Do not mark any Clank check as ✗. Absence of Clank is not a failure outside the baseline ecosystem.

If $CLANK_DETECTED=true OR ecosystem: baseline is set:

CheckMethod
GET /health endpoint exists (for services)grep -r '/health' --include='*.ts' src/ 2>/dev/null
CI pipeline sends webhooks to Event Busgrep -E 'webhook|event.bus|clank' .gitlab-ci.yml .github/workflows/*.yml 2>/dev/null
Sentry configured (for user-facing apps)grep -r 'Sentry' --include='*.ts' --include='*.mts' --exclude-dir=node_modules . 2>/dev/null
Conventional Commits enforced (commitlint)`ls commitlint.config.* 2>/dev/null

Category 9: MCP Configuration

Scope: Audits only the repo-local .mcp.json file — does NOT cover the user-machine MCPJungle gateway or globally-imported MCP servers.

CheckMethod
.mcp.json existsls .mcp.json 2>/dev/null
MCP servers match project typeRead .mcp.json, verify server list is appropriate (e.g., shadcn only for frontend repos, no stale servers)
No stale or unused MCP entriesCross-reference .mcp.json servers against project stack markers
MCP server health probe (optional — requires mcporter)For each server declared in repo-local .mcp.json: if command -v mcporter is present, run mcporter list --json and read the per-server status field — ok → ✓ pass; auth → ⚠ warn (remediation: mcporter auth <server>); offline/error → ✗ fail. If mcporter is absent → mark this check skipped with note "enable with npm install -g mcporter". mcporter is never a hard dependency; the repo audit proceeds without it.

Phase 4: Emit Report

4.1 Markdown Report (stdout)

Emit a structured report in this format:

# Repo Audit Report — <repo-name>
Generated: <ISO timestamp>
Session Config commands: test=`<test-command>` typecheck=`<typecheck-command>` lint=`<lint-command>`

## Summary
| Category | Pass | Fail | Warn | Skipped |
|---|---|---|---|---|
| 1. Configuration | N | N | N | N |
| 2. Code Quality | N | N | N | N |
| 3. Git Hygiene | N | N | N | N |
| 4. CI/CD | N | N | N | N |
| 5. Testing | N | N | N | N |
| 6. Security | N | N | N | N |
| 7. Documentation | N | N | N | N |
| 8. Clank Integration | N | N | N | N |
| 9. MCP Configuration | N | N | N | N |
| **Total** | N | N | N | N |

**Overall:** ✓ PASS / ✗ FAIL / ⚠ WARN

## Detailed Results

### 1. Configuration
- ✓ CLAUDE.md exists (72 non-exempt lines — within the 80-line budget)
- ✗ `.claude/settings.json` missing — create with permissions and hooks
- ⚠ `.mcp.json` missing — add MCP servers appropriate for your stack
...

### 2. Code Quality
...

### 8. Clank Integration
skipped — Clank not detected (.clank/ and clank.config.* absent; ecosystem: baseline not set in Session Config)

### 9. MCP Configuration
- ✓ `.mcp.json` exists
- ✓ Servers match project type
- ⚠ MCP server health probe: `github` → ok; `shadcn` → auth (run `mcporter auth shadcn`)

## Critical Findings
<List only ✗ items — actionable, with fix guidance>

## Action Items
<Numbered list of recommended fixes, ordered by priority>

4.2 JSON Sidecar

Write to .orchestrator/metrics/repo-audit-<unix-timestamp>.json:

{
  "schema_version": 1,
  "generated_at": "<ISO timestamp>",
  "repo": "<basename of cwd>",
  "commands": {
    "test": "<resolved test-command>",
    "typecheck": "<resolved typecheck-command>",
    "lint": "<resolved lint-command>"
  },
  "clank_detected": false,
  "ecosystem_baseline": false,
  "categories": {
    "configuration": { "pass": 4, "fail": 1, "warn": 0, "skipped": 0, "checks": [] },
    "code_quality": { "pass": 3, "fail": 1, "warn": 1, "skipped": 0, "checks": [] },
    "git_hygiene": { "pass": 2, "fail": 1, "warn": 0, "skipped": 0, "checks": [] },
    "ci_cd": { "pass": 0, "fail": 5, "warn": 0, "skipped": 0, "checks": [] },
    "testing": { "pass": 4, "fail": 0, "warn": 0, "skipped": 1, "checks": [] },
    "security": { "pass": 3, "fail": 1, "warn": 2, "skipped": 0, "checks": [] },
    "documentation": { "pass": 2, "fail": 0, "warn": 1, "skipped": 0, "checks": [] },
    "clank_integration": { "pass": 0, "fail": 0, "warn": 0, "skipped": 4, "checks": [] },
    "mcp_configuration": { "pass": 1, "fail": 0, "warn": 2, "skipped": 0, "checks": [] }
  },
  "summary": {
    "total_pass": 0,
    "total_fail": 0,
    "total_warn": 0,
    "total_skipped": 0,
    "overall": "pass|fail|warn"
  }
}

Each checks array entry:

{ "id": "config.claude-md-exists", "status": "pass|fail|warn|skipped", "detail": "human-readable result" }

MCP server health entries additionally include an optional remediation field (representative examples):

{ "id": "mcp.server-health-github", "status": "pass", "detail": "mcporter: status=ok", "remediation": null }
{ "id": "mcp.server-health-shadcn", "status": "warn", "detail": "mcporter: status=auth", "remediation": "mcporter auth shadcn" }
{ "id": "mcp.server-health-probe", "status": "skipped", "detail": "mcporter not installed — enable with npm install -g mcporter", "remediation": "npm install -g mcporter" }

Create .orchestrator/metrics/ if it does not exist:

mkdir -p .orchestrator/metrics

Write using node -e or direct file write — do not require any external dependency.

Overall Status Logic

  • ✗ FAIL — any check has status fail
  • ⚠ WARN — no fails, but at least one warn
  • ✓ PASS — all checks are pass or skipped

Success Criteria

  • All 9 categories checked with pass/fail/warn/skipped status
  • Clank section correctly detected and marked skipped when absent
  • Commands resolved from Session Config (not hardcoded pnpm)
  • JSON sidecar written to .orchestrator/metrics/repo-audit-<timestamp>.json
  • No false positives — verify findings before reporting
  • Critical security findings flagged prominently in "Critical Findings" section

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use when the user asks to improve architecture, find refactoring opportunities, surface deepening opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable. Surfaces shallow modules and hypothetical seams using a precise vocabulary (Module / Interface / Implementation / Depth / Seam / Adapter / Leverage / Locality from LANGUAGE.md).

The English summary is being prepared. Showing the original description.

Kanevry/session-orchestrator52Updated Oct 26, 2026

Use this skill when running an autonomous session-orchestration loop. Chains session-start → session-plan → wave-executor → session-end for N iterations with all 10 kill-switches (SPIRAL, FAILED wave, carryover > 50%, max-hours, max-sessions, resource-overload, token-budget, stall-timeout, sub-threshold confidence, user-abort). Reads Mode-Selector output (Phase B) to decide auto-execute vs. fallback. Writes one autopilot.jsonl record per loop run. Phase C scaffold (issue #277); implementation lives in scripts/lib/autopilot.mjs (Phase C-1 follow-up).

The English summary is being prepared. Showing the original description.

Kanevry/session-orchestrator52Updated Oct 26, 2026

Use this skill when scaffolding the minimum repository structure required by session-orchestrator. Invoked automatically by the Bootstrap Gate when CLAUDE.md, Session Config, or bootstrap.lock is missing. Also available as /bootstrap for manual invocation. Three intensity tiers: fast (demos/spikes), standard (MVPs), deep (production/team).

The English summary is being prepared. Showing the original description.

Kanevry/session-orchestrator52Updated Oct 26, 2026

Use when you have a feature idea but the scope or UX is still ambiguous — runs a lightweight Socratic design dialogue (3-5 AUQ rounds) and writes a spec markdown file. Use BEFORE /plan feature when product intent needs validation; skip to /plan feature when scope is already clear. HARD-GATE prevents any code work until the design is user-approved.

The English summary is being prepared. Showing the original description.

Kanevry/session-orchestrator52Updated Oct 26, 2026

Use when detecting drift between CLAUDE.md (or AGENTS.md, the Codex CLI alias) / _meta narrative and live repository state. Ten checks: absolute-path resolution, 01-projects/ count claims, issue-reference freshness, session-file existence, command-count sync, session-config-parity (mandatory template keys = error, opt-in gaps = note, unknown local keys = warning), vault-dir-parity (CLAUDE.md vs AGENTS.md), generated-rule-staleness (WARN-only), rule-scoping (paths:/globs: frontmatter defects, dangling rule citations, zero-match globs), and docs-parity (docs/components.md count-claims vs on-disk counts, template-vs-reference config-key parity, stale .claude/metrics/ paths). Full per-check spec in the body table. Invoked as an opt-in session-end phase; mirrors vault-sync's lean JSON+exit-code contract.

The English summary is being prepared. Showing the original description.

Kanevry/session-orchestrator52Updated Oct 26, 2026

close

Free

End session with verification, commits, and documentation

The English summary is being prepared. Showing the original description.

Kanevry/session-orchestrator52Updated Oct 26, 2026

See all skills by Kanevry

Report a problem with this skill