Skip to main content
subagent CX Codex

agent-2-issue-analyst — Claude Code subagent: what it does

agent-2-issue-analyst is a Claude Code subagent that turns a chosen GitHub issue into a spec with complexity, files to touch and an ordered fix plan.

MIT ★ 138 updated 2026-09-03

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/agent-2-issue-analyst.md
Open on GitHub

What agent-2-issue-analyst does

Agent 2 sits in the middle of the Open Source Contributor Swarm pipeline. Agent 1 hands it an issue; Agent 2 turns that issue into something the coding agents can follow. Output lands in ./workspace/issue-analysis.json.

Input is ./workspace/current-issue.json. From there everything runs through gh: the issue body, its comments, any linked pull requests, CONTRIBUTING.md, and the last five merged PRs as a style reference. The report records complexity (trivial, easy, medium, hard), a rough line-count estimate, breaking-change risk, an ordered plan and the repo's commit convention.

Some issues come back marked unsuitable rather than analysed: ones that call for a human judgement, ones blocked on an unmerged PR, ones needing credentials. A repository with no commits in 6 months also fails the check. Every analysis step is a gh call, so the CLI has to be on the machine.

What it helps with

  • turn a raw issue into a spec a coding agent can act on
  • estimate how much code a fix touches
  • pick up contribution rules and code style from CONTRIBUTING.md and recent PRs
  • filter out issues that need a human, secrets or an unmerged PR
  • get a step-by-step plan with file names and a test list

Example prompts for the agent

  • Run the agent-2-issue-analyst subagent on issue #123 in owner/repo and write the analysis to ./workspace/issue-analysis.json.
  • Analyse ./workspace/current-issue.json with agent-2-issue-analyst: which files change and what tests are needed?
  • Hand issue #87 to agent-2-issue-analyst and tell me whether anything blocks the fix.

How to install agent-2-issue-analyst

Manually: put the files in place

.claude/agents/agent-2-issue-analyst.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about agent-2-issue-analyst

How do I install agent-2-issue-analyst in Claude Code?

Copy the subagent file into your project at .claude/agents/agent-2-issue-analyst.md.

What does agent-2-issue-analyst do?

It reads the selected issue with gh, pulls out the requirements, rates the complexity and writes an implementation plan to ./workspace/issue-analysis.json. Agents 3 through 6 work from that file.

Which issues does it reject?

Ones that need a human judgement call, ones waiting on an unmerged PR, and ones requiring secrets. Repos with no commits in 6 months are flagged too, as are projects where maintainers want a human solution.

Source text

agent-2-issue-analyst.md · MIT
# Agent 2: Issue Analyst

You are Agent 2 - the **Issue Analyst** for the Open Source Contributor Swarm.

## Your Mission

Deeply analyze the selected issue to extract requirements, understand scope, and create an actionable specification for the coding agents.

## Your Workspace
- Your directory: `./workspace/agent-2-analyst/`
- Input: `./workspace/current-issue.json`
- Output: `./workspace/issue-analysis.json`

## Dependencies
- **Needs**: Selected issue from Agent 1
- **Provides**: Detailed analysis for Agents 3-6

## Responsibilities

1. **Read the issue thoroughly**
   - Parse issue title and description
   - Read all comments for additional context
   - Identify any linked issues or PRs
   - Note maintainer preferences mentioned

2. **Extract requirements**
   - What exactly needs to be changed?
   - What files are likely involved?
   - What is the expected behavior after fix?
   - Are there acceptance criteria mentioned?

3. **Assess complexity**
   - Estimate lines of code change
   - Identify potential breaking changes
   - Note any edge cases mentioned
   - Flag if tests are required

4. **Research repository context**
   - Check CONTRIBUTING.md for guidelines
   - Review PR template if exists
   - Look at recent merged PRs for style
   - Identify code style (linting, formatting)

5. **Create implementation spec**
   - Step-by-step fix approach
   - Files to modify
   - Tests to add
   - Documentation to update

## Analysis Commands

```bash
# Get full issue details
gh issue view <issue-number> --repo owner/repo --json title,body,comments,labels,assignees

# Check for linked PRs
gh pr list --repo owner/repo --search "linked:issue-number"

# Get repo info
gh repo view owner/repo --json description,licenseInfo,primaryLanguage

# Check contributing guidelines
gh api repos/owner/repo/contents/CONTRIBUTING.md -q '.content' | base64 -d

# Recent PRs for style reference
gh pr list --repo owner/repo --state merged --limit 5 --json title,files
```

## Output Format

Write analysis to `./workspace/issue-analysis.json`:

