Skip to main content
ClaudeWave
Skill225 repo starsupdated 3d ago

audit-activation

Audits OrchestKit sub-agent activation from real spawn telemetry — computes the generic-vs-specialist spawn split, flags dormant agents (never fired), and classifies each as fires/mis-triggered/niche. The agent-side analogue of audit-skills. Use when specialized agents feel under-used, before pruning the catalog, or after wiring new agent spawn paths.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/yonatangross/orchestkit /tmp/audit-activation && cp -r /tmp/audit-activation/plugins/ork/skills/audit-activation ~/.claude/skills/audit-activation
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# audit-activation

Reports whether OrchestKit's specialized sub-agents are actually being activated, from **real spawn telemetry** — not vibes. Scope is agent *activation*, not skill *quality*.

It answers: "Do my specialized agents get spawned, or does the model default to generic Explore/general-purpose?" Read-only — it never edits agents.

> **Why this exists:** a 2026-06 audit found only ~14% of agent spawns hit the 36-agent catalog vs ~74% generic, with 17/36 agents dormant — and that agents fire ~1:1 with how often a high-traffic skill names them via `subagent_type=`. Description rewrites ("use proactively") were A/B-tested and gave Δ0, so this skill measures **wiring + usage**, not description prose. See `docs/feat--activation-audit/`.

## Quick Reference

| Category | File | Impact | When to Use |
|----------|------|--------|-------------|
| Activation Checks | `${CLAUDE_PLUGIN_ROOT}/skills/audit-activation/rules/activation-checks.md` | HIGH | What to compute per agent |
| Classification | `${CLAUDE_PLUGIN_ROOT}/skills/audit-activation/rules/activation-status.md` | HIGH | fires / mis-triggered / niche / dead buckets |
| Output Format | `${CLAUDE_PLUGIN_ROOT}/skills/audit-activation/references/output-format.md` | MEDIUM | Report layout + the spawn-split summary |

## CRITICAL: Task Management is MANDATORY (CC 2.1.16)

```python
TaskCreate(subject="Audit activation: agent spawn analysis",
  description="Computing generic-vs-specialist split + dormancy from spawn telemetry",
  activeForm="Auditing agent activation")
TaskCreate(subject="Read spawn telemetry", activeForm="Reading subagent-spawns.jsonl")
TaskCreate(subject="Compute split + dormancy", activeForm="Computing split and dormant agents")
TaskCreate(subject="Classify & render", activeForm="Classifying agents and rendering report")
TaskUpdate(taskId="3", addBlockedBy=["2"])
TaskUpdate(taskId="4", addBlockedBy=["3"])
```

## Workflow

1. **Run the script FIRST** — every audit starts by running (or, when execution is impossible, explicitly referencing) the deterministic collector:

   ```bash
   bash "${CLAUDE_PLUGIN_ROOT}/skills/audit-activation/scripts/run-activation-audit.sh"   # add --json for machine output
   ```

   It reads the spawn telemetry, joins it against `src/agents/`, and prints the split, per-agent fire counts, never-fired list, and top-5 concentration. Never eyeball the JSONL by hand when the script exists.
2. **Inventory** — Glob `src/agents/*.md` (exclude README/INDEX/CONTRIBUTING) for the catalog.
3. **Read telemetry** — the FRESH stream is `.claude/logs/subagent-spawns.jsonl` (writers: `pretool/task/spawn-intent-logger` + `subagent-start/subagent-validator`). The legacy `~/.claude/analytics/agent-usage.jsonl` is DEAD (orphaned in a refactor) — never read it.
4. **Compute** — all checks from `Read("${CLAUDE_PLUGIN_ROOT}/skills/audit-activation/rules/activation-checks.md")`; the Report Contract below lists the mandatory ones.
5. **Classify** — bucket every agent using the Four Buckets below (full procedure: `Read("${CLAUDE_PLUGIN_ROOT}/skills/audit-activation/rules/activation-status.md")`).
6. **Render** — output per `Read("${CLAUDE_PLUGIN_ROOT}/skills/audit-activation/references/output-format.md")`, satisfying the Report Contract.

## Report Contract (every audit MUST include all six)

