Skip to content

Commit 8254bb3

Browse files
authored
Merge pull request #33 from NeoLabHQ/feature/vg/git/add-worktrees-and-notes
feat(git): add git worktrees and notes skills
2 parents 49be11a + e176f88 commit 8254bb3

File tree

15 files changed

+1507
-229
lines changed

15 files changed

+1507
-229
lines changed

.claude-plugin/marketplace.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
33
"name": "context-engineering-kit",
4-
"version": "1.7.3",
4+
"version": "1.8.0",
55
"description": "Hand-crafted collection of advanced context engineering techniques and patterns with minimal token footprint focused on improving agent result quality.",
66
"owner": {
77
"name": "NeoLabHQ",
@@ -32,8 +32,8 @@
3232
},
3333
{
3434
"name": "git",
35-
"description": "Introduces commands for commit and PRs creation.",
36-
"version": "1.0.3",
35+
"description": "Introduces commands for commit and PRs creation, plus skills for git worktrees and notes.",
36+
"version": "1.1.0",
3737
"author": {
3838
"name": "Vlad Goncharov",
3939
"email": "vlad.goncharov@neolab.finance"
@@ -55,7 +55,7 @@
5555
{
5656
"name": "sadd",
5757
"description": "Introduces skills for subagent-driven development, dispatches fresh subagent for each task with code review between tasks, enabling fast iteration with quality gates.",
58-
"version": "1.1.0",
58+
"version": "1.1.1",
5959
"author": {
6060
"name": "Vlad Goncharov",
6161
"email": "vlad.goncharov@neolab.finance"
@@ -99,7 +99,7 @@
9999
{
100100
"name": "customaize-agent",
101101
"description": "Commands and skills for writing and refining commands, hooks, skills for Claude Code, includes Anthropic Best Practices and Agent Persuasion Principles that can be useful for sub-agent workflows.",
102-
"version": "1.3.0",
102+
"version": "1.3.1",
103103
"author": {
104104
"name": "Vlad Goncharov",
105105
"email": "vlad.goncharov@neolab.finance"

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ jobs:
300300
301301
### Git
302302
303-
Commands for streamlined Git operations including commits and pull request creation.
303+
Commands and skills for streamlined Git operations including commits, pull request creation, and advanced workflow patterns.
304304
305305
**How to install**
306306
@@ -315,6 +315,11 @@ Commands for streamlined Git operations including commits and pull request creat
315315
- `/git:analyze-issue` - Analyze a GitHub issue and create a detailed technical specification
316316
- `/git:load-issues` - Load all open issues from GitHub and save them as markdown files
317317

318+
**Skills**
319+
320+
- **worktrees** - Git worktree commands and workflow patterns for parallel branch development
321+
- **notes** - Git notes commands for attaching non-invasive metadata to commits
322+
318323
### Test-Driven Development
319324

320325
Commands and skills for test-driven development with anti-pattern detection.

docs/plugins/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,17 @@ Code quality and architecture patterns including Clean Architecture and SOLID pr
157157

158158
#### Git
159159

160-
Streamlined Git operations with conventional commits and pull request management.
160+
Streamlined Git operations with conventional commits, pull request management, and advanced workflow patterns.
161161

162162
**Key Features:**
163163

164164
* Conventional commits with emoji
165165
* Pull request creation
166166
* Issue analysis and loading
167+
* Git worktrees for parallel branch development
168+
* Git notes for commit metadata annotations
167169

168-
**When to use:** For all Git operations to maintain commit and PR quality.
170+
**When to use:** For all Git operations to maintain commit and PR quality, or when working on multiple branches simultaneously.
169171

170172
[Full Documentation](git/)
171173

docs/plugins/git/README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,73 @@ PR number or URL (optional - can work with current branch).
258258
> /git:attach-review-to-pr 456
259259
```
260260

261+
## Skills Overview
262+
263+
### worktrees - Parallel Branch Development
264+
265+
Use when working on multiple branches simultaneously, context switching without stashing, reviewing PRs while developing, testing in isolation, or comparing implementations across branches.
266+
267+
- Purpose - Provide git worktree commands and workflow patterns for parallel development
268+
- Core Principle - One worktree per active branch; switch contexts by changing directories
269+
270+
**Key Concepts**
271+
272+
| Concept | Description |
273+
|---------|-------------|
274+
| Main worktree | Original working directory from `git clone` or `git init` |
275+
| Linked worktree | Additional directories created with `git worktree add` |
276+
| Shared `.git` | All worktrees share same Git object database (no duplication) |
277+
| Branch lock | Each branch can only be checked out in ONE worktree at a time |
278+
279+
**Quick Reference**
280+
281+
| Task | Command |
282+
|------|---------|
283+
| Create worktree (existing branch) | `git worktree add <path> <branch>` |
284+
| Create worktree (new branch) | `git worktree add -b <branch> <path>` |
285+
| List all worktrees | `git worktree list` |
286+
| Remove worktree | `git worktree remove <path>` |
287+
288+
**Common Workflows**
289+
290+
- **Feature + Hotfix in Parallel** - Create worktree for hotfix while feature work continues
291+
- **PR Review While Working** - Create temporary worktree to review PRs without stashing
292+
- **Compare Implementations** - Create worktrees for different versions to diff side-by-side
293+
- **Long-Running Tasks** - Run tests in isolated worktree while continuing development
294+
295+
### notes - Commit Metadata Annotations
296+
297+
Use when adding metadata to commits without changing history, tracking review status, test results, code quality annotations, or supplementing commit messages post-hoc.
298+
299+
- Purpose - Attach non-invasive metadata to Git objects without modifying commit history
300+
- Core Principle - Add information to commits after creation without rewriting history
301+
302+
**Key Concepts**
303+
304+
| Concept | Description |
305+
|---------|-------------|
306+
| Notes ref | Storage location, default `refs/notes/commits` |
307+
| Non-invasive | Notes never modify SHA of original object |
308+
| Namespaces | Use `--ref` for different note categories (reviews, testing, audit) |
309+
| Display | Notes appear in `git log` and `git show` output |
310+
311+
**Quick Reference**
312+
313+
| Task | Command |
314+
|------|---------|
315+
| Add note | `git notes add -m "message" <sha>` |
316+
| View note | `git notes show <sha>` |
317+
| Append to note | `git notes append -m "message" <sha>` |
318+
| Use namespace | `git notes --ref=<name> <command>` |
319+
| Push notes | `git push origin refs/notes/<name>` |
320+
321+
**Common Use Cases**
322+
323+
- **Code Review Tracking** - Mark commits as reviewed with reviewer attribution
324+
- **Test Results Annotation** - Record test pass/fail status and coverage
325+
- **Audit Trail** - Attach security review or compliance information
326+
- **Sharing Notes** - Push/fetch notes to share metadata with team
327+
261328
## Conventional Commit Format
262329

263330
The plugin follows the [conventional commits specification](https://www.conventionalcommits.org/):

docs/reference/skills.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ Continuous improvement methodology with multiple analysis techniques. [More info
2929

3030
- `kaizen` - Japanese continuous improvement philosophy with root cause analysis, Five Whys, PDCA cycles, and lean practices.
3131

32+
### Git
33+
34+
Streamlined Git operations with advanced workflow patterns. [More info](../plugins/git/README.md).
35+
36+
- `worktrees` - Use when working on multiple branches simultaneously, context switching without stashing, reviewing PRs while developing, testing in isolation, or comparing implementations across branches.
37+
- `notes` - Use when adding metadata to commits without changing history, tracking review status, test results, code quality annotations, or supplementing commit messages post-hoc.
38+
3239
### Customaize Agent
3340

3441
Prompt engineering techniques and patterns for creating effective extensions. [More info](../plugins/customaize-agent/README.md).

plugins/customaize-agent/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "customaize-agent",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Commands and skills for writing and refining commands, hooks, skills for Claude Code, includes Anthropic Best Practices and Agent Persuasion Principles that can be useful for sub-agent workflows.",
55
"author": {
66
"name": "Vlad Goncharov",

plugins/customaize-agent/commands/create-skill.md

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -448,26 +448,6 @@ When: Reference material too large for inline
448448
449449
## The Iron Law (Same as TDD)
450450
451-
```
452-
NO SKILL WITHOUT A FAILING TEST FIRST
453-
```
454-
455-
This applies to NEW skills AND EDITS to existing skills.
456-
457-
Write skill before testing? Delete it. Start over.
458-
Edit skill without testing? Same violation.
459-
460-
**No exceptions:**
461-
462-
- Not for "simple additions"
463-
- Not for "just adding a section"
464-
- Not for "documentation updates"
465-
- Don't keep untested changes as "reference"
466-
- Don't "adapt" while running tests
467-
- Delete means delete
468-
469-
**REQUIRED BACKGROUND:** The superpowers:test-driven-development skill explains why this matters. Same principles apply to documentation.
470-
471451
## Testing All Skill Types
472452
473453
Different skill types need different test approaches:
@@ -521,21 +501,6 @@ Different skill types need different test approaches:
521501
522502
**Success criteria:** Agent finds and correctly applies reference information
523503
524-
## Common Rationalizations for Skipping Testing
525-
526-
| Excuse | Reality |
527-
|--------|---------|
528-
| "Skill is obviously clear" | Clear to you ≠ clear to other agents. Test it. |
529-
| "It's just a reference" | References can have gaps, unclear sections. Test retrieval. |
530-
| "Testing is overkill" | Untested skills have issues. Always. 15 min testing saves hours. |
531-
| "I'll test if problems emerge" | Problems = agents can't use skill. Test BEFORE deploying. |
532-
| "Too tedious to test" | Testing is less tedious than debugging bad skill in production. |
533-
| "I'm confident it's good" | Overconfidence guarantees issues. Test anyway. |
534-
| "Academic review is enough" | Reading ≠ using. Test application scenarios. |
535-
| "No time to test" | Deploying untested skill wastes more time fixing it later. |
536-
537-
**All of these mean: Test before deploying. No exceptions.**
538-
539504
## Bulletproofing Skills Against Rationalization
540505
541506
Skills that enforce discipline (like TDD) need to resist rationalization. Agents are smart and will find loopholes when under pressure.

plugins/git/.claude-plugin/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "git",
3-
"version": "1.0.3",
4-
"description": "Introduces commands for commit and PRs creation.",
3+
"version": "1.1.0",
4+
"description": "Introduces commands for commit and PRs creation, plus skills for git worktrees and notes.",
55
"author": {
66
"name": "Vlad Goncharov",
77
"email": "vlad.goncharov@neolab.finance"

plugins/git/README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,73 @@ PR number or URL (optional - can work with current branch).
258258
> /git:attach-review-to-pr 456
259259
```
260260

261+
## Skills Overview
262+
263+
### worktrees - Parallel Branch Development
264+
265+
Use when working on multiple branches simultaneously, context switching without stashing, reviewing PRs while developing, testing in isolation, or comparing implementations across branches.
266+
267+
- Purpose - Provide git worktree commands and workflow patterns for parallel development
268+
- Core Principle - One worktree per active branch; switch contexts by changing directories
269+
270+
**Key Concepts**
271+
272+
| Concept | Description |
273+
|---------|-------------|
274+
| Main worktree | Original working directory from `git clone` or `git init` |
275+
| Linked worktree | Additional directories created with `git worktree add` |
276+
| Shared `.git` | All worktrees share same Git object database (no duplication) |
277+
| Branch lock | Each branch can only be checked out in ONE worktree at a time |
278+
279+
**Quick Reference**
280+
281+
| Task | Command |
282+
|------|---------|
283+
| Create worktree (existing branch) | `git worktree add <path> <branch>` |
284+
| Create worktree (new branch) | `git worktree add -b <branch> <path>` |
285+
| List all worktrees | `git worktree list` |
286+
| Remove worktree | `git worktree remove <path>` |
287+
288+
**Common Workflows**
289+
290+
- **Feature + Hotfix in Parallel** - Create worktree for hotfix while feature work continues
291+
- **PR Review While Working** - Create temporary worktree to review PRs without stashing
292+
- **Compare Implementations** - Create worktrees for different versions to diff side-by-side
293+
- **Long-Running Tasks** - Run tests in isolated worktree while continuing development
294+
295+
### notes - Commit Metadata Annotations
296+
297+
Use when adding metadata to commits without changing history, tracking review status, test results, code quality annotations, or supplementing commit messages post-hoc.
298+
299+
- Purpose - Attach non-invasive metadata to Git objects without modifying commit history
300+
- Core Principle - Add information to commits after creation without rewriting history
301+
302+
**Key Concepts**
303+
304+
| Concept | Description |
305+
|---------|-------------|
306+
| Notes ref | Storage location, default `refs/notes/commits` |
307+
| Non-invasive | Notes never modify SHA of original object |
308+
| Namespaces | Use `--ref` for different note categories (reviews, testing, audit) |
309+
| Display | Notes appear in `git log` and `git show` output |
310+
311+
**Quick Reference**
312+
313+
| Task | Command |
314+
|------|---------|
315+
| Add note | `git notes add -m "message" <sha>` |
316+
| View note | `git notes show <sha>` |
317+
| Append to note | `git notes append -m "message" <sha>` |
318+
| Use namespace | `git notes --ref=<name> <command>` |
319+
| Push notes | `git push origin refs/notes/<name>` |
320+
321+
**Common Use Cases**
322+
323+
- **Code Review Tracking** - Mark commits as reviewed with reviewer attribution
324+
- **Test Results Annotation** - Record test pass/fail status and coverage
325+
- **Audit Trail** - Attach security review or compliance information
326+
- **Sharing Notes** - Push/fetch notes to share metadata with team
327+
261328
## Conventional Commit Format
262329

263330
The plugin follows the [conventional commits specification](https://www.conventionalcommits.org/):

0 commit comments

Comments
 (0)