Skip to content

Commit 03a1dcf

Browse files
authored
Add git-workflow plugin with /ship and /pr:review commands (#10)
* Add git-workflow plugin with /ship and /pr:review commands Standalone git workflow commands that work independently of the EARS ticket lifecycle. /ship reviews changes, commits, pushes, and optionally creates a PR with user confirmation. /pr:review conducts aggressive analysis on any PR by number/URL or auto-detect and posts findings as a comment (never approves or merges). Both commands are optionally ticket-aware when context exists. * Fix 3 CodeRabbit issues from PR review - ship/SKILL.md: Add Edit, Write to allowed-tools so Phase 5 "Fix Selected Items" can actually modify files - pr-review/SKILL.md: Fix broken grep invocation where glob patterns after -- were treated as filenames instead of filtering stdin - README.md: Add `text` language tag to 3 unlabelled fenced code blocks (markdownlint MD040) --------- Co-authored-by: AnExiledDev <AnExiledDev@users.noreply.github.com>
1 parent 8e0f1fd commit 03a1dcf

File tree

9 files changed

+813
-2
lines changed

9 files changed

+813
-2
lines changed

.devcontainer/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
#### Claude Code Installation
1414
- **Post-start onboarding hook** (`99-claude-onboarding.sh`) — ensures `hasCompletedOnboarding: true` in `.claude.json` when token auth is configured; catches overwrites from Claude Code CLI/extension that race with `postStartCommand`
1515

16+
#### Git Workflow Plugin
17+
- **`/ship`** — Combined commit/push/PR command with full code review, commit message approval, and AskUserQuestion confirmation before PR creation; optionally links to tickets if context exists
18+
- **`/pr:review`** — Review any PR by number/URL or auto-detect from current branch; posts findings as PR comment with severity ratings; never approves or merges
19+
1620
### Changed
1721

1822
#### Claude Code Installation

.devcontainer/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Declared in `settings.json` under `enabledPlugins`, auto-activated on start:
8989
- **protected-files-guard** — Blocks edits to secrets/lock files
9090
- **codeforge-lsp** — LSP for Python + TypeScript/JavaScript
9191
- **ticket-workflow** — EARS ticket workflow + auto-linking
92+
- **git-workflow** — Standalone ship (commit/push/PR) + PR review
9293
- **notify-hook** — Desktop notifications on completion
9394
- **frontend-design** (Anthropic official) — UI/frontend design skill
9495
- **prompt-snippets** — Quick behavioral mode switches via /ps command

.devcontainer/config/defaults/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
"session-context@devs-marketplace": true,
6666
"auto-code-quality@devs-marketplace": true,
6767
"workspace-scope-guard@devs-marketplace": true,
68-
"prompt-snippets@devs-marketplace": true
68+
"prompt-snippets@devs-marketplace": true,
69+
"git-workflow@devs-marketplace": true
6970
},
7071
"autoUpdatesChannel": "latest"
7172
}

