Skip to content

Commit 726b23c

Browse files
authored
Merge pull request #22 from netresearch/feature/evals-and-improvements
feat: expand evals to 20 and improve SKILL.md
2 parents c5dd869 + 646a62b commit 726b23c

4 files changed

Lines changed: 363 additions & 42 deletions

File tree

.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": "git-workflow",
3-
"version": "1.10.0",
3+
"version": "1.11.0",
44
"description": "Git workflow best practices with commit validation hooks",
55
"repository": "https://github.com/netresearch/git-workflow-skill",
66
"license": "(MIT AND CC-BY-SA-4.0)",

evals/evals.json

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,91 @@
55
"id": 1,
66
"name": "recommend-hooks-go",
77
"prompt": "What git hooks should I set up for a Go project? Give me a ready-to-use config.",
8-
"expected_output": "Should recommend lefthook with a template config covering pre-commit, commit-msg, pre-push"
8+
"expected_output": "Should recommend lefthook with a template config covering pre-commit (gofmt, go vet), commit-msg, pre-push (golangci-lint)"
99
},
1010
{
1111
"id": 2,
1212
"name": "recommend-hooks-php",
1313
"prompt": "What git hooks framework should I use for a TYPO3 PHP extension?",
14-
"expected_output": "Should recommend captainhook with setup instructions"
14+
"expected_output": "Should recommend captainhook with setup instructions including php-cs-fixer and phpstan"
15+
},
16+
{
17+
"id": 3,
18+
"name": "choose-branching-strategy",
19+
"prompt": "We're a 4-person team shipping a SaaS product with continuous deployment. Which branching strategy fits best?",
20+
"expected_output": "Should recommend GitHub Flow or trunk-based development, explain why Git Flow is overkill for small continuous-deploy teams"
21+
},
22+
{
23+
"id": 4,
24+
"name": "breaking-change-commit",
25+
"prompt": "Write a conventional commit message for removing the deprecated /api/v1 endpoints.",
26+
"expected_output": "Should use feat! or fix! prefix and include BREAKING CHANGE footer explaining migration path"
27+
},
28+
{
29+
"id": 5,
30+
"name": "resolve-review-threads",
31+
"prompt": "How do I programmatically reply to and resolve PR review threads using the gh CLI?",
32+
"expected_output": "Should show gh api graphql mutations for addPullRequestReviewThreadReply and resolveReviewThread"
33+
},
34+
{
35+
"id": 6,
36+
"name": "immutable-release-recovery",
37+
"prompt": "I deleted a GitHub release v2.0.0 and now I can't recreate it. What happened?",
38+
"expected_output": "Should explain GitHub immutable releases (GA Oct 2024), that deleted release tags are permanently blocked, and advise bumping to v2.0.1"
39+
},
40+
{
41+
"id": 7,
42+
"name": "signed-commits-rebase",
43+
"prompt": "gh pr merge --rebase fails with 'Base branch requires signed commits'. How do I merge this PR?",
44+
"expected_output": "Should explain GitHub can't sign rebased commits, recommend local fast-forward merge with --ff-only to preserve original signatures"
45+
},
46+
{
47+
"id": 8,
48+
"name": "multi-branch-latest-badge",
49+
"prompt": "When I release v11.0.17 after v13.5.0, the Latest badge moves to v11. How to prevent?",
50+
"expected_output": "Should recommend --latest=false for non-default branch releases, show gh release edit to reassign badge"
51+
},
52+
{
53+
"id": 9,
54+
"name": "git-bisect-automated",
55+
"prompt": "Tests pass on v1.0 but fail on HEAD. How do I automate finding the breaking commit?",
56+
"expected_output": "Should show git bisect start + git bisect run with test command for automated binary search"
57+
},
58+
{
59+
"id": 10,
60+
"name": "cherry-pick-backport",
61+
"prompt": "How do I backport a security fix from main to the release/2.x branch?",
62+
"expected_output": "Should show git cherry-pick workflow with -x flag, conflict resolution, and force-push if needed"
63+
},
64+
{
65+
"id": 11,
66+
"name": "pr-merge-full-lifecycle",
67+
"prompt": "Walk me through the complete PR merge lifecycle from CI verification to post-merge cleanup.",
68+
"expected_output": "Should cover: gh pr checks, annotation inspection, thread resolution, merge strategy selection, post-merge branch cleanup"
69+
},
70+
{
71+
"id": 12,
72+
"name": "setup-branch-protection",
73+
"prompt": "Set up branch protection for main requiring 2 reviews, CI checks, and signed commits.",
74+
"expected_output": "Should show GitHub branch protection configuration with required_approving_reviews, required_status_checks, and signed commits"
75+
},
76+
{
77+
"id": 13,
78+
"name": "semantic-release-setup",
79+
"prompt": "Configure semantic release for automated versioning based on conventional commits.",
80+
"expected_output": "Should show .releaserc config with commit-analyzer, release-notes-generator, and GitHub Actions integration"
81+
},
82+
{
83+
"id": 14,
84+
"name": "git-absorb-review-fixes",
85+
"prompt": "I need to fix code in 3 different commits from review feedback. How do I avoid messy interactive rebase?",
86+
"expected_output": "Should recommend git-absorb for automatic fixup commit creation, then autosquash rebase"
87+
},
88+
{
89+
"id": 15,
90+
"name": "worktree-review-workflow",
91+
"prompt": "How do I review a PR without stashing my current work?",
92+
"expected_output": "Should recommend git worktree to create separate working directory for the review branch"
1593
}
1694
]
1795
}

