afc-issue
Analyze GitHub issue — investigate bug reports, understand requirements, inspect issues
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Analyze GitHub issue — investigate bug reports, understand requirements, inspect issues
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | afc:issue |
| description | Analyze GitHub issue — investigate bug reports, understand requirements, inspect issues |
| argument-hint | <GitHub issue URL, owner/repo#number, #number, or number> |
| allowed-tools | ["Read","Grep","Glob","Bash","WebFetch","Write"] |
| model | sonnet |
Analyzes a single GitHub issue (title, body, labels, comments, attached images) and produces a structured analysis document. Searches the codebase for related files and suggests the appropriate next afc skill (debug, spec, or auto).
!gh --version >/dev/null 2>&1 && gh auth status >/dev/null 2>&1 && echo "GH_OK" || echo "GH_UNAVAILABLE"
$ARGUMENTS — (required) One of:
123 or #123https://github.com/owner/repo/issues/123owner/repo#123If the pre-fetch returned GH_UNAVAILABLE:
[afc:issue] Error: GitHub CLI (gh) is not installed or not authenticated. Install from https://cli.github.com/ and run 'gh auth login'.Determine the input format and extract owner, repo, and issue number:
https://github.com/{owner}/{repo}/issues/{number}): extract from path, set GH_REPO_FLAG="--repo {owner}/{repo}"{owner}/{repo}#{number}): split on #, set GH_REPO_FLAG="--repo {owner}/{repo}"123 or #123): strip leading #, set GH_REPO_FLAG="" (use current repo from git remote)gh issue view {number} {GH_REPO_FLAG} --json number,title,body,labels,author,comments,createdAt,state,url
If the command fails → output error and abort.
Parse and extract: TITLE, BODY, LABELS, AUTHOR, COMMENTS, CREATED_AT, STATE, URL.
Extract image URLs from the issue body (skip images inside code block fences):
<img src="{url}">For each URL: fetch with WebFetch, analyze content (error messages, UI screenshots, console output, stack traces), tag results with [Image Analysis]. Record failures as [Image unavailable: {url}].
If no images: note No attached media found.
If more than 20 comments: analyze only the most recent 20 and note "Analyzed 20 of {N} comments (most recent)".
Extract: reproduction steps, error logs, workarounds, maintainer responses, related issue/PR references.
Extract keywords from title, body, and comments:
Search with Grep and Glob. Record matching files with line numbers and relevance reason. If no matches: No related code found in current codebase.
Type — choose the strongest matching signal:
| Signal | Type |
|---|---|
| Error messages, stack traces, "broken", "doesn't work", reproduction steps | Bug Report |
| "Add", "support", "new feature", "would be nice", "enhancement" | Feature Request |
| "How to", "is it possible", "what is", "documentation" | Question |
| "Improve", "refactor", "better", "optimize", existing feature modification | Enhancement |
Severity — based on production impact, not code location:
| Level | Criteria |
|---|---|
| Critical | Data loss, security vulnerability, application crash, or complete feature unavailability with no workaround |
| High | Core functionality broken; workaround exists but is painful or undocumented |
| Medium | Non-critical functionality impacted; reasonable workaround available, or significant UX degradation |
| Low | Cosmetic issue, minor UX friction, or improvement with no functional impact |
Estimated Scope:
| Level | Criteria |
|---|---|
| Small | 1–2 files — typo, config change, isolated bug fix |
| Medium | 3–5 files — feature addition, moderate refactor |
| Large | 6+ files — cross-cutting concern, architectural change |
| Type | Suggested Next Step |
|---|---|
| Bug Report | /afc:debug "{issue title summary}" |
| Feature Request | /afc:spec "{feature description}" or /afc:auto "{feature description}" |
| Question | Reply to issue — provide answer or point to documentation |
| Enhancement | /afc:spec "{enhancement description}" |
| Insufficient info | Reply to issue — request: {specific missing information} |
mkdir -p .claude/afc/issues
If .claude/afc/issues/{number}-*.md exists → ask user: "Overwrite existing analysis for issue #{number}?"
Generate slug from title: lowercase, replace non-alphanumeric with -, truncate to 40 chars.
Write to .claude/afc/issues/{number}-{slug}.md:
# Issue #{number}: {title}
> Analyzed: {YYYY-MM-DD}
> Source: {url}
> Labels: {labels, comma-separated}
> Author: {author}
> State: {Open/Closed}
## Summary
{2-4 sentence summary including context from body, comments, and images — not just a restatement of the title.}
## Attached Media Analysis
{If images exist:}
> [Image Analysis] Below is AI interpretation of attached media.
- **Image 1** ({filename or "screenshot"}): {description}
{If no images:}
No attached media found.
## Codebase Impact
- `{path}:{line}` — {why this file is related}
{If no related files:}
No related code found in current codebase.
## Classification
- **Type**: {Bug Report | Feature Request | Question | Enhancement}
- **Severity**: {Critical | High | Medium | Low}
- **Estimated Scope**: {Small (1-2 files) | Medium (3-5) | Large (6+)}
## Suggested Next Step
- [ ] {Primary suggestion with full command} — {reason}
- [ ] {Secondary suggestion if applicable} — {reason}
Issue analyzed
├─ Issue: #{number} — {title}
├─ Type: {classification}
├─ Severity: {severity}
├─ Related files: {count}
├─ Document: .claude/afc/issues/{number}-{slug}.md
└─ Next step: {primary suggestion}
[Image Analysis] tag makes this explicit.afc:triage handles bulk analysis; afc:issue handles deep individual analysis.Code and component analysis — analyze code, trace flows, audit consistency, inspect components
Architecture analysis and design review
Full auto pipeline — run spec-to-clean cycle automatically for new features
Save session state for later resumption
Resolve spec ambiguities with clarifying questions
Pipeline artifact cleanup and codebase hygiene