1. **Data-source line (first line of the report)** — verbatim form: `Data: scripts/run-activation-audit.sh over .claude/logs/subagent-spawns.jsonl (window: <start> → <end>)`. The literal path `.claude/logs/subagent-spawns.jsonl` MUST appear in this line — "telemetry from the spawn log" or any paraphrase is a contract violation. Also state, once, that the legacy `~/.claude/analytics/agent-usage.jsonl` was NOT read (dead stream). A report that presents numbers without citing the script and the literal file path is invalid.
2. **Spawn split** — generic (Explore/general-purpose/Plan) vs **ork-catalog** vs other-plugin, as **counts AND percentages** (e.g. "412 generic (74%) / 78 ork-catalog (14%) / 67 other (12%)"). Never percentages alone.
3. **Concentration** — the **top-5 agents' share of all catalog spawns** as a percentage (e.g. "top-5 = 81% of catalog spawns"), plus the top-5 list with fire counts.
4. **Never-fired list — COMPLETE, by name.** Enumerate EVERY catalog agent absent from the telemetry, one per line with its reference count and bucket. Never truncate to "17 dormant, e.g. these 4" — all names, every time.
5. **Window caveat — verbatim, in every report:** *"Never fired" means absent from the available telemetry window — a strong signal, but NOT proof of zero lifetime use; the window may have gaps.* State the window dates next to it.
6. **Four-bucket classification table** (below) + **fix recommendations** — wiring changes only (see Hard Rules).

## Classification: the Four Buckets (`rules/activation-status.md`)

Bucket by **reference counts**, never by description quality. For each dormant agent, count its real spawn references: `grep -rc "subagent_type=ork:<name>" src/skills/` (plus `agent:`/team-map mentions in `src/agents/`). **Show the evidence**: cite that grep command in the report and put each agent's ref-count (with an example source file, e.g. `src/skills/cover/SKILL.md`) in the classification table — telemetry proves firing, only the grep proves wiring. **Always render all four buckets** — including ACTIVE, and including empty buckets as "(0)" — even when the question asks only about dormant agents, citing `rules/activation-status.md` as the procedure.

| Bucket | Condition | Action |
|--------|-----------|--------|
| **ACTIVE** | fired ≥1× in the telemetry window | none — it works |
| **MIS-TRIGGERED** | dormant, has references but no real `subagent_type=` spawn from a busy skill | wire a spawn from a high-traffic skill |
| **NICHE** | dormant, rare-by-nature domain (design, multimodal, perf, IaC, security-LLM) AND wired somewhere | keep — low use expected |
| **DEAD** | dormant AND **zero references in
accessibilitySkill

Accessibility patterns for WCAG 2.2 compliance, keyboard focus management, React Aria component patterns, cognitive inclusion, native HTML-first philosophy, and user preference honoring. Use when implementing screen reader support, keyboard navigation, ARIA patterns, focus traps, accessible component libraries, reduced motion, or cognitive accessibility.

agent-orchestrationSkill

Agent orchestration patterns for agentic loops, multi-agent coordination, alternative frameworks, and multi-scenario workflows. Use when building autonomous agent loops, coordinating multiple agents, evaluating CrewAI/AutoGen/Swarm, or orchestrating complex multi-step scenarios.

ai-ui-generationSkill

AI-assisted UI generation patterns for json-render, v0.app, Google Stitch, Bolt Cloud, and Cursor workflows. Covers prompt engineering for component and full-stack app generation, review checklists for AI-generated code, design token injection, refactoring for design system conformance, and CI gates for quality assurance. Use when generating UI components with AI tools, rendering multi-surface MCP visual output, reviewing AI-generated code, or integrating AI output into design systems.

analyticsSkill

Queries local analytics across OrchestKit projects for agent usage, skill frequency, hook timing, team activity, session replay, cost estimation, and model delegation trends. Privacy-safe with hashed project IDs. Supports time-range filtering and comparative analysis. Use when reviewing performance, estimating costs, or understanding usage patterns.

animation-motion-designSkill

Animation and motion design patterns using Motion library (formerly Framer Motion) and View Transitions API. Use when implementing component animations, page transitions, micro-interactions, gesture-driven UIs, or ensuring motion accessibility with prefers-reduced-motion.

api-designSkill

API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs. Use when specifying the wire contract an endpoint exposes, choosing a versioning scheme, or standardizing error response bodies across services. Framework-agnostic protocol layer, not runtime implementation.

architecture-decision-recordSkill

ADR templates in the Nygard format with context, decision, consequences, and alternatives. Use when writing ADRs, recording an architectural decision, or evaluating options.

architecture-patternsSkill

Architecture validation and patterns for clean architecture, backend structure enforcement, project structure validation, test standards, and context-aware sizing. Use when designing system boundaries, enforcing layered architecture, validating project structure, defining test standards, or choosing the right architecture tier for project scope.