Agent skill

fix-issue

Plans, implements, reviews, and ships a fix for a GitHub issue. Use when fixing an issue, resolving a bug report, implementing a feature request, or closing a ticket. Handles fork workflows, upstream detection, branch creation, and PR submission.

Stars 10
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/philoserf/claude-code-setup/tree/main/skills/fix-issue

SKILL.md

Reference Files

  • quality-gate-defaults.md — Per-language fallback commands for build, test, lint, and format

Fix GitHub Issue #$ARGUMENTS.

1. Read issue

bash
gh issue view $ARGUMENTS --repo <canonical>

Understand the full context: problem description, acceptance criteria, linked PRs, and discussion. Follow linked issues, referenced PRs, and external documentation to build complete understanding.

2. Detect remotes

Determine the canonical remote and PR target:

  • If a git remote named upstream exists, use it as the canonical remote. Fetch from it, base branches on it, and submit PRs to it.
  • If no upstream remote exists, fall back to origin.

Resolve the canonical repo's owner/name from the remote URL and store it. Use --repo <owner/name> on every gh command.

Run git fetch <canonical-remote> to ensure up-to-date refs.

3. Research (if needed)

If the issue references unfamiliar APIs, libraries, error messages, or domain concepts, search for official documentation and known solutions before planning. Skip for straightforward bugs where the fix is clear from the codebase alone.

4. Plan (approval gate)

Write a PRD covering:

  • Issue requirements summary
  • Every file to create or modify (with file:line references)
  • Approach and key design decisions
  • Risks or open questions

Stop and wait for user approval. Do not proceed until the user affirms (e.g., "approved", "go", "lgtm").

5. Create branch

Determine the branch prefix from issue type:

  • fix/ for bugs
  • feat/ for features
  • refactor/ for refactors
  • docs/ for documentation
  • When ambiguous, use fix/

Create a branch named {prefix}issue-$ARGUMENTS based on <canonical-remote>/<default-branch>.

6. Implement

Implement the plan across all necessary files. Follow the project's CLAUDE.md standards. Keep changes minimal and focused on the issue requirements — no speculative features.

Tests are part of implementation, not a separate step. Add tests for the changed behavior alongside the code changes.

When stuck — a confusing error, an unfamiliar API, or an approach that isn't working — search for solutions rather than spinning.

7. Quality gate (first pass)

7a. Discover project checks

CI is the source of truth. Before running anything, read the project's CI configuration to learn what the project actually runs.

  1. Read .github/workflows/ for the main CI workflow. Extract:
    • Test commands with feature flags
    • Lint/format commands with non-default flags
    • Codegen sync checks (commands followed by git diff --exit-code)
    • Docs build commands
  2. Read Makefile or justfile if present. Cross-reference targets used in CI.
  3. Read project CLAUDE.md for project-specific quality gates.

Store discovered commands. They override fallback defaults.

7b. Run the quality pipeline

Detect the project language from manifest files. A project may use multiple languages; run checks for each.

Run in this order, using CI-discovered commands when available:

  1. Build — compile or bundle
  2. Test — full suite with CI's feature flags
  3. Lint and format — fix issues
  4. Extended checks — per-language extras
  5. Codegen sync — run discovered codegen commands, verify git diff --exit-code. Regenerate stale files if needed.
  6. Docs build — if changes touch docs and a build command exists

For fallback commands when CI doesn't specify what to run, see references/quality-gate-defaults.md.

Iterate on failures until green.

8. Self-review

Review your own diff against the base branch. Rank every finding:

  • P1 — blocks merge (correctness bugs, security issues)
  • P2 — important (missing error handling, test gaps, logic flaws)
  • P3 — nice to have (style, naming, minor simplifications)

9. Fix findings

Address all P1–P3 findings. For each finding, either:

  • Fix it — apply the change
  • Dismiss it — explain why it's a false positive or not worth the churn

After fixing, re-read the diff of changes made in this step and verify each fix is correct and doesn't introduce regressions.

10. Quality gate (second pass)

Re-run the full quality pipeline from step 7b. Iterate until clean.

11. Ship

Invoke /vc-ship. The PR description should:

  • Reference the issue with Closes #$ARGUMENTS (or Refs # if it doesn't fully close it)
  • Map changes back to the issue requirements

Expand your agent's capabilities with these related and highly-rated skills.

philoserf/claude-code-setup

pre-release

Validates a project is ready to tag and ship. Use when tagging a release, cutting a version, shipping a package, or asking "are we ready to release?" Checks repo hygiene, CI status, docs, version sync, and build verification. Optimized for Obsidian plugins with fallback detection for other project types.

10 0
Explore
philoserf/claude-code-setup

local-issues

Reviews a codebase for bugs, design issues, and code cleanliness problems with specific file paths and line numbers. Use when auditing code quality, finding bugs, doing a code review, finding problems, or reviewing a project for issues. Creates issue files in `.issues/` directory.

10 0
Explore
philoserf/claude-code-setup

skill-improve

Generates prioritized improvement recommendations for Claude Code skills. Use when improving skills, enhancing customizations, or wanting actionable feedback on how to make a skill better. Provides impact/effort prioritization with specific fix suggestions.

10 0
Explore
philoserf/claude-code-setup

release

Executes the final release workflow for Obsidian plugins after pre-release checks pass. Use when tagging a release, publishing a version, or shipping an Obsidian plugin. Bumps version via bun run script, creates git tag, pushes to trigger GitHub Actions, and updates GitHub release notes from CHANGELOG.md.

10 0
Explore
philoserf/claude-code-setup

skill-quality

Scores Claude Code skills (1-5) across 6 weighted quality dimensions aligned with official Anthropic docs. Use when evaluating skill quality, rating skills, scoring customizations, comparing skill effectiveness, or checking if a skill follows best practices. Produces per-dimension scores with evidence, weighted totals, quality tier classification, and actionable improvement recommendations.

10 0
Explore
philoserf/claude-code-setup

obsidian-cli

Interacts with Obsidian vaults using the Obsidian CLI to read, create, and manage notes, tasks, properties, tags, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, add to daily note, find notes about a topic, check tasks, append to a note, query the vault, list tags, list files, manage bookmarks, check sync status, view file history, use templates, query bases, run QuickAdd, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.

10 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results