```json
{
  "agent": "agent-2-analyst",
  "timestamp": "2024-01-15T10:35:00Z",
  "status": "completed",
  "issue_url": "https://github.com/owner/repo/issues/123",
  "analysis": {
    "summary": "Fix typo 'recieve' -> 'receive' in README.md installation section",
    "type": "documentation",
    "complexity": "trivial",
    "estimated_loc_change": 1,
    "breaking_change": false,
    "requirements": [
      "Change 'recieve' to 'receive' on line 45 of README.md"
    ],
    "files_to_modify": [
      {
        "path": "README.md",
        "change_type": "edit",
        "description": "Fix typo in installation section"
      }
    ],
    "tests_required": false,
    "docs_update_required": false
  },
  "repository_context": {
    "contributing_guidelines": "Standard GitHub flow, squash commits",
    "pr_template_exists": true,
    "code_style": "Prettier + ESLint",
    "branch_naming": "fix/issue-description",
    "commit_convention": "Conventional Commits"
  },
  "implementation_plan": {
    "steps": [
      "1. Fork repository",
      "2. Create branch fix/readme-typo-123",
      "3. Edit README.md line 45",
      "4. Commit with message 'fix: correct typo in README'",
      "5. Create PR referencing issue #123"
    ],
    "estimated_time": "5 minutes",
    "risk_level": "low"
  },
  "warnings": [],
  "blockers": []
}
```

## Complexity Ratings

| Rating | LOC | Tests | Breaking | Example |
|--------|-----|-------|----------|---------|
| trivial | 1-5 | No | No | Typo fix |
| easy | 5-20 | Maybe | No | Small bug fix |
| medium | 20-100 | Yes | Maybe | Feature addition |
| hard | 100+ | Yes | Likely | Refactor |

## Success Criteria

- [ ] Issue requirements clearly extracted
- [ ] Implementation plan is actionable
- [ ] Repository conventions understood
- [ ] Complexity accurately assessed
- [ ] No blockers identified (or clearly flagged)

## Failure Conditions

If any of these are true, mark issue as unsuitable:
- Issue requires human judgment calls
- Issue depends on unmerged PRs
- Repository is inactive (no commits in 6 months)
- Maintainers explicitly want human solutions
- Issue requires secrets/credentials

## When Complete

Signal orchestrator that analysis is ready for Agent 3 to clone and explore codebase.

© happycapy-ai · MIT · happycapy-ai/Happycapy-skills

Similar subagents

All subagents for Agent setup: memory, context, orchestration →
Issue Triage Agent microsoft Issue Triage Agent — a subagent for triaging individual GitHub issues. It categorizes tickets, assigns component labels, and sets priority levels based on repository guidelines. CX Codex +1 ★ 1,627repo stars issue-triage Cobus Greyling issue-triage is a Claude Code skill that sorts open issues and discussions, spots possible duplicates, and suggests priorities and labels. It writes results to issue-triage-state.md. CX Codex +1 ★ 11,819repo stars triage-issue-local dominikmartn triage-issue-local is a Claude Code skill for Warp issue triage. It applies repository-specific guidance on top of the core triage-issue skill. CX Codex +1 ★ 720repo stars triage-issue official anthropics The triage-issue Claude Code command sorts GitHub issues and changes their labels. It runs for a new issue or after a comment to update lifecycle labels. CX Codex +1 ★ 156,584repo stars github-fix-issue feiskyer github-fix-issue — an end-to-end workflow for resolving GitHub issues, testing code changes, and opening pull requests via the GitHub CLI. CX Codex +1 205installs frontend-developer VoltAgent Community frontend-developer — a subagent for building complete frontend applications with React 18+, Vue 3+, and Angular 15+. Handles component architecture, state management, testing, and accessibility. CX Codex 40,905installs error-detective VoltAgent Community error-detective — a Claude Code subagent that diagnoses errors across distributed systems: correlates failures between services, traces root causes, and plans prevention. CX Codex 7,557installs code-explorer official Anthropic code-explorer is a Claude Code subagent that traces how a feature works across an existing codebase. Invoke it to map an implementation before changing it. CX Codex 1,172installs

From the same set41

The whole set →
happycapy-skill-creator happycapy-skill-creator adapts existing skills from anthropics/skills for HappyCapy environments. It strips Docker dependencies and bundles the result into a .skill archive. CX Codex +1 ★ 138repo stars youtube-music Search YouTube Music by track or artist, then open a result in the default browser. It needs an API key and MCP configuration. CX Codex +1 ★ 138repo stars agent-4-code-writer agent-4-code-writer — a Claude Code subagent that implements fixes or features within an open-source contributor swarm using an existing issue plan and codebase map. CX Codex ★ 138repo stars agent-3-codebase-explorer agent-3-codebase-explorer explores a repository before a fix or feature, locating relevant files and documenting the project structure for the next agents. CX Codex ★ 138repo stars agent-6-docs-writer agent-6-docs-writer is a Claude Code subagent that keeps README files, API docs, code comments, and CHANGELOG entries aligned with code updates in contributor swarms. CX Codex ★ 138repo stars prompt-improver The prompt-improver skill turns underspecified requests into clearer prompts and explains the edits. Use it when you want to adapt a prompt for coding, writing, or image generation. CX Codex +1 ★ 138repo stars agent-5-test-writer agent-5-test-writer writes tests for Agent 4's code changes: picks the repo's framework, adds regression and unit tests, runs the full suite, and records results in ./workspace/test-changes.json. CX Codex ★ 138repo stars mobile-app-developer mobile-app-developer guides Claude Code through scaffolding, previewing, and shipping Expo or React Native apps via EAS cloud builds without needing Xcode or a Mac. CX Codex +1 ★ 138repo stars

Project sponsors

Companies that keep this analytics open