skills/git-workflow/SKILL.md

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license: "(MIT AND CC-BY-SA-4.0). See LICENSE-MIT and LICENSE-CC-BY-SA-4.0"
55
compatibility: "Requires git, gh CLI."
66
metadata:
77
author: Netresearch DTT GmbH
8-
version: "1.10.0"
8+
version: "1.11.0"
99
repository: https://github.com/netresearch/git-workflow-skill
1010
allowed-tools: Bash(git:*) Bash(gh:*) Read Write
1111
---
@@ -14,35 +14,22 @@ allowed-tools: Bash(git:*) Bash(gh:*) Read Write
1414

1515
Expert patterns for Git version control: branching, commits, collaboration, and CI/CD.
1616

17-
## Expertise Areas
18-
19-
- **Branching**: Git Flow, GitHub Flow, Trunk-based development
20-
- **Commits**: Conventional Commits, semantic versioning
21-
- **Collaboration**: PR workflows, code review, merge strategies, thread resolution
22-
- **CI/CD**: GitHub Actions, GitLab CI, branch protection
23-
2417
## Reference Files
2518

26-
| Reference | When to Load |
27-
|-----------|--------------|
28-
| `references/branching-strategies.md` | Managing branches, choosing branching model |
29-
| `references/commit-conventions.md` | Writing commits, semantic versioning |
30-
| `references/pull-request-workflow.md` | Creating/reviewing PRs, thread resolution, merging |
31-
| `references/ci-cd-integration.md` | CI/CD automation, GitHub Actions |
32-
| `references/advanced-git.md` | Rebasing, cherry-picking, bisecting |
33-
| `references/github-releases.md` | Release management, immutable releases |
34-
| `references/git-hooks-setup.md` | Hook frameworks, detection, recommended hooks |
35-
| `references/code-quality-tools.md` | Shell linting, formatting, smart fixups, structural diffs |
36-
37-
### Content Triggers
19+
Load references on demand based on the task at hand:
3820

39-
- **PR operations** (create, review, merge, thread resolution, conflicts, CI checks): load `references/pull-request-workflow.md`
40-
- **Branching strategy**: load `references/branching-strategies.md`
41-
- **Commit messages**: load `references/commit-conventions.md`
42-
- **Releases**: load `references/github-releases.md`
43-
- **Git hooks**: detect with `ls lefthook.yml captainhook.json .pre-commit-config.yaml .husky/pre-commit 2>/dev/null`. Details in `references/git-hooks-setup.md`
21+
| Reference | Content Triggers |
22+
|-----------|-----------------|
23+
| `references/branching-strategies.md` | Branching model, Git Flow, GitHub Flow, trunk-based, branch protection |
24+
| `references/commit-conventions.md` | Commit messages, conventional commits, semantic versioning, commitlint |
25+
| `references/pull-request-workflow.md` | PR create/review/merge, thread resolution, merge strategies, CODEOWNERS, signed commits + rebase |
26+
| `references/ci-cd-integration.md` | GitHub Actions, GitLab CI, semantic release, deployment |
27+
| `references/advanced-git.md` | Rebase, cherry-pick, bisect, stash, worktrees, reflog, submodules, recovery |
28+
| `references/github-releases.md` | Release management, immutable releases, `--latest=false`, multi-branch |
29+
| `references/git-hooks-setup.md` | Hook frameworks, detection, recommended hooks per stage |
30+
| `references/code-quality-tools.md` | shellcheck, shfmt, git-absorb, difftastic |
4431

45-
## Conventional Commits (Quick Reference)
32+
## Conventional Commits
4633

4734
```
4835
<type>[scope]: <description>
@@ -54,32 +41,32 @@ Expert patterns for Git version control: branching, commits, collaboration, and
5441

5542
## Branch Naming
5643

57-
```bash
44+
```
5845
feature/TICKET-123-description
5946
fix/TICKET-456-bug-name
6047
release/1.2.0
6148
hotfix/1.2.1-security-patch
6249
```
6350

64-
## GitHub Flow (Default)
51+
## Hook Detection
52+
53+
Before first commit, detect and install hooks:
6554

6655
```bash
67-
git checkout main && git pull
68-
git checkout -b feature/my-feature
69-
# ... work ...
70-
git push -u origin HEAD
71-
gh pr create && gh pr merge --squash
56+
ls lefthook.yml .lefthook.yml captainhook.json .pre-commit-config.yaml .husky/pre-commit 2>/dev/null || echo "No hooks"
7257
```
7358

74-
Before first commit, install git hooks — see `references/git-hooks-setup.md`.
59+
Install: lefthook.yml -> `lefthook install` | captainhook.json -> `composer install` | .husky/ -> `npm install` | .pre-commit-config.yaml -> `pre-commit install`
7560

76-
For code quality tools (shellcheck, shfmt, git-absorb, difft), see `references/code-quality-tools.md`.
61+
## Critical Release Rules
7762

78-
## GitHub Immutable Releases
63+
1. **Immutable releases**: Deleted GitHub releases block tag names PERMANENTLY. Never delete releases to "fix" issues -- bump version instead.
64+
2. **Multi-branch releases**: Always use `--latest=false` when releasing from non-default branches (LTS, maintenance, hotfix).
65+
3. **Pre-release checklist**: Version updated in source files, CI passes, CHANGELOG updated, `git pull` on main -- verify BEFORE `gh release create`.
7966

80-
**CRITICAL**: Deleted releases block tag names PERMANENTLY. Get releases right first time.
67+
## PR Merge Requirements
8168

82-
See `references/github-releases.md` for prevention and recovery patterns.
69+
Before merging: all threads resolved, CI checks green (including annotations), branch rebased, commits signed (if required). For signed commits + rebase-only repos, use local `git merge --ff-only`.
8370

8471
## Verification
8572

0 commit comments

Comments
 (0)