agentleFS
maee-comaee-co/cc-autoship/skills/github-issue-impl/SKILL.md

github-issue-impl

Skill0 starsChanged 5 months agoMITArchived repositoryView on GitHub

Take a GitHub Issue number, read the issue, explore the codebase, draft an implementation plan, and start implementing it.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 11 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If unauthenticated, print an error, point at gh auth login, and exit

    line 39
  2. Distinctive:

    Ask the user if it cannot be identified

    line 64
  3. Distinctive:

    Read those files and confirm their current state

    line 80
  4. Distinctive:

    Check whether the code changed after the issue was created (git log --since)

    line 81
  5. Distinctive:

    If it did, report it to the user and confirm whether to continue

    line 82
  6. Distinctive:

    Check the dependent code (both directions of the imports)

    line 89
  7. Very specific:

    When committing and pushing, either cd into the worktree first or use git -C .claude/worktrees/...

    line 130
  8. Distinctive:

    Follow the plan and make the code changes with Edit/Write

    line 134
  9. Distinctive:

    Run the tests after each change:

    line 135
  10. Distinctive:

    If a test fails, fix it before moving on

    line 140
  11. Distinctive:

    Run the full test suite once all changes are done

    line 141
  12. Distinctive:

    Look for team-config.md in this order:

    line 145
  13. Distinctive:

    If no team-config.md is found, tell the user and fall back to normal mode

    line 148
  14. Very specific:

    Add a comment to the issue (use --body-file to avoid shell metacharacters):

    line 165
  15. Very specific:

    Check that code snippets contain no .env values, API keys, or personal information

    line 195

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/github-issue-impl

Given a GitHub issue number, read the issue → explore the codebase → draft an implementation plan → implement it.

Usage

/github-issue-impl 59
/github-issue-impl #<N>
/github-issue-impl 59 --plan-only
/github-issue-impl 59 --team

Arguments

ArgumentDescriptionDefault
(positional)Issue number (#<number> or <number>)Required
--plan-onlyPrint the implementation plan only; change no codefalse
--teamImplement in parallel with Agent Teamsfalse

Procedure

Step 1: Fetch the issue data

  1. Extract the issue number from the argument (strip a leading # if present)
  2. Check gh auth (do this first):
    gh auth status
    If unauthenticated, print an error, point at gh auth login, and exit
  3. Fetch the issue data:
    gh issue view {NUMBER} --json title,body,labels,assignees,comments,state
  4. Check the issue state:
    • The issue does not exist → print an error and exit
    • The issue is closed → ask the user: "this issue is already closed; should it be reopened and worked on?"
  5. Parse the issue body into structure:
    • The overview section
    • The root-cause section (the list of root causes)
    • The proposed fix section
    • Reproduction steps (for a bug)
    • The implementation approach (for a feature)
    • The completion criteria (for a task)
  6. Determine the type from the labels (bug, enhancement, and so on)
  7. Identify the target app, inferring in this order:
    • The [AppName] pattern in the issue title
    • apps/{app}/ extracted from file paths in the issue body
    • The app name inferred from the labels
    • Ask the user if it cannot be identified
  8. Make the start visible on the GitHub issue (optional):

    Leaving a comment on the GitHub issue before starting avoids collisions with parallel sessions and leaves a trail.

    gh issue comment <issue number> --body "🤖 Claude Code is starting the implementation"

    To integrate with an external issue tracker (Linear and the like), configure the MCP separately and wire it into your own flow.

Step 2: Check the codebase

  1. Extract file paths and line numbers from the issue body with a regular expression:
    • Patterns: `{path}:{line}`, `{path}`, and so on
  2. Read those files and confirm their current state
    • Check whether the code changed after the issue was created (git log --since)
    • If it did, report it to the user and confirm whether to continue
  3. Find the related tests with Grep/Glob:
    {basename of the target file}.test.ts
    {basename of the target file}.spec.ts
    __tests__/{basename of the target file}.*
  4. Check the dependent code (both directions of the imports)

Step 3: Draft the implementation plan

  1. Build a concrete list of changes based on the issue's proposed fix
  2. Structure the plan like this:
    ## Implementation plan: {issue title}
    
    ### Files to change
    | File | Change | Priority |
    |------|--------|----------|
    | `path/to/file.ts` | {the change} | High |
    
    ### Implementation steps
    1. [ ] {step 1}: {details}
    2. [ ] {step 2}: {details}
    
    ### Test plan
    - [ ] {test 1}
    - [ ] {test 2}
    
    ### Risks and cautions
    - {risk 1}
  3. With --plan-only, print the plan here and stop

Step 4: Implement

4.0: Create the worktree (mandatory before implementing)

Implementation always happens in a worktree under .claude/worktrees/. The pre-tool-use.mjs hook grants the commit/push exception on main only for paths under .claude/worktrees/, so a worktree created outside that convention (a sibling directory of the repository, for instance) is blocked at the very first commit (this actually happened during live verification of cc-autoship).

# Name the branch per the dev-flow convention: feat/{ISSUE-ID}-{scope}-{description} (fix/... for bugfixes)
BRANCH="feat/{ISSUE-ID}-{scope}-{description}"
git worktree add ".claude/worktrees/${BRANCH}" -b "$BRANCH" origin/main
cd ".claude/worktrees/${BRANCH}"
  • The SSoT for the worktree path and branch naming conventions is "Worktree rules" and "Naming conventions" in ${CLAUDE_PLUGIN_ROOT}/rules/dev-flow.md
  • When committing and pushing, either cd into the worktree first or use git -C .claude/worktrees/... (so the hook's exception pattern matches)

Normal mode

  1. Follow the plan and make the code changes with Edit/Write
  2. Run the tests after each change:
    cd apps/{app} && pnpm test
    Fall back to npm test when there is no pnpm test
  3. If a test fails, fix it before moving on
  4. Run the full test suite once all changes are done

Team mode (with --team)

  1. Look for team-config.md in this order:
    • apps/{app}/team-config.md
    • team-config.md at the repository root
  2. If no team-config.md is found, tell the user and fall back to normal mode
  3. Launch Agent Teams based on team-config.md (using the /start-team skill)
  4. Distribute each step of the plan as a task

Progress log

Append the progress to progress/{app}.md for each change:

### {date} Issue #{number}
- {summary of the change}

Step 5: Report completion

Output language: write the body of the issue comment in the language of the session (the same language you are answering the user in). The template below is the English sample and is not a set of strings to copy verbatim. docs/rules/output-language.md is the SSoT for the fixed label translations. Commit hashes, branch names, and issue numbers are fixed regardless of language (emit them as they are).

  1. Add a comment to the issue (use --body-file to avoid shell metacharacters):
    cat <<'COMMENT_EOF' > /tmp/github-issue-comment.md
    Fix commit: $(git log -1 --format=%H)
    
    ### Changes
    {summary of the changes}
    
    ### Test results
    {summary of the test run}
    COMMENT_EOF
    
    gh issue comment {NUMBER} --body-file /tmp/github-issue-comment.md
    rm -f /tmp/github-issue-comment.md
  2. Report the summary to the user:
    • The list of changed files
    • The test results
    • The issue URL
  3. Confirm the next action with the user:
    • Close the issue?
    • Create a commit?
    • Open a PR?

Safety rules

  • Confirm with the user before changing any file the issue does not mention
  • In --team mode, forbid each agent from editing outside its scope
  • Check that code snippets contain no .env values, API keys, or personal information

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.