agentleFS
nex-aginex-agi/NexRL/.claude/skills/fix-issue/SKILL.md

fix-issue

Skill119 starsChanged 8 months agoApache-2.0View on GitHub

Fix a GitHub issue using git worktree for isolation. Fetches issue, creates worktree, implements fix, then creates PR.

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 49 edited versions we read keep these.

  • 2

    Distinctive

    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. Distinctive:

    If closed, confirm with user before proceeding.

    line 23
  2. Very specific:

    Before coding, read relevant docs per .ai-instructions/developing/documentation.md:

    line 65
  3. Very specific:

    Run python -m black and python -m isort on changed files

    line 81
  4. Distinctive:

    Ensure license headers present

    line 82
  5. Very specific:

    Run project tests (use testing skill):

    line 86
  6. Very specific:

    Use git-commit skill, then github-pr skill.

    line 94

“Common” is measured: kept by at least 6 in 10 of the 49 edited versions of this file we could read. “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

Fix Issue Workflow (Worktree-Based)

Workflow

Step 1: Verify Prerequisites

gh auth status

Step 2: Fetch Issue

ISSUE_NUM=<number>
gh issue view $ISSUE_NUM --repo "${REPO_OWNER}/${REPO_NAME}" --json number,title,body,state,labels

If closed, confirm with user before proceeding.

Step 3: Update Issue Status

gh issue comment $ISSUE_NUM --repo china-qijizhifeng/NexRL \
  --body "🤖 Agent picking up this issue. Creating worktree branch \`agent/issue-${ISSUE_NUM}\`."

gh issue edit $ISSUE_NUM --repo china-qijizhifeng/NexRL \
  --add-label "status:in-progress" 2>/dev/null || true

Fetch Shared Knowledge

Clone or update the shared knowledge repo for common scripts and docs.

REPO_ROOT=$(git rev-parse --show-toplevel)
SHARED_KNOWLEDGE="${REPO_ROOT}/../nex-taas-shared-knowledge"
if [ ! -d "$SHARED_KNOWLEDGE" ]; then
  git clone https://github.com/china-qijizhifeng/nex-taas-shared-knowledge.git "$SHARED_KNOWLEDGE"
else
  git -C "$SHARED_KNOWLEDGE" pull --ff-only 2>/dev/null || true
fi

Step 4: Create Worktree

REPO_ROOT=$(git rev-parse --show-toplevel)
cd "$REPO_ROOT"
git fetch origin

BRANCH="agent/issue-${ISSUE_NUM}"
WORKTREE_DIR="${REPO_ROOT}/../worktrees/NexRL-issue-${ISSUE_NUM}"

git worktree add "$WORKTREE_DIR" -b "$BRANCH" "origin/main"
cd "$WORKTREE_DIR"

Step 5: Read Documentation First

Before coding, read relevant docs per .ai-instructions/developing/documentation.md:

  • docs/developer-guide/ for architecture understanding
  • Component-specific docs for the area being changed

Step 6: Plan the Fix

Enter plan mode. Consider:

  • Root cause analysis (for bugs)
  • Files that need changes
  • Impact on other components
  • Documentation updates needed

Step 7: Implement

Work in the worktree directory. Follow:

  • .ai-instructions/developing/ conventions
  • Run python -m black and python -m isort on changed files
  • Ensure license headers present

Step 8: Test

Run project tests (use testing skill):

python -m pytest tests/ -v
python -m pylint nexrl/ --rcfile=.pylintrc -rn -sn

Step 9: Commit and PR

Use git-commit skill, then github-pr skill. PR body should include: Fixes #ISSUE_NUM

Step 10: Handle Blockers

If blocked:

gh issue edit $ISSUE_NUM --repo china-qijizhifeng/NexRL \
  --remove-label "status:in-progress" --add-label "status:blocked"

gh issue comment $ISSUE_NUM --repo china-qijizhifeng/NexRL --body "
🚧 Blocked: <describe the problem>
Need guidance on: <specific question>
Progress so far: <what's been done>"

Step 11: Cleanup (after PR merged)

REPO_ROOT=$(git rev-parse --show-toplevel)
cd "$REPO_ROOT"
git worktree remove "$WORKTREE_DIR"
git branch -D "$BRANCH"

Download now (ZIP)

  • Other versions51 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 51

    1. pytorch/pytorch★ 105ksame name
    2. ZhuLinsen/daily_stock_analysis★ 67ksame name
    3. Dokploy/dokploy★ 38ksame name
    4. remix-run/remix★ 33ksame name
    5. jlowin/fastmcp★ 28ksame name
    6. PrefectHQ/fastmcp★ 28ksame name
    7. NVIDIA-NeMo/NeMo★ 19ksame name
    8. NVIDIA-NeMo/Speech★ 19ksame name
    9. getsentry/sentry-javascript★ 8.8ksame name
    10. datlechin/TablePro★ 6.4ksame name

    41 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use document, write-tests and 10 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • nicolasestremSkill

      document

      Create focused documentation for specific components or features

      Also in 4 projects that use this

    • SentrySkill

      write-tests

      Write tests following project conventions. Use when adding new tests or modifying existing ones.

      Also in 4 projects that use this

    • ShopifySkill

      prepare-release

      Prepare the changeset-release/main branch for release by syncing version.ts files and running pnpm install

      Also in 3 projects that use this

    • GitHubSkill

      refactor

      Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

      Also in 5 projects that use this

    • AWSSkill

      ship

      Finalize dev work on an issue branch — update docs, push, and open a PR.

      Also in 6 projects that use this

    • Microsoft AzureSkill

      build

      Build the TypeSpec Rust emitter from source. Run this after cloning the repo, after pulling changes, or when TypeScript source files have been modified.

      Also in 4 projects that use this

  • In this repository7 other files it gives its agents.

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.