analyzing-codebases
Detects project languages and monorepo state, runs language-appropriate static analysis (dependency graph, complexity,…
Creates specialized Claude Code subagents in .claude/agents/ with minimal tools, clear triggers, and isolated context. Use when user says 'create agent', 'add reviewer', 'specialized agent', 'isolated context task'.
Claude Code
$ npx -y skills add wayne930242/Reflexive-Claude-Code --skill writing-subagents --agent claude-code
Codex
$ npx skills add wayne930242/Reflexive-Claude-Code --skill writing-subagents -a codex -y
Cursor
$ npx skills add wayne930242/Reflexive-Claude-Code --skill writing-subagents -a cursor -y
Gemini CLI
$ npx skills add wayne930242/Reflexive-Claude-Code --skill writing-subagents -a gemini-cli -y
GitHub Copilot
$ npx skills add wayne930242/Reflexive-Claude-Code --skill writing-subagents -a github-copilot -y
OpenCode
$ npx skills add wayne930242/Reflexive-Claude-Code --skill writing-subagents -a opencode -y
Windsurf
$ npx skills add wayne930242/Reflexive-Claude-Code --skill writing-subagents -a windsurf -y
name: writing-subagents description: Creates specialized Claude Code subagents in .claude/agents/ with minimal tools, clear triggers, and isolated context. Use when user says 'create agent', 'add reviewer', 'specialized agent', 'isolated context task'.
**Writing subagents IS creating specialized workers with isolated contexts.**
Subagents run via the Agent tool with their own context window, tools, and system prompt. Use for tasks that benefit from focused expertise.
**Core principle:** One agent, one responsibility. Bloated agents become unfocused.
Follow [task initialization protocol](../../references/task-initialization.md).
**Tasks:** 0. Fetch latest official subagent spec 1. Analyze requirements 2. Document problem context 3. Design agent configuration 4. Validate structure 5. Test invocation 6. Verify behavior 7. REFACTOR - quality review
Announce: "Created 8 tasks (0–7). Starting execution..."
| Phase | Focus | What You Do | |-------|-------|-------------| | **Requirements** | Understanding | Identify what specialized task needs isolation | | **Analysis** | Problem definition | Document why main agent isn't sufficient | | **Design** | Configuration | Plan agent tools, model, and system prompt | | **Implementation** | Creation | Write agent file with proper configuration | | **Optimization** | Refinement | Fine-tune tools and prompts for efficiency |
**Goal:** Pull the current Anthropic subagent spec before designing — never trust cached memory.
**Action:**
Skill tool: fetching-claude-docs
component: subagent
question: "frontmatter fields, tool inheritance, model selection,
description trigger format (PROACTIVELY, examples), context isolation"**Verification:** Received YAML with `source: https://code.claude.com/docs/en/sub-agents.md` and non-empty `spec_excerpt`. Use this as the **authoritative reference** for Tasks 1–7; if any rule in this SKILL conflicts with the fetched spec, the fetched spec wins (and flag the conflict for refactoring).
**Goal:** Understand what specialized task needs isolation.
**Questions to answer:**
**When to use subagents:**
See [references/examples.md](references/examples.md) for subagent templates and trigger examples.
**Built-in subagent types (consider BEFORE creating custom agents):**
| Type | Model | Tools | Use Case | |------|-------|-------|----------| | `Explore` | Haiku | Read-only (no Write/Edit) | Fast codebase search, analysis | | `Plan` | Inherit | Read-only | Research and planning | | `general-purpose` | Inherit | All | Complex multi-step tasks |
**Decision:** Can a built-in type handle this? If yes, use it directly via the Agent tool — no agent file needed.
**Verification:** Can describe the agent's single responsibility in one sentence.
**Goal:** Clearly understand why the main agent is insufficient for this task.
**Analysis points:** 1. What specific challenges arise when using the main agent? 2. How would task isolation improve the outcome? 3. What context pollution or focus issues occur? 4. What specialized expertise would help?
**Verification:** Documented specific problems that justify creating a specialized subagent.
**Goal:** Plan the agent configuration to address the documented problems.
**Before drafting the system prompt, walk through [prompt-design-principles.md](../../references/prompt-design-principles.md):**
.claude/agents/ # Project-level ~/.claude/agents/ # User-level (global)
--- name: agent-name description: What this agent does. Use proactively when [triggers]. tools: Read, Grep, Glob, Bash model: sonnet --- System prompt for the agent. ## Role [Clear description of the agent's responsibility] ## Process [Steps the agent should follow] ## Output Format [Expected output structure]
See [references/agent-spec.md](references/agent-spec.md) for full configuration fields, model selection, context:fork guidelines, and tool permissions.
**Key rules:**
| Agent Type | Recommended Tools | |------------
A Claude Code plugin marketplace for skills-driven Agentic Context Engineering (ACE) — build, analyze, and maintain agent systems with structured workflows.
Detects project languages and monorepo state, runs language-appropriate static analysis (dependency graph, complexity,…
Executes a refactor plan phase-by-phase on a dedicated branch with per-phase commits and mandatory reviewer checkpoints. Use when…
Writes AGENTS.md per subproject, archives run artifacts, and suggests rcc handoff conditionally. Use when verifying-refactors…
Converts a refactor map into a phased plan using parallel-change, branch-by-abstraction, or strangler fig patterns. Use when user…
Adds golden/snapshot tests to untested hotspot modules before refactoring. Use when refactor plan marks any phase with…
Validates hard structural rules (no cycles, file/fn line caps, cognitive/cyclomatic complexity) and runs mutation testing on…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.