claude-github-skills 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,142 +1,186 @@
1
- # claude-github-skills
2
-
3
- GitHub-focused skills for Claude Code. Work on issues, review PRs, and fix review feedback — all scoped to a single project.
4
-
5
- ## Install
6
-
7
- ```bash
8
- npx claude-github-skills@latest
9
- ```
10
-
11
- This copies the skill commands to `~/.claude/commands/gh/` (global install). For project-local install:
12
-
13
- ```bash
14
- npx claude-github-skills@latest --local
15
- ```
16
-
17
- Project-local install copies commands to `.claude/commands/gh/` in your current working directory, so the skills are only available when working in that project.
18
-
19
- ## Prerequisites
20
-
21
- - [Claude Code](https://claude.ai/code) installed
22
- - [GitHub CLI (`gh`)](https://cli.github.com/) installed and authenticated (`gh auth login`)
23
- - [Node.js](https://nodejs.org/) >= 18.0.0
24
-
25
- ## Quick Start
26
-
27
- 1. Install the skills: `npx claude-github-skills@latest`
28
- 2. Open your project in Claude Code
29
- 3. Run `/gh:setup` to scope the skills to your repository
30
- 4. Start using `/gh:work`, `/gh:review-pr`, or `/gh:fix-pr`
31
-
32
- ## Commands
33
-
34
- ### `/gh:setup` — Onboarding (run this first)
35
-
36
- Detects your project's GitHub remote, confirms it with you, and writes the scope to `CLAUDE.md`. All other commands read this scope to know which repo to target.
37
-
38
- ```
39
- /gh:setup
40
- ```
41
-
42
- What it does:
43
- 1. Verifies `gh` CLI is authenticated (`gh auth status`)
44
- 2. Detects the GitHub remote from `git remote get-url origin` (supports both HTTPS and SSH URLs)
45
- 3. Confirms the detected `owner/repo` with you
46
- 4. Verifies the repository exists and is accessible
47
- 5. Writes a `<!-- gh-skills-start -->` configuration block to your project's `CLAUDE.md` (creates the file if it doesn't exist, preserves existing content if it does)
48
-
49
- The configuration block scopes all `/gh:*` commands to that single repository, preventing accidental interaction with other repos.
50
-
51
- ### `/gh:work <issue#>` — Work on an issue
52
-
53
- Fetches the issue, creates a feature branch, implements the solution, and opens a draft PR.
54
-
55
- ```
56
- /gh:work 27
57
- ```
58
-
59
- What it does:
60
- 1. Reads issue #27 (title, body, labels, assignees, comments, state)
61
- 2. Creates branch `feat/27-<slug>` (e.g., `feat/27-add-user-auth`) — if the branch already exists, it checks it out so you can resume work
62
- 3. Explores the codebase, summarizes a 3–5 bullet implementation plan, then implements
63
- 4. Makes focused, incremental commits each referencing the issue (e.g., `Add auth middleware (#27)`)
64
- 5. Pushes and creates a draft PR with a summary, change list, and `Closes #27` link
65
-
66
- ### `/gh:review-pr <pr#>`Review a PR
67
-
68
- Performs a focused code review on the PR's changed files and posts comments directly on GitHub.
69
-
70
- ```
71
- /gh:review-pr 42
72
- ```
73
-
74
- What it does:
75
- 1. Fetches the PR diff, metadata, and existing reviews
76
- 2. Reads full changed files for context, but reviews only the diff — does not critique untouched code
77
- 3. Checks for: correctness, security, error handling, naming clarity, test coverage, and performance issues
78
- 4. Skips nitpicks already handled by linters (style, formatting, subjective naming)
79
- 5. Posts a review summary with key findings and inline comments on specific lines
80
- 6. Approves the PR if no issues are found
81
- 7. For PRs with 15+ changed files, prioritizes core logic, largest diffs, and new files
82
- 8. Optionally offers to run Playwright for visual regression checks on UI changes (only if Playwright is in the project)
83
-
84
- ### `/gh:fix-pr <pr#>` Fix review feedback
85
-
86
- Reads all review comments on a PR and addresses each one.
87
-
88
- ```
89
- /gh:fix-pr 42
90
- ```
91
-
92
- What it does:
93
- 1. Fetches all inline review comments, conversation comments, and review threads
94
- 2. Filters to unresolved, actionable comments — skips resolved threads, acknowledgments, and already-answered questions
95
- 3. Presents a numbered list of items to address (with file, line, and requested change)
96
- 4. Checks out the PR branch and fixes each item
97
- 5. Groups related fixes into logical commits with descriptive messages
98
- 6. Pushes the fixes
99
- 7. Replies to each addressed comment on GitHub with a link to the fixing commit (e.g., `Fixed in abc1234`)
100
- 8. Reports any skipped comments with reasons (disagreement, out of scope, needs discussion)
101
-
102
- ## How It Works
103
-
104
- - **Project scoping**: All commands read `CLAUDE.md` for the `<!-- gh-skills-start -->` block to find the scoped `owner/repo`. They refuse to run without it — run `/gh:setup` first.
105
- - **GitHub CLI only**: Uses `gh` CLI exclusively. No API tokens needed beyond what `gh auth` provides.
106
- - **Respects your setup**: Works alongside your existing Claude Code skills, plugins, and `CLAUDE.md` conventions.
107
- - **Namespaced**: Commands live under `/gh:*` to avoid collisions with other skills.
108
- - **No destructive actions**: Commands create branches and PRs but never force-push, delete branches, or merge without your approval.
109
-
110
- ## File Structure
111
-
112
- ```
113
- claude-github-skills/
114
- ├── bin/
115
- │ └── install.js # Installer copies commands to ~/.claude or ./.claude
116
- ├── commands/
117
- │ └── gh/
118
- │ ├── setup.md # /gh:setup skill definition
119
- │ ├── work.md # /gh:work skill definition
120
- │ ├── review-pr.md # /gh:review-pr skill definition
121
- │ └── fix-pr.md # /gh:fix-pr skill definition
122
- ├── package.json
123
- └── README.md
124
- ```
125
-
126
- ## Uninstall
127
-
128
- Remove the command files:
129
-
130
- ```bash
131
- # Global install
132
- rm -rf ~/.claude/commands/gh
133
-
134
- # Project-local install
135
- rm -rf .claude/commands/gh
136
- ```
137
-
138
- And optionally remove the `<!-- gh-skills-start -->` to `<!-- gh-skills-end -->` block from your project's `CLAUDE.md`.
139
-
140
- ## License
141
-
142
- MIT
1
+ # claude-github-skills
2
+
3
+ [![npm version](https://img.shields.io/npm/v/claude-github-skills)](https://www.npmjs.com/package/claude-github-skills)
4
+ [![license](https://img.shields.io/npm/l/claude-github-skills)](https://github.com/chinofyoung/claude/blob/main/LICENSE)
5
+
6
+ GitHub-focused skills for Claude Code. Work on issues, review PRs, and fix review feedback — all scoped to a single project.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npx claude-github-skills@latest
12
+ ```
13
+
14
+ This copies the skill commands to `~/.claude/commands/gh/` (global install). For project-local install:
15
+
16
+ ```bash
17
+ npx claude-github-skills@latest --local
18
+ ```
19
+
20
+ Project-local install copies commands to `.claude/commands/gh/` in your current working directory, so the skills are only available when working in that project.
21
+
22
+ ## Prerequisites
23
+
24
+ - [Claude Code](https://claude.ai/code) installed
25
+ - [GitHub CLI (`gh`)](https://cli.github.com/) installed and authenticated (`gh auth login`)
26
+ - [Node.js](https://nodejs.org/) >= 18.0.0
27
+
28
+ ## Quick Start
29
+
30
+ 1. Install the skills: `npx claude-github-skills@latest`
31
+ 2. Open your project in Claude Code
32
+ 3. Run `/gh:setup` to scope the skills to your repository
33
+ 4. Start using `/gh:work`, `/gh:review-pr`, `/gh:fix-pr`, `/gh:create-ticket`, or `/gh:list`
34
+
35
+ ## Commands
36
+
37
+ ### `/gh:setup` — Onboarding (run this first)
38
+
39
+ Detects your project's GitHub remote, confirms it with you, and writes the scope to `CLAUDE.md`. All other commands read this scope to know which repo to target.
40
+
41
+ ```
42
+ /gh:setup
43
+ ```
44
+
45
+ What it does:
46
+ 1. Verifies `gh` CLI is authenticated (`gh auth status`)
47
+ 2. Detects the GitHub remote from `git remote get-url origin` (supports both HTTPS and SSH URLs)
48
+ 3. Confirms the detected `owner/repo` with you
49
+ 4. Verifies the repository exists and is accessible
50
+ 5. Writes a `<!-- gh-skills-start -->` configuration block to your project's `CLAUDE.md` (creates the file if it doesn't exist, preserves existing content if it does)
51
+
52
+ The configuration block scopes all `/gh:*` commands to that single repository, preventing accidental interaction with other repos.
53
+
54
+ ### `/gh:work <issue#>` — Work on an issue
55
+
56
+ Fetches the issue, creates a feature branch, implements the solution, and opens a draft PR.
57
+
58
+ ```
59
+ /gh:work 27
60
+ ```
61
+
62
+ What it does:
63
+ 1. Reads issue #27 (title, body, labels, assignees, comments, state)
64
+ 2. Creates branch `feat/27-<slug>` (e.g., `feat/27-add-user-auth`) if the branch already exists, it checks it out so you can resume work
65
+ 3. Explores the codebase, summarizes a 3–5 bullet implementation plan, then implements
66
+ 4. Makes focused, incremental commits each referencing the issue (e.g., `Add auth middleware (#27)`)
67
+ 5. Pushes and creates a draft PR with a summary, change list, and `Closes #27` link
68
+
69
+ ### `/gh:review-pr <pr#>` — Review a PR
70
+
71
+ Performs a focused code review on the PR's changed files and posts comments directly on GitHub.
72
+
73
+ ```
74
+ /gh:review-pr 42
75
+ ```
76
+
77
+ What it does:
78
+ 1. Fetches the PR diff, metadata, and existing reviews
79
+ 2. Reads full changed files for context, but reviews only the diff does not critique untouched code
80
+ 3. Checks for: correctness, security, error handling, naming clarity, test coverage, and performance issues
81
+ 4. Skips nitpicks already handled by linters (style, formatting, subjective naming)
82
+ 5. Posts a review summary with key findings and inline comments on specific lines
83
+ 6. Approves the PR if no issues are found
84
+ 7. For PRs with 15+ changed files, prioritizes core logic, largest diffs, and new files
85
+ 8. Optionally offers to run Playwright for visual regression checks on UI changes (only if Playwright is in the project)
86
+
87
+ ### `/gh:create-ticket <prompt>` — Create a structured issue
88
+
89
+ Turns a natural language prompt into a well-structured, dev-ready GitHub issue.
90
+
91
+ ```
92
+ /gh:create-ticket Add a /list command that shows issues by priority
93
+ ```
94
+
95
+ What it does:
96
+ 1. Reads the project scope from `CLAUDE.md`
97
+ 2. Parses the prompt to understand the feature or task
98
+ 3. Explores the codebase for relevant files, functions, and patterns
99
+ 4. Generates a structured issue with summary, context, code references, and acceptance criteria
100
+ 5. Previews the issue and waits for your approval before creating it
101
+ 6. Files the issue via `gh issue create` with optional labels
102
+
103
+ ### `/gh:list [priority]` — List issues by priority
104
+
105
+ Displays all open issues sorted by priority (critical high medium low), with optional filtering.
106
+
107
+ ```
108
+ /gh:list
109
+ /gh:list critical
110
+ ```
111
+
112
+ What it does:
113
+ 1. Reads project scope from `CLAUDE.md`
114
+ 2. Fetches open issues with priority labels (`priority:critical`, `priority:high`, `priority:medium`, `priority:low`)
115
+ 3. Groups and displays them in priority order with a formatted table (issue number, title, assignees, created date)
116
+ 4. Shows a summary count at the end
117
+ 5. Supports filtering to a single priority level — `/gh:list high` shows only high-priority issues
118
+ 6. Shows a helpful error for invalid priority arguments
119
+
120
+ ### `/gh:fix-pr <pr#>` — Fix review feedback
121
+
122
+ Reads all review comments on a PR and addresses each one.
123
+
124
+ ```
125
+ /gh:fix-pr 42
126
+ ```
127
+
128
+ What it does:
129
+ 1. Fetches all inline review comments, conversation comments, and review threads
130
+ 2. Filters to unresolved, actionable comments — skips resolved threads, acknowledgments, and already-answered questions
131
+ 3. Presents a numbered list of items to address (with file, line, and requested change)
132
+ 4. Checks out the PR branch and fixes each item
133
+ 5. Groups related fixes into logical commits with descriptive messages
134
+ 6. Pushes the fixes
135
+ 7. Replies to each addressed comment on GitHub with a link to the fixing commit (e.g., `Fixed in abc1234`)
136
+ 8. Reports any skipped comments with reasons (disagreement, out of scope, needs discussion)
137
+
138
+ ## How It Works
139
+
140
+ - **Project scoping**: All commands read `CLAUDE.md` for the `<!-- gh-skills-start -->` block to find the scoped `owner/repo`. They refuse to run without it — run `/gh:setup` first.
141
+ - **GitHub CLI only**: Uses `gh` CLI exclusively. No API tokens needed beyond what `gh auth` provides.
142
+ - **Respects your setup**: Works alongside your existing Claude Code skills, plugins, and `CLAUDE.md` conventions.
143
+ - **Namespaced**: Commands live under `/gh:*` to avoid collisions with other skills.
144
+ - **No destructive actions**: Commands create branches and PRs but never force-push, delete branches, or merge without your approval.
145
+
146
+ ## File Structure
147
+
148
+ ```
149
+ claude-github-skills/
150
+ ├── bin/
151
+ │ └── install.js # Installer — copies commands to ~/.claude or ./.claude
152
+ ├── commands/
153
+ │ └── gh/
154
+ │ ├── setup.md # /gh:setup skill definition
155
+ │ ├── work.md # /gh:work skill definition
156
+ │ ├── review-pr.md # /gh:review-pr skill definition
157
+ │ ├── fix-pr.md # /gh:fix-pr skill definition
158
+ │ ├── create-ticket.md # /gh:create-ticket skill definition
159
+ │ └── list.md # /gh:list skill definition
160
+ ├── package.json
161
+ └── README.md
162
+ ```
163
+
164
+ ## Uninstall
165
+
166
+ Remove the command files:
167
+
168
+ ```bash
169
+ # Global install
170
+ rm -rf ~/.claude/commands/gh
171
+
172
+ # Project-local install
173
+ rm -rf .claude/commands/gh
174
+ ```
175
+
176
+ And optionally remove the `<!-- gh-skills-start -->` to `<!-- gh-skills-end -->` block from your project's `CLAUDE.md`.
177
+
178
+ ## Links
179
+
180
+ - [npm package](https://www.npmjs.com/package/claude-github-skills)
181
+ - [GitHub repository](https://github.com/chinofyoung/claude)
182
+ - [Report issues](https://github.com/chinofyoung/claude/issues)
183
+
184
+ ## License
185
+
186
+ MIT
package/bin/install.js CHANGED
@@ -1,69 +1,96 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require("fs");
4
- const path = require("path");
5
-
6
- const COMMANDS_DIR = "commands/gh";
7
-
8
- function getClaudeHome() {
9
- const home = process.env.HOME || process.env.USERPROFILE;
10
- return path.join(home, ".claude");
11
- }
12
-
13
- function copyDirRecursive(src, dest) {
14
- if (!fs.existsSync(dest)) {
15
- fs.mkdirSync(dest, { recursive: true });
16
- }
17
-
18
- const entries = fs.readdirSync(src, { withFileTypes: true });
19
- for (const entry of entries) {
20
- const srcPath = path.join(src, entry.name);
21
- const destPath = path.join(dest, entry.name);
22
-
23
- if (entry.isDirectory()) {
24
- copyDirRecursive(srcPath, destPath);
25
- } else {
26
- fs.copyFileSync(srcPath, destPath);
27
- console.log(` Copied: ${entry.name}`);
28
- }
29
- }
30
- }
31
-
32
- function install() {
33
- const args = process.argv.slice(2);
34
- const isLocal = args.includes("--local");
35
-
36
- let targetBase;
37
- if (isLocal) {
38
- targetBase = path.join(process.cwd(), ".claude");
39
- } else {
40
- targetBase = getClaudeHome();
41
- }
42
-
43
- const packageRoot = path.resolve(__dirname, "..");
44
- const commandsSrc = path.join(packageRoot, COMMANDS_DIR);
45
- const commandsDest = path.join(targetBase, COMMANDS_DIR);
46
-
47
- if (!fs.existsSync(commandsSrc)) {
48
- console.error("Error: commands directory not found at", commandsSrc);
49
- process.exit(1);
50
- }
51
-
52
- console.log("\n claude-github-skills installer\n");
53
- console.log(` Installing to: ${targetBase}\n`);
54
-
55
- console.log(" Installing commands...");
56
- copyDirRecursive(commandsSrc, commandsDest);
57
-
58
- console.log("\n Installation complete!");
59
- console.log("\n Available commands:");
60
- console.log(" /gh:setup - Set up project (run this first)");
61
- console.log(" /gh:work <#> - Work on a GitHub issue");
62
- console.log(" /gh:review-pr <#> - Review a pull request");
63
- console.log(" /gh:fix-pr <#> - Fix PR review feedback");
64
- console.log("\n Prerequisites:");
65
- console.log(" - GitHub CLI (gh) installed and authenticated");
66
- console.log(" - Run /gh:setup in your project first\n");
67
- }
68
-
69
- install();
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+
6
+ const COMMANDS_DIR = "commands/gh";
7
+
8
+ function getClaudeHome() {
9
+ const home = process.env.HOME || process.env.USERPROFILE;
10
+ return path.join(home, ".claude");
11
+ }
12
+
13
+ function copyDirRecursive(src, dest) {
14
+ if (!fs.existsSync(dest)) {
15
+ fs.mkdirSync(dest, { recursive: true });
16
+ }
17
+
18
+ const entries = fs.readdirSync(src, { withFileTypes: true });
19
+ for (const entry of entries) {
20
+ const srcPath = path.join(src, entry.name);
21
+ const destPath = path.join(dest, entry.name);
22
+
23
+ if (entry.isDirectory()) {
24
+ copyDirRecursive(srcPath, destPath);
25
+ } else {
26
+ fs.copyFileSync(srcPath, destPath);
27
+ console.log(` Copied: ${entry.name}`);
28
+ }
29
+ }
30
+ }
31
+
32
+ function install() {
33
+ const args = process.argv.slice(2);
34
+ const isLocal = args.includes("--local");
35
+ const isForce = args.includes("--force");
36
+
37
+ let targetBase;
38
+ if (isLocal) {
39
+ targetBase = path.join(process.cwd(), ".claude");
40
+ } else {
41
+ targetBase = getClaudeHome();
42
+ }
43
+
44
+ const packageRoot = path.resolve(__dirname, "..");
45
+ const commandsSrc = path.join(packageRoot, COMMANDS_DIR);
46
+ const commandsDest = path.join(targetBase, COMMANDS_DIR);
47
+ const versionFile = path.join(commandsDest, ".version");
48
+
49
+ if (!fs.existsSync(commandsSrc)) {
50
+ console.error("Error: commands directory not found at", commandsSrc);
51
+ process.exit(1);
52
+ }
53
+
54
+ const pkg = require(path.join(packageRoot, "package.json"));
55
+ const currentVersion = pkg.version;
56
+
57
+ // Check installed version
58
+ if (!isForce && fs.existsSync(versionFile)) {
59
+ try {
60
+ const installedVersion = fs.readFileSync(versionFile, "utf-8").trim();
61
+ if (installedVersion === currentVersion) {
62
+ console.log(`\n claude-github-skills v${currentVersion} is already up to date.\n`);
63
+ console.log(" Use --force to reinstall.\n");
64
+ return;
65
+ }
66
+ console.log(`\n claude-github-skills installer\n`);
67
+ console.log(` Updating from v${installedVersion} to v${currentVersion}\n`);
68
+ } catch {
69
+ console.log("\n claude-github-skills installer\n");
70
+ console.log(` Installing v${currentVersion} to: ${targetBase}\n`);
71
+ }
72
+ } else {
73
+ console.log("\n claude-github-skills installer\n");
74
+ console.log(` Installing v${currentVersion} to: ${targetBase}\n`);
75
+ }
76
+
77
+ console.log(" Installing commands...");
78
+ copyDirRecursive(commandsSrc, commandsDest);
79
+
80
+ // Write version file
81
+ fs.writeFileSync(versionFile, currentVersion, "utf-8");
82
+
83
+ console.log("\n Installation complete!");
84
+ console.log("\n Available commands:");
85
+ console.log(" /gh:setup - Set up project (run this first)");
86
+ console.log(" /gh:work <#> - Work on a GitHub issue");
87
+ console.log(" /gh:review-pr <#> - Review a pull request");
88
+ console.log(" /gh:fix-pr <#> - Fix PR review feedback");
89
+ console.log(" /gh:create-ticket <prompt> - Create a structured issue");
90
+ console.log(" /gh:list [priority] - List issues by priority");
91
+ console.log("\n Prerequisites:");
92
+ console.log(" - GitHub CLI (gh) installed and authenticated");
93
+ console.log(" - Run /gh:setup in your project first\n");
94
+ }
95
+
96
+ install();
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: gh:create-ticket
3
+ description: Create a refined GitHub issue from a natural language prompt — explores the codebase, generates structured requirements, and files the issue after user approval
4
+ argument-hint: "<prompt>"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ - Glob
9
+ - Grep
10
+ - Agent
11
+ - AskUserQuestion
12
+ ---
13
+
14
+ <role>
15
+ You are a technical product manager who turns rough ideas into well-structured, dev-ready GitHub issues. You understand code, can navigate a codebase, and write clear requirements with actionable acceptance criteria.
16
+ </role>
17
+
18
+ <objective>
19
+ Given a natural language prompt, explore the codebase for relevant context, then generate and file a structured GitHub issue on the configured repository.
20
+ </objective>
21
+
22
+ <context>
23
+ Prompt: $ARGUMENTS
24
+ </context>
25
+
26
+ <process>
27
+
28
+ ## Step 1: Read project scope
29
+
30
+ Read `CLAUDE.md` in the project root. Look for the `<!-- gh-skills-start -->` block to find the scoped `owner/repo`.
31
+
32
+ If the block is missing, tell the user to run `/gh:setup` first and stop.
33
+
34
+ ## Step 2: Parse the prompt
35
+
36
+ Read the user's prompt from `$ARGUMENTS`. Identify:
37
+ - The core task or feature being requested
38
+ - Any constraints or preferences mentioned
39
+ - Keywords to guide codebase exploration
40
+
41
+ If the prompt is empty or missing, ask the user what they'd like to create a ticket for and stop.
42
+
43
+ ## Step 3: Explore the codebase
44
+
45
+ Use `Glob`, `Grep`, `Read`, and `Agent` to find code relevant to the prompt:
46
+ - Search for files, functions, and patterns related to the task
47
+ - Identify where changes would likely be made
48
+ - Note existing conventions or patterns that the implementation should follow
49
+ - Look for related tests, configs, or documentation
50
+
51
+ Collect specific file paths, function names, and code patterns to include as references in the issue.
52
+
53
+ ## Step 4: Generate the issue
54
+
55
+ Compose a structured GitHub issue with the following sections:
56
+
57
+ ```markdown
58
+ ## Summary
59
+
60
+ <2-3 sentences explaining what needs to be done and why>
61
+
62
+ ## Context
63
+
64
+ <Relevant background — what exists today, why this change matters>
65
+
66
+ ## Code References
67
+
68
+ - `path/to/file.ts` — <why it's relevant>
69
+ - `path/to/other.ts:functionName()` — <why it's relevant>
70
+
71
+ ## Acceptance Criteria
72
+
73
+ - [ ] <specific, testable criterion>
74
+ - [ ] <specific, testable criterion>
75
+ - [ ] ...
76
+
77
+ ## Suggested Approach (optional)
78
+
79
+ <If the codebase exploration revealed a clear path, outline it briefly>
80
+ ```
81
+
82
+ Choose a clear, concise title (under 80 characters) that starts with a verb (e.g., "Add ...", "Fix ...", "Refactor ...").
83
+
84
+ If appropriate based on the task, suggest labels from the repo's existing labels.
85
+
86
+ ## Step 5: Preview the issue
87
+
88
+ Present the full issue (title, body, and any labels) to the user. Ask for approval before creating:
89
+
90
+ > Here's the issue I've drafted. Shall I create it, or would you like changes?
91
+
92
+ Wait for user confirmation. If the user requests changes, revise and preview again.
93
+
94
+ ## Step 6: Create the issue
95
+
96
+ After approval, create the issue:
97
+
98
+ ```bash
99
+ gh issue create --repo owner/repo --title "<title>" --body "$(cat <<'EOF'
100
+ <issue body>
101
+ EOF
102
+ )"
103
+ ```
104
+
105
+ If labels were suggested and approved, add `--label "label1" --label "label2"`.
106
+
107
+ ## Step 7: Report back
108
+
109
+ Tell the user:
110
+ - The issue URL
111
+ - The issue number
112
+ - A one-line summary of what was filed
113
+
114
+ </process>
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: gh:list
3
+ description: List issues sorted by priority (critical → low), optionally filtered by priority level
4
+ argument-hint: "[priority]"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ ---
9
+
10
+ <role>
11
+ You are a project manager displaying GitHub issues organized by priority. You fetch issues from the scoped repository and present them in a clear, priority-ordered format.
12
+ </role>
13
+
14
+ <objective>
15
+ Display all open issues sorted by priority (critical → high → medium → low), or filter to a single priority level if specified.
16
+ </objective>
17
+
18
+ <context>
19
+ Priority argument: $ARGUMENTS
20
+ </context>
21
+
22
+ <process>
23
+
24
+ ## Step 1: Read project scope
25
+
26
+ Read `CLAUDE.md` in the project root. Look for the `<!-- gh-skills-start -->` block to find the scoped `owner/repo`.
27
+
28
+ If the block is missing, tell the user to run `/gh:setup` first and stop.
29
+
30
+ ## Step 2: Validate arguments
31
+
32
+ The valid priority levels are: `critical`, `high`, `medium`, `low`.
33
+
34
+ - If `$ARGUMENTS` is empty, proceed to fetch all priorities.
35
+ - If `$ARGUMENTS` is one of the valid priority levels (case-insensitive), proceed to fetch only that priority.
36
+ - If `$ARGUMENTS` is anything else, show this error and stop:
37
+
38
+ > **Invalid priority: `$ARGUMENTS`**
39
+ >
40
+ > Supported levels: `critical`, `high`, `medium`, `low`
41
+ >
42
+ > Usage:
43
+ > - `/gh:list` — all issues by priority
44
+ > - `/gh:list critical` — only critical issues
45
+
46
+ ## Step 3: Fetch issues
47
+
48
+ Use the GitHub CLI to fetch open issues with priority labels.
49
+
50
+ Priority labels follow the format: `priority:critical`, `priority:high`, `priority:medium`, `priority:low`.
51
+
52
+ **If a specific priority was requested**, fetch only that level:
53
+
54
+ ```bash
55
+ gh issue list --repo owner/repo --label "priority:<level>" --state open --json number,title,labels,assignees,createdAt --limit 100
56
+ ```
57
+
58
+ **If no priority was specified**, fetch all four levels. Run four separate commands (one per priority level) to keep them grouped:
59
+
60
+ ```bash
61
+ gh issue list --repo owner/repo --label "priority:critical" --state open --json number,title,labels,assignees,createdAt --limit 100
62
+ gh issue list --repo owner/repo --label "priority:high" --state open --json number,title,labels,assignees,createdAt --limit 100
63
+ gh issue list --repo owner/repo --label "priority:medium" --state open --json number,title,labels,assignees,createdAt --limit 100
64
+ gh issue list --repo owner/repo --label "priority:low" --state open --json number,title,labels,assignees,createdAt --limit 100
65
+ ```
66
+
67
+ ## Step 4: Format and display
68
+
69
+ Present the issues in a clear, readable format grouped by priority level. Use this structure:
70
+
71
+ ```
72
+ ## 🔴 Critical
73
+ | # | Title | Assignees | Created |
74
+ |---|-------|-----------|---------|
75
+ | 12 | Fix auth bypass | @alice | 2025-03-01 |
76
+
77
+ ## 🟠 High
78
+ | # | Title | Assignees | Created |
79
+ |---|-------|-----------|---------|
80
+ | 8 | Add rate limiting | — | 2025-03-05 |
81
+
82
+ ## 🟡 Medium
83
+ (no issues)
84
+
85
+ ## 🟢 Low
86
+ | # | Title | Assignees | Created |
87
+ |---|-------|-----------|---------|
88
+ | 3 | Update README links | @bob | 2025-02-20 |
89
+ ```
90
+
91
+ Rules:
92
+ - Always show the priority header, even if there are no issues at that level — display "(no issues)" under it.
93
+ - If filtering by a single priority, only show that one section.
94
+ - If there are no issues at all, say: "No open issues found with priority labels."
95
+ - Show assignee logins prefixed with `@`, or `—` if unassigned.
96
+ - Format dates as `YYYY-MM-DD`.
97
+ - At the end, show a summary line: `**Total: X issues** (Y critical, Z high, ...)`
98
+
99
+ ## Step 5: Suggest next steps
100
+
101
+ After displaying the list, suggest:
102
+
103
+ > Use `/gh:work <issue#>` to start working on an issue.
104
+
105
+ If no issues have priority labels at all, also suggest:
106
+
107
+ > Add priority labels (`priority:critical`, `priority:high`, `priority:medium`, `priority:low`) to your issues to use this command effectively.
108
+
109
+ </process>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-github-skills",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "GitHub-focused skills for Claude Code: work on issues, review PRs, fix PR feedback",
5
5
  "bin": {
6
6
  "claude-github-skills": "bin/install.js"