github-issue-autodetect
БесплатноБез исполняемых скриптовНе проверенWhich issues a change closes or references: match the staged diff against open issues; Refs in commits, Fixes/Closes in the PR body. Use when writing a commit…
от laurigates★ 61 звезда на GitHubОб этом скилле
GitHub Issue Auto-Detection
When to Use This Skill
| Use this skill when... | Use the alternative when... |
|---|---|
Choosing Refs #N for the commit and Fixes #N / Closes #N for the PR body from staged-diff content |
Use git-commit-workflow for the broader commit message style |
| Matching diff hunks against open issues by file path or label | Use github-issue-writing to author or restructure the issue body itself |
| Inferring proper issue linkage before composing a commit message or PR body | Use git-issue-hierarchy for parent/child sub-issue and dependency links |
| Picking closing vs reference keywords from issue metadata | Use git-commit-trailers for trailer-style metadata (Co-authored-by, Release-As) |
Expert guidance for automatically detecting GitHub issues that staged changes may fix or close, ensuring proper issue linkage in commit messages and PR bodies.
Closing keywords go in the PR body, never in a commit message. GitHub closes an issue when a commit whose message carries
close/fix/resolve(any form) plus a reference lands on the default branch, whatever the PR body says. Under squash withCOMMIT_MESSAGESevery branch commit message lands in the squash body, so a strayFixes #Nin any commit closes the issue. Commits getRefs #N; the PR body getsFixes #N/Closes #N. Where a repo installs it, ano-closing-keywordscommit-msg hook enforces this.
Core Expertise
- Issue Detection: Match staged changes to open issues
- Keyword Selection: Choose appropriate closing vs reference keywords
- Context Analysis: Parse issue titles, bodies, and labels for relevance
- File Path Matching: Correlate changed files to issue descriptions
Detection Workflow
Step 1: Fetch Open Issues
# Get open issues with relevant metadata (using gh CLI)
gh issue list --state open --json number,title,body,labels --limit 50
# Or filter by specific labels for targeted detection
gh issue list --state open --label bug --json number,title,body
gh issue list --state open --label enhancement --json number,title,body
Step 2: Analyze Staged Changes
# Get list of changed files
git diff --cached --name-only
# Get detailed diff for content analysis
git diff --cached
# Get summary of changes
git diff --cached --stat
Step 3: Match Issues to Changes
Analyze staged changes against issues using these heuristics:
| Signal | Weight | Example |
|---|---|---|
| File path in issue body | High | Issue mentions src/auth/login.ts, diff includes that file |
| Error message match | High | Issue title contains error text found in diff |
| Component/scope match | Medium | Issue labeled auth, changes are in src/auth/ |
| Keyword overlap | Medium | Issue mentions "login", diff modifies login logic |
| Function name match | Medium | Issue references validateToken(), diff modifies it |
Detection Algorithm
For each staged file:
1. Extract file path components (directory, filename, extension)
2. Extract modified function/class names from diff
3. Extract error messages or string literals from diff
For each open issue:
1. Parse title for keywords, file references, error messages
2. Parse body for code snippets, file paths, stack traces
3. Check labels for component/area tags
Score each (file, issue) pair:
- +3 points: Exact file path match
- +2 points: Error message or function name match
- +1 point: Directory/component match
- +1 point: Keyword overlap (>2 significant words)
Report issues with score >= 2 as potential matches
Keyword Selection Guide
Closing Keywords (PR body only — auto-close on merge)
Use in the PR body when the PR fully resolves the issue:
| Keyword | Use Case |
|---|---|
Fixes #N |
Bug fixes - something was broken, now it works |
Closes #N |
Feature completion - requested feature is implemented |
Resolves #N |
General resolution - issue is addressed |
Reference Keywords (Link Without Closing)
Use in commit messages always, and in the PR body when the PR relates to but doesn't fully resolve the issue:
| Keyword | Use Case |
|---|---|
Refs #N |
Partial progress toward issue |
Related to #N |
Tangentially related changes |
See #N |
Context or discussion reference |
Part of #N |
One of multiple commits for an issue |
Not a keyword: blocking / blocked-by
Blocks #N and Blocked by #N are relationships, not commit trailers —
GitHub does not parse them from commit messages. If the detected issue is a
hard blocker for (or blocked by) the current work, record that through
/git:issue-hierarchy --blocked-by N (native dependencies API) rather than
adding a line to the commit footer. Keep commit trailers limited to the
reference keywords above.
Decision Tree
Commit message → "Refs #N" (or omit). Never a closing keyword.
PR body: does this PR FULLY resolve the
Установить github-issue-autodetect в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(git diff *)Bash(gh issue list *)Bash(gh issue view *)Bash(jq *)ReadGrepGlobmcp__github__list_issuesmcp__github__get_issueFAQ
Что делает скилл github-issue-autodetect?
Which issues a change closes or references: match the staged diff against open issues; Refs in commits, Fixes/Closes in the PR body. Use when writing a commit message or PR body.
Как установить скилл github-issue-autodetect?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл github-issue-autodetect запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic