From Agency
Use when assessing a codebase or diff for quality, security, performance, or architecture problems before review or shipping — surfaces decidable findings as graph artefacts.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agency:analyzeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- agency-generated: v1 -->
references/architecture.mdreferences/cleanup.mdreferences/gate.mdreferences/graph.mdreferences/improve.mdreferences/migrate_quality_config.mdreferences/migrate_quality_history.mdreferences/paths.mdreferences/performance.mdreferences/quality.mdreferences/record_run.mdreferences/report.mdreferences/review.mdreferences/run.mdreferences/sarif.mdreferences/score.mdreferences/security.mdreferences/verb-rules.mdAnalyze runs decidable transforms over source and reports findings on the quality, security, performance, and architecture axes as graph nodes the orchestrator can reason about, rather than prose opinions. Scope WHAT to analyze with codegraph first — codegraph impact <symbol> (blast radius of a change), codegraph callers <symbol> (every call site), codegraph explore "<area>" (understand an unfamiliar area) — before running the transforms, so the analysis follows the real dependency edges.
codegraph impact <symbol> (blast radius) + codegraph callers <symbol> (call sites) before the analyzers| Verb | Role | Brief | Reference |
|---|---|---|---|
architecture | transform | Dependency-graph + structural checks: import cycles, file LOC thresholds. | details |
cleanup | act | Focused mode: analyse for dead-code findings only, draft a patch plan. | details |
gate | act | Record the quality gate verdict as an auditable Gate node (Spec 382 §2). | details |
graph | transform | Query the provenance graph — a census of node types + a typed listing (read the graph). | details |
improve | act | Read prior Analysis findings, draft an improvement plan as a Reflection. | details |
migrate_quality_config | effect | One-time importer: .brooks-lint.yaml → .agency/config.yaml quality: block + Suppression nodes (Spec 385 §1). | details |
migrate_quality_history | effect | One-time importer: .brooks-lint-history.json → back-dated QualityRun nodes (Spec 385 §2). | details |
paths | transform | Spec 048 intent-path analysis: long chains + verb sequences. | details |
performance | transform | AST-based hot-path lint: nested O(n²), += in loop, unbounded while True. | details |
quality | transform | Decidable lint findings: unused imports, long lines, long functions, long files. | details |
record_run | act | Record a QualityRun history node + return the trend (Spec 381 §3). | details |
report | effect | Render the Iron-Law quality report from the ported templates + persist it as a round-trippable Document (Spec 384 close-out / 382 §4). | details |
review | act | Headless code-quality review for CI — never pauses; risky remedies auto-declined. | details |
run | act | Run the requested analysis axes and record an Analysis + per-Finding nodes. | details |
sarif | transform | Render Findings as SARIF 2.1.0 for code-scanning — READ-ONLY (Spec 382 §1). | details |
score | transform | Compute the Health Score (Spec 381) from findings × preset/config — READ-ONLY. | details |
security | transform | Decidable security patterns: eval/exec, hardcoded credentials, pickle.load, shell=True. | details |
await call_tool('capability_analyze_architecture', {'intent_id': 'intent:abc'})
codegraph impact <symbol> gives it directly from the call graphDrive this capability's verbs by WALKING a skill one phase at a time (progressive disclosure, recorded as provenance):
code-analysis (discipline): scope → axes → run → review → apply
— walk it: await call_tool('capability_develop_skill_walk', {'name': 'code-analysis', 'inputs': {}, 'intent_id': '…'})
Every verb here is the prefixed wire tool capability_analyze_<verb> (underscores, not the hyphenated skill name). Call it inside an execute block, threading the serving intent_id. get_schema an unfamiliar verb first (detail="full" reveals nested object-param shapes):
iid = (await call_tool("intent_bootstrap", {"purpose": "…", "deliverable": "…", "acceptance": "…"}))["intent_id"]
await call_tool("capability_analyze_architecture", {"intent_id": iid})
await call_tool("capability_analyze_cleanup", {"intent_id": iid})
await call_tool("capability_analyze_gate", {"intent_id": iid})
await call_tool("capability_analyze_graph", {"intent_id": iid})
await call_tool("capability_analyze_improve", {"intent_id": iid})
await call_tool("capability_analyze_migrate_quality_config", {"intent_id": iid})
More verbs: capability_analyze_migrate_quality_history, capability_analyze_paths, capability_analyze_performance, capability_analyze_quality, capability_analyze_record_run, capability_analyze_report, capability_analyze_review, capability_analyze_run …
npx claudepluginhub netzkontrast/agency --plugin agencyCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.