Skip to content

Commit 5fc7c59

Browse files
committed
fix: disambiguate git-native-issue from Spinellis' git-issue
Both tools register as `git issue` in PATH, so `which git-issue` alone cannot verify the correct tool is installed. Add a capability probe (`git issue create --help`) that only passes for git-native-issue (Spinellis uses `new` instead of `create`). Updated in setup skill, ambient skill prerequisites, and hook context.
1 parent 4ce5dcc commit 5fc7c59

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

plugins/claude-git-native-issue/hooks/task-intercept.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cat << 'EOF'
99
{
1010
"hookSpecificOutput": {
1111
"hookEventName": "UserPromptSubmit",
12-
"additionalContext": "git-native-issue is active. For ALL task tracking, use `git issue` commands via Bash instead of internal TaskCreate/TaskUpdate/TaskList tools. Quick reference: create → `git issue create \"title\" -m \"desc\" -l label -p priority`, list → `git issue ls`, show → `git issue show <id>`, progress → `git issue edit <id> --add-label in-progress`, close → `git issue state <id> --close -m \"reason\"`, search → `git issue search \"pattern\"`. AUTONOMOUS BEHAVIOR: (1) Auto-create issues when user starts multi-step work, approves a plan, or discovers a bug. (2) Auto-update with `--add-label in-progress` when starting work, `git issue comment` for progress. (3) Auto-close when task completes successfully. (4) Skip tracking for trivial changes, one-off questions, or when not in a git repo. (5) PLATFORM SYNC: After creating or closing issues, sync with the provider. Detect provider from git remote URL (github.com → github:owner/repo, gitlab.com → gitlab:group/project, gitea/forgejo → gitea:owner/repo). Run `git issue sync <provider>` after mutations. Check `git config --get git-issue.provider` for cached provider string. Before any git-issue command, verify you are in a git repo. If git-issue is not initialized, run `git issue init` first. Invoke the `git-issue-tracker` skill for full reference when needed."
12+
"additionalContext": "git-native-issue is active. For ALL task tracking, use `git issue` commands via Bash instead of internal TaskCreate/TaskUpdate/TaskList tools. Quick reference: create → `git issue create \"title\" -m \"desc\" -l label -p priority`, list → `git issue ls`, show → `git issue show <id>`, progress → `git issue edit <id> --add-label in-progress`, close → `git issue state <id> --close -m \"reason\"`, search → `git issue search \"pattern\"`. AUTONOMOUS BEHAVIOR: (1) Auto-create issues when user starts multi-step work, approves a plan, or discovers a bug. (2) Auto-update with `--add-label in-progress` when starting work, `git issue comment` for progress. (3) Auto-close when task completes successfully. (4) Skip tracking for trivial changes, one-off questions, or when not in a git repo. (5) PLATFORM SYNC: After creating or closing issues, sync with the provider. Detect provider from git remote URL (github.com → github:owner/repo, gitlab.com → gitlab:group/project, gitea/forgejo → gitea:owner/repo). Run `git issue sync <provider>` after mutations. Check `git config --get git-issue.provider` for cached provider string. Before any git-issue command, verify you are in a git repo. Then verify the correct tool is installed: run `git issue create --help 2>/dev/null` — if this fails, the wrong `git issue` tool may be installed (Spinellis' git-issue uses `new` instead of `create`). If git-issue is not initialized, run `git issue init` first. Invoke the `git-issue-tracker` skill for full reference when needed."
1313
}
1414
}
1515
EOF

plugins/claude-git-native-issue/skills/git-issue-tracker/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,9 @@ git issue fsck [--quiet]
254254
Before running any `git issue` command:
255255

256256
1. **Verify git repo**: `git rev-parse --git-dir 2>/dev/null` — if this fails, you are NOT in a git repo. Do not attempt git-issue operations.
257-
2. **Verify git-issue installed**: `which git-issue 2>/dev/null` — if missing, tell the user: `brew install remenoscodes/git-native-issue/git-native-issue`
258-
3. **Check initialization**: `git config --get issue.remote 2>/dev/null` — if not set, run `git issue init` before the first operation. This is a one-time setup per repo.
257+
2. **Verify git-native-issue installed**: `which git-issue 2>/dev/null` — if missing, tell the user: `brew install remenoscodes/git-native-issue/git-native-issue`
258+
3. **Verify correct tool**: `git issue create --help 2>/dev/null` — if this fails but step 2 passed, the user has a different `git issue` tool (e.g., Spinellis' git-issue, which uses `new` instead of `create`). Tell the user: "A different `git issue` tool is installed. This plugin requires git-native-issue." Provide: `brew install remenoscodes/git-native-issue/git-native-issue`
259+
4. **Check initialization**: `git config --get issue.remote 2>/dev/null` — if not set, run `git issue init` before the first operation. This is a one-time setup per repo.
259260

260261
## Provider Detection
261262

plugins/claude-git-native-issue/skills/setup/SKILL.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,24 @@ Guide the user through initializing git-native-issue in the current repository a
1313
### 1. Check prerequisites
1414

1515
Run these checks in parallel:
16-
- `which git-issue 2>/dev/null` — verify git-issue is installed
1716
- `git rev-parse --git-dir 2>/dev/null` — verify we are in a git repo
17+
- `which git-issue 2>/dev/null` — verify some `git issue` command exists
18+
- `git issue create --help 2>/dev/null` — verify it is git-native-issue (not Spinellis' git-issue, which uses `new` instead of `create`)
1819

19-
If git-issue is not installed:
20+
If not in a git repo:
21+
- Tell the user: "You are not in a git repository. git-native-issue requires a git repo."
22+
- Stop here.
23+
24+
If no `git-issue` found at all:
2025
- Tell the user: "git-native-issue is not installed."
2126
- Provide the install command: `brew install remenoscodes/git-native-issue/git-native-issue`
2227
- Stop here until installed.
2328

24-
If not in a git repo:
25-
- Tell the user: "You are not in a git repository. git-native-issue requires a git repo."
26-
- Stop here.
29+
If `git-issue` exists but `git issue create --help` fails (wrong tool):
30+
- Tell the user: "A different `git issue` tool is installed (likely Spinellis' git-issue). This plugin requires git-native-issue."
31+
- Provide the install command: `brew install remenoscodes/git-native-issue/git-native-issue`
32+
- Warn: both tools use the `git issue` command — the user may need to adjust PATH priority or uninstall the other tool.
33+
- Stop here until resolved.
2734

2835
### 2. Check if already initialized
2936

0 commit comments

Comments
 (0)