.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@
105105
"source": "./plugins/prompt-snippets",
106106
"category": "productivity",
107107
"keywords": ["snippets", "prompts", "modes", "shortcuts"]
108+
},
109+
{
110+
"name": "git-workflow",
111+
"description": "Standalone git workflow: ship (commit/push/PR) and PR review",
112+
"version": "1.0.0",
113+
"source": "./plugins/git-workflow",
114+
"category": "workflow",
115+
"keywords": ["git", "commit", "push", "pr", "review", "ship"]
108116
}
109117
]
110118
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "git-workflow",
3+
"description": "Standalone git workflow: review, commit, push, PR creation, and PR review",
4+
"author": {
5+
"name": "AnExiledDev"
6+
}
7+
}
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# git-workflow
2+
3+
Claude Code plugin that provides standalone git workflow commands. Not tied to the EARS ticket lifecycle — works independently, but optionally links to tickets when context exists.
4+
5+
## What It Does
6+
7+
Provides two slash commands for shipping code and reviewing pull requests.
8+
9+
### Slash Commands
10+
11+
| Command | Description |
12+
|---------|-------------|
13+
| `/ship` | Review all changes, commit with a detailed message, push, and optionally create a PR |
14+
| `/pr:review` | Review an existing PR by number/URL or auto-detect from current branch (never merges) |
15+
16+
## How It Works
17+
18+
### `/ship` Workflow
19+
20+
```text
21+
/ship [optional commit message hint]
22+
23+
└─→ Gather context (git status, diff, branch, project rules)
24+
25+
└─→ Full review (security, rules, quality, architecture, tests)
26+
27+
└─→ Present findings → User decisions (fix/issue/ignore)
28+
29+
└─→ Draft commit message → User approval
30+
31+
└─→ Commit + Push
32+
33+
└─→ AskUserQuestion: "Create a PR?"
34+
35+
├─→ Yes: Create PR (+ link ticket if context exists)
36+
└─→ No: Done
37+
```
38+
39+
### `/pr:review` Workflow
40+
41+
```text
42+
/pr:review [PR number, URL, or omit for auto-detect]
43+
44+
└─→ Identify target PR (argument, auto-detect, or ask)
45+
46+
└─→ Fetch PR details + diff + changed files
47+
48+
└─→ Aggressive analysis (attack surface, threats, deps, rules, architecture, quality, tests, breaking changes)
49+
50+
└─→ Present findings → User decisions (note/issue/ignore)
51+
52+
└─→ Post review comment (NEVER approve/merge)
53+
```
54+
55+
### Ticket Awareness
56+
57+
Both commands are **optionally ticket-aware**:
58+
- If a ticket number exists in the session context (from a prior `/ticket:work` call), it is linked in commit messages, PRs, and issue comments
59+
- If reviewing a PR that references a ticket in its body (`Closes #N`, `Refs #N`), requirements are verified against the diff
60+
- Neither command prompts for a ticket — they work fully standalone
61+
62+
### Review Depth
63+
64+
| Command | Review Depth | Purpose |
65+
|---------|-------------|---------|
66+
| `/ship` | Full (same as `/ticket:review-commit`) | Pre-commit gate — catches issues before they enter history |
67+
| `/pr:review` | Aggressive (same as `/ticket:create-pr`) | Final gate — deep security, threat modeling, and architecture review |
68+
69+
### Finding Severity Levels
70+
71+
| Level | Meaning |
72+
|-------|---------|
73+
| Critical | Active vulnerability, data exposure, auth bypass, breaking production |
74+
| High | Security weakness, significant bug, major pattern violation |
75+
| Medium | Code smell, minor vulnerability, missing validation |
76+
| Low | Style, optimization, minor improvements |
77+
| Info | Observations, questions, future considerations |
78+
79+
## Installation
80+
81+
### CodeForge DevContainer
82+
83+
Pre-installed and activated automatically — no setup needed.
84+
85+
### From GitHub
86+
87+
Use this plugin in any Claude Code setup:
88+
89+
1. Clone the [CodeForge](https://github.com/AnExiledDev/CodeForge) repository:
90+
91+
```bash
92+
git clone https://github.com/AnExiledDev/CodeForge.git
93+
```
94+
95+
2. Enable the plugin in your `.claude/settings.json`:
96+
97+
```json
98+
{
99+
"enabledPlugins": {
100+
"git-workflow@<clone-path>/.devcontainer/plugins/devs-marketplace": true
101+
}
102+
}
103+
```
104+
105+
Replace `<clone-path>` with the absolute path to your CodeForge clone.
106+
107+
## Plugin Structure
108+
109+
```text
110+
git-workflow/
111+
├── .claude-plugin/
112+
│ └── plugin.json # Plugin metadata
113+
├── skills/
114+
│ ├── ship/
115+
│ │ └── SKILL.md # /ship command definition
116+
│ └── pr-review/
117+
│ └── SKILL.md # /pr:review command definition
118+
└── README.md # This file
119+
```
120+
121+
## Requirements
122+
123+
- Claude Code with plugin command support
124+
- [GitHub CLI](https://cli.github.com/) (`gh`) installed and authenticated
125+
- A GitHub repository as the working context

0 commit comments

Comments
 (0)