@olegkoval/agent-skills 1.28.0 → 1.30.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/.claude-plugin/plugin.json +7 -2
- package/.cursor-plugin/index.json +26 -1
- package/.grok-plugin/index.json +26 -1
- package/.kiro/steering/garmin-watchface.md +83 -31
- package/.windsurf/rules/garmin-watchface.md +83 -31
- package/README.md +8 -3
- package/catalog/skills.json +117 -1
- package/collections/software-development.json +2 -1
- package/package.json +1 -1
- package/packages/software-development/branch-cleanup/SKILL.md +204 -0
- package/packages/software-development/branch-cleanup/adapters/claude/plugin.json +5 -0
- package/packages/software-development/branch-cleanup/adapters/claude/skills/branch-cleanup/SKILL.md +205 -0
- package/packages/software-development/branch-cleanup/adapters/codex/README.md +19 -0
- package/packages/software-development/branch-cleanup/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/branch-cleanup/adapters/cursor/skills/branch-cleanup/SKILL.md +205 -0
- package/packages/software-development/branch-cleanup/adapters/grok/plugin.json +6 -0
- package/packages/software-development/branch-cleanup/adapters/grok/skills/branch-cleanup/SKILL.md +205 -0
- package/packages/software-development/morning-routine/SKILL.md +149 -0
- package/packages/software-development/morning-routine/adapters/claude/plugin.json +5 -0
- package/packages/software-development/morning-routine/adapters/claude/skills/morning-routine/SKILL.md +150 -0
- package/packages/software-development/morning-routine/adapters/codex/README.md +19 -0
- package/packages/software-development/morning-routine/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/morning-routine/adapters/cursor/skills/morning-routine/SKILL.md +150 -0
- package/packages/software-development/morning-routine/adapters/grok/plugin.json +6 -0
- package/packages/software-development/morning-routine/adapters/grok/skills/morning-routine/SKILL.md +150 -0
- package/packages/software-development/pr-finalize-complete/adapters/claude/plugin.json +1 -1
- package/packages/software-development/pr-finalize-complete/adapters/codex/README.md +7 -11
- package/packages/software-development/pr-finalize-complete/adapters/cursor/plugin.json +1 -1
- package/packages/software-development/pr-finalize-complete/adapters/grok/plugin.json +1 -1
- package/packages/software-development/release-day/SKILL.md +286 -0
- package/packages/software-development/release-day/adapters/claude/plugin.json +5 -0
- package/packages/software-development/release-day/adapters/claude/skills/release-day/SKILL.md +287 -0
- package/packages/software-development/release-day/adapters/codex/README.md +19 -0
- package/packages/software-development/release-day/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/release-day/adapters/cursor/skills/release-day/SKILL.md +287 -0
- package/packages/software-development/release-day/adapters/grok/plugin.json +6 -0
- package/packages/software-development/release-day/adapters/grok/skills/release-day/SKILL.md +287 -0
- package/packages/software-development/vinted-listing/SKILL.md +58 -0
- package/packages/software-development/vinted-listing/adapters/claude/plugin.json +5 -0
- package/packages/software-development/vinted-listing/adapters/claude/skills/vinted-listing/SKILL.md +59 -0
- package/packages/software-development/vinted-listing/adapters/claude/skills/vinted-listing/references/photo-and-duplicate-policy.md +20 -0
- package/packages/software-development/vinted-listing/adapters/codex/README.md +3 -0
- package/packages/software-development/vinted-listing/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/vinted-listing/adapters/cursor/skills/vinted-listing/SKILL.md +59 -0
- package/packages/software-development/vinted-listing/adapters/cursor/skills/vinted-listing/references/photo-and-duplicate-policy.md +20 -0
- package/packages/software-development/vinted-listing/adapters/grok/plugin.json +6 -0
- package/packages/software-development/vinted-listing/adapters/grok/skills/vinted-listing/SKILL.md +59 -0
- package/packages/software-development/vinted-listing/adapters/grok/skills/vinted-listing/references/photo-and-duplicate-policy.md +20 -0
- package/packages/software-development/vinted-listing/references/photo-and-duplicate-policy.md +20 -0
- package/packages/wearables/garmin-watchface/SKILL.md +82 -35
- package/packages/wearables/garmin-watchface/adapters/claude/plugin.json +1 -1
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/SKILL.md +82 -35
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/references/design-proposals.md +99 -0
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/references/devices.md +112 -0
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/references/display.md +78 -3
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/references/inspiration-wizard.md +140 -0
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/references/layout.md +28 -0
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/references/publishing.md +134 -5
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/references/simulator.md +86 -2
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/scripts/ciq-inspire +329 -0
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/scripts/ciq-mock +502 -0
- package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/scripts/ciq-release +12 -6
- package/packages/wearables/garmin-watchface/adapters/cursor/plugin.json +1 -1
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/SKILL.md +82 -35
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/references/design-proposals.md +99 -0
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/references/devices.md +112 -0
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/references/display.md +78 -3
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/references/inspiration-wizard.md +140 -0
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/references/layout.md +28 -0
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/references/publishing.md +134 -5
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/references/simulator.md +86 -2
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/scripts/ciq-inspire +329 -0
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/scripts/ciq-mock +502 -0
- package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/scripts/ciq-release +12 -6
- package/packages/wearables/garmin-watchface/adapters/grok/plugin.json +1 -1
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/SKILL.md +82 -35
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/references/design-proposals.md +99 -0
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/references/devices.md +112 -0
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/references/display.md +78 -3
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/references/inspiration-wizard.md +140 -0
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/references/layout.md +28 -0
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/references/publishing.md +134 -5
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/references/simulator.md +86 -2
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/scripts/ciq-inspire +329 -0
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/scripts/ciq-mock +502 -0
- package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/scripts/ciq-release +12 -6
- package/packages/wearables/garmin-watchface/adapters/kiro/steering/garmin-watchface.md +83 -31
- package/packages/wearables/garmin-watchface/adapters/windsurf/rules/garmin-watchface.md +83 -31
- package/packages/wearables/garmin-watchface/references/design-proposals.md +99 -0
- package/packages/wearables/garmin-watchface/references/devices.md +112 -0
- package/packages/wearables/garmin-watchface/references/display.md +78 -3
- package/packages/wearables/garmin-watchface/references/inspiration-wizard.md +140 -0
- package/packages/wearables/garmin-watchface/references/layout.md +28 -0
- package/packages/wearables/garmin-watchface/references/publishing.md +134 -5
- package/packages/wearables/garmin-watchface/references/simulator.md +86 -2
- package/packages/wearables/garmin-watchface/scripts/ciq-inspire +329 -0
- package/packages/wearables/garmin-watchface/scripts/ciq-mock +502 -0
- package/packages/wearables/garmin-watchface/scripts/ciq-release +12 -6
package/catalog/skills.json
CHANGED
|
@@ -628,7 +628,7 @@
|
|
|
628
628
|
"lookupName": "olko:garmin-watchface",
|
|
629
629
|
"category": "wearables",
|
|
630
630
|
"path": "packages/wearables/garmin-watchface",
|
|
631
|
-
"description": "
|
|
631
|
+
"description": "Design, build, test, screenshot and publish Garmin Connect IQ watch faces in Monkey C.",
|
|
632
632
|
"tags": [
|
|
633
633
|
"garmin",
|
|
634
634
|
"connect-iq",
|
|
@@ -930,6 +930,122 @@
|
|
|
930
930
|
"copilot",
|
|
931
931
|
"grok"
|
|
932
932
|
]
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "pr-finalize-complete",
|
|
936
|
+
"lookupName": "olko:pr-finalize-complete",
|
|
937
|
+
"category": "software-development",
|
|
938
|
+
"path": "packages/software-development/pr-finalize-complete",
|
|
939
|
+
"description": "Comprehensive PR finalization workflow for PRs that may already be partially addressed: checks each review comment's actual current status in code, distinguishes fixed vs. stale vs. still-present findings, verifies test coverage, runs real lint/test gates, and reports what still needs a human.",
|
|
940
|
+
"tags": [
|
|
941
|
+
"code-review",
|
|
942
|
+
"pull-requests",
|
|
943
|
+
"github",
|
|
944
|
+
"testing",
|
|
945
|
+
"automation",
|
|
946
|
+
"verification"
|
|
947
|
+
],
|
|
948
|
+
"adapters": [
|
|
949
|
+
"codex",
|
|
950
|
+
"claude",
|
|
951
|
+
"cursor",
|
|
952
|
+
"copilot",
|
|
953
|
+
"grok"
|
|
954
|
+
]
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"name": "morning-routine",
|
|
958
|
+
"lookupName": "olko:morning-routine",
|
|
959
|
+
"category": "software-development",
|
|
960
|
+
"path": "packages/software-development/morning-routine",
|
|
961
|
+
"description": "Run the complete start-of-day setup in one pass: roll over unfinished Obsidian tasks to today's daily note, sync open GitHub PRs that need your attention, and sweep Dependabot patch bumps. Chains obsidian-task-rollover, obsidian-pr-sync, and dependabot-triage.",
|
|
962
|
+
"tags": [
|
|
963
|
+
"morning",
|
|
964
|
+
"obsidian",
|
|
965
|
+
"daily-note",
|
|
966
|
+
"github",
|
|
967
|
+
"dependabot",
|
|
968
|
+
"productivity",
|
|
969
|
+
"routine",
|
|
970
|
+
"automation"
|
|
971
|
+
],
|
|
972
|
+
"adapters": [
|
|
973
|
+
"codex",
|
|
974
|
+
"claude",
|
|
975
|
+
"cursor",
|
|
976
|
+
"copilot",
|
|
977
|
+
"grok"
|
|
978
|
+
]
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
"name": "release-day",
|
|
982
|
+
"lookupName": "olko:release-day",
|
|
983
|
+
"category": "software-development",
|
|
984
|
+
"path": "packages/software-development/release-day",
|
|
985
|
+
"description": "Orchestrate a full release-day workflow for iOS, Android, or Garmin apps: verify main branch CI is green, generate changelog, draft platform-ready store listing copy, trigger semantic-release or tag manually, wait for the build, and queue the App Store submission.",
|
|
986
|
+
"tags": [
|
|
987
|
+
"release",
|
|
988
|
+
"ios",
|
|
989
|
+
"android",
|
|
990
|
+
"garmin",
|
|
991
|
+
"app-store",
|
|
992
|
+
"changelog",
|
|
993
|
+
"store-listing",
|
|
994
|
+
"semantic-release",
|
|
995
|
+
"deployment",
|
|
996
|
+
"automation"
|
|
997
|
+
],
|
|
998
|
+
"adapters": [
|
|
999
|
+
"codex",
|
|
1000
|
+
"claude",
|
|
1001
|
+
"cursor",
|
|
1002
|
+
"copilot",
|
|
1003
|
+
"grok"
|
|
1004
|
+
]
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
"name": "branch-cleanup",
|
|
1008
|
+
"lookupName": "olko:branch-cleanup",
|
|
1009
|
+
"category": "software-development",
|
|
1010
|
+
"path": "packages/software-development/branch-cleanup",
|
|
1011
|
+
"description": "Prune stale git branches after a merge wave: delete closed/merged remote branches, remove local tracking refs that no longer exist on the remote, and optionally clean up merged local branches. Natural follow-up to dependabot-triage.",
|
|
1012
|
+
"tags": [
|
|
1013
|
+
"git",
|
|
1014
|
+
"branches",
|
|
1015
|
+
"cleanup",
|
|
1016
|
+
"maintenance",
|
|
1017
|
+
"dependabot",
|
|
1018
|
+
"github"
|
|
1019
|
+
],
|
|
1020
|
+
"adapters": [
|
|
1021
|
+
"codex",
|
|
1022
|
+
"claude",
|
|
1023
|
+
"cursor",
|
|
1024
|
+
"copilot",
|
|
1025
|
+
"grok"
|
|
1026
|
+
]
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"name": "vinted-listing",
|
|
1030
|
+
"lookupName": "olko:vinted-listing",
|
|
1031
|
+
"category": "software-development",
|
|
1032
|
+
"path": "packages/software-development/vinted-listing",
|
|
1033
|
+
"description": "Create, edit, and safely publish Vinted listings through the signed-in browser, using verified item details and the owner’s original photos.",
|
|
1034
|
+
"tags": [
|
|
1035
|
+
"vinted",
|
|
1036
|
+
"marketplace",
|
|
1037
|
+
"selling",
|
|
1038
|
+
"browser",
|
|
1039
|
+
"photos",
|
|
1040
|
+
"moderation"
|
|
1041
|
+
],
|
|
1042
|
+
"adapters": [
|
|
1043
|
+
"codex",
|
|
1044
|
+
"claude",
|
|
1045
|
+
"cursor",
|
|
1046
|
+
"copilot",
|
|
1047
|
+
"grok"
|
|
1048
|
+
]
|
|
933
1049
|
}
|
|
934
1050
|
]
|
|
935
1051
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: branch-cleanup
|
|
3
|
+
description: >
|
|
4
|
+
Prune stale git branches after a merge wave: delete closed/merged remote branches,
|
|
5
|
+
remove local tracking branches that no longer exist on the remote, and optionally
|
|
6
|
+
clean up local branches already merged to main. Use after running dependabot-triage,
|
|
7
|
+
after a sprint wind-down, or when the user says "clean up branches", "prune branches",
|
|
8
|
+
"delete merged branches", or "tidy up git".
|
|
9
|
+
license: MIT
|
|
10
|
+
allowed-tools: Bash
|
|
11
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires git and gh (GitHub CLI) authenticated.
|
|
12
|
+
metadata:
|
|
13
|
+
targets: [_source-only]
|
|
14
|
+
author: Oleg Koval
|
|
15
|
+
tags:
|
|
16
|
+
- git
|
|
17
|
+
- branches
|
|
18
|
+
- cleanup
|
|
19
|
+
- maintenance
|
|
20
|
+
- dependabot
|
|
21
|
+
- github
|
|
22
|
+
source: weekly-pattern-learner
|
|
23
|
+
source_reason: "dependabot-triage was added to merge dependency PRs in bulk but leaves stale remote branches behind; no skill follows up to prune them"
|
|
24
|
+
source_date: "2026-08-10"
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
> 🤖 *Auto-generated by **weekly-pattern-learner** · dependabot-triage was added to merge dependency PRs in bulk but leaves stale remote branches behind; no skill follows up to prune them*
|
|
28
|
+
|
|
29
|
+
# Branch Cleanup
|
|
30
|
+
|
|
31
|
+
Remove stale remote and local branches safely after a merge wave. Defaults to
|
|
32
|
+
dry-run so you see exactly what will be deleted before anything is removed.
|
|
33
|
+
|
|
34
|
+
## Inputs
|
|
35
|
+
|
|
36
|
+
- **Remote** (optional, default: `origin`)
|
|
37
|
+
- **Base branch** (optional, default: `main` — detect from `gh repo view`)
|
|
38
|
+
- **--dry-run** (optional, default: on): preview deletions without executing them
|
|
39
|
+
- **--execute**: actually delete branches (requires explicit flag — safety default)
|
|
40
|
+
- **--include-local**: also clean up merged local branches (off by default)
|
|
41
|
+
|
|
42
|
+
## Step 1 — Fetch and prune remote tracking references
|
|
43
|
+
|
|
44
|
+
Always start here. This removes local tracking refs for remote branches that are
|
|
45
|
+
already gone, without touching anything else:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
REMOTE="${Remote:-origin}"
|
|
49
|
+
git fetch --prune "$REMOTE"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
After pruning, print the count of removed tracking refs:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
git branch -vv | grep ': gone]' | wc -l
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Step 2 — Identify stale remote branches
|
|
59
|
+
|
|
60
|
+
Find remote branches whose associated PR is merged or closed:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Get all non-default remote branches
|
|
64
|
+
BASE=$(gh repo view --json defaultBranchRef -q '.defaultBranchRef.name' 2>/dev/null || echo "main")
|
|
65
|
+
|
|
66
|
+
git branch -r --merged "$REMOTE/$BASE" \
|
|
67
|
+
| grep -v "HEAD" \
|
|
68
|
+
| grep -v "$REMOTE/$BASE" \
|
|
69
|
+
| sed "s|$REMOTE/||" \
|
|
70
|
+
| sort
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Cross-reference with GitHub to confirm each branch's PR state. Only include branches
|
|
74
|
+
with a confirmed merged or closed PR — an empty result means the branch is not eligible:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
STALE_BRANCHES=()
|
|
78
|
+
for branch in $(git branch -r --merged "$REMOTE/$BASE" \
|
|
79
|
+
| grep -v HEAD | grep -v "$REMOTE/$BASE" | sed "s|$REMOTE/||"); do
|
|
80
|
+
PR_DATA=$(gh pr list --head "$branch" --state merged \
|
|
81
|
+
--json number,title,mergedAt \
|
|
82
|
+
--jq '.[0] | "\(.number) merged \(.mergedAt | .[0:10])"' 2>/dev/null)
|
|
83
|
+
if [ -z "$PR_DATA" ]; then
|
|
84
|
+
PR_DATA=$(gh pr list --head "$branch" --state closed \
|
|
85
|
+
--json number,title,closedAt \
|
|
86
|
+
--jq '.[0] | "\(.number) closed \(.closedAt | .[0:10])"' 2>/dev/null)
|
|
87
|
+
fi
|
|
88
|
+
if [ -n "$PR_DATA" ]; then
|
|
89
|
+
echo "$branch ← $PR_DATA"
|
|
90
|
+
STALE_BRANCHES+=("$branch")
|
|
91
|
+
else
|
|
92
|
+
echo "$branch ← no confirmed PR (skipped)"
|
|
93
|
+
fi
|
|
94
|
+
done
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
This produces a table like:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
dependabot/npm_and_yarn/lodash-4.17.21 ← 42 merged 2026-07-31
|
|
101
|
+
dependabot/npm_and_yarn/eslint-8.57.0 ← 43 merged 2026-07-31
|
|
102
|
+
feature/login-refresh ← 38 merged 2026-07-28
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Step 3 — Safety filter
|
|
106
|
+
|
|
107
|
+
**Never propose deletion of:**
|
|
108
|
+
|
|
109
|
+
| Branch | Reason |
|
|
110
|
+
|--------|--------|
|
|
111
|
+
| `main`, `master`, `develop` | Protected base branches |
|
|
112
|
+
| `beta`, `staging`, `production` | Release/deploy targets |
|
|
113
|
+
| Any branch with an open PR | May still be in review |
|
|
114
|
+
| Any branch not yet merged to base | Would lose commits |
|
|
115
|
+
| Branches the user has modified locally in the last 24h | Work-in-progress |
|
|
116
|
+
|
|
117
|
+
Check for open PRs before including a branch in the deletion list:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
OPEN=$(gh pr list --head "$branch" --state open --json number --jq 'length')
|
|
121
|
+
[ "$OPEN" -gt 0 ] && echo "SKIP (open PR): $branch"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Step 4 — Preview or execute
|
|
125
|
+
|
|
126
|
+
### Dry-run (default)
|
|
127
|
+
|
|
128
|
+
Print the deletion plan and stop. Never touch the remote without `--execute`:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Branch cleanup preview — dry-run (pass --execute to apply)
|
|
132
|
+
|
|
133
|
+
Remote branches to delete (all merged to main):
|
|
134
|
+
origin/dependabot/npm_and_yarn/lodash-4.17.21 (PR #42, merged 2026-07-31)
|
|
135
|
+
origin/dependabot/npm_and_yarn/eslint-8.57.0 (PR #43, merged 2026-07-31)
|
|
136
|
+
origin/feature/login-refresh (PR #38, merged 2026-07-28)
|
|
137
|
+
|
|
138
|
+
Local tracking refs already pruned: 3 (by git fetch --prune)
|
|
139
|
+
|
|
140
|
+
Would NOT delete:
|
|
141
|
+
origin/beta (protected release branch)
|
|
142
|
+
origin/feature/signup (open PR #47)
|
|
143
|
+
|
|
144
|
+
Run with --execute to apply.
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Execute
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Delete remote branches
|
|
151
|
+
for branch in "${STALE_BRANCHES[@]}"; do
|
|
152
|
+
git push "$REMOTE" --delete "$branch" && echo "deleted: $REMOTE/$branch"
|
|
153
|
+
done
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Step 5 — Local branch cleanup (optional, --include-local)
|
|
157
|
+
|
|
158
|
+
Only runs when `--include-local` is explicitly passed.
|
|
159
|
+
|
|
160
|
+
Find local branches already merged to base and not checked out:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
git branch --merged "$BASE" \
|
|
164
|
+
| grep -v "^\*" \
|
|
165
|
+
| grep -v "$BASE" \
|
|
166
|
+
| grep -v "main\|master\|develop\|beta\|staging"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
For each candidate, confirm there is no uncommitted work and the tracking ref is
|
|
170
|
+
gone before deleting:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
git branch -vv "$branch" # should show ': gone]' if remote is deleted
|
|
174
|
+
git branch -d "$branch" # safe delete — fails if unmerged work exists
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Never use `-D` (force delete) — let `-d` protect you from accidental data loss.
|
|
178
|
+
|
|
179
|
+
## Report
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
Branch cleanup complete
|
|
183
|
+
|
|
184
|
+
Remote:
|
|
185
|
+
Deleted: 12 branches (10 Dependabot, 2 feature branches — all merged)
|
|
186
|
+
Protected: 2 skipped (beta, open PR)
|
|
187
|
+
|
|
188
|
+
Local tracking refs:
|
|
189
|
+
Pruned: 12 stale refs (git fetch --prune)
|
|
190
|
+
|
|
191
|
+
Local branches (--include-local):
|
|
192
|
+
Deleted: 3 branches already merged to main
|
|
193
|
+
Kept: 1 branch (has uncommitted work)
|
|
194
|
+
|
|
195
|
+
Repo now has: N remote branches, M local branches
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Chaining
|
|
199
|
+
|
|
200
|
+
| Before this skill | After this skill |
|
|
201
|
+
|---|---|
|
|
202
|
+
| `olko:dependabot-triage` (merged patch PRs) | next `olko:morning-routine` starts clean |
|
|
203
|
+
| Sprint wind-down / milestone close | `git fetch` confirms clean state |
|
|
204
|
+
| Any large batch merge | nothing — maintenance complete |
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "olko-branch-cleanup",
|
|
3
|
+
"description": "Prune stale git branches after a merge wave: delete closed/merged remote branches, remove local tracking refs that no longer exist on the remote, and optionally clean up merged local branches. Natural follow-up to dependabot-triage.",
|
|
4
|
+
"skills": "./skills"
|
|
5
|
+
}
|
package/packages/software-development/branch-cleanup/adapters/claude/skills/branch-cleanup/SKILL.md
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: branch-cleanup
|
|
3
|
+
description: >
|
|
4
|
+
Prune stale git branches after a merge wave: delete closed/merged remote branches,
|
|
5
|
+
remove local tracking branches that no longer exist on the remote, and optionally
|
|
6
|
+
clean up local branches already merged to main. Use after running dependabot-triage,
|
|
7
|
+
after a sprint wind-down, or when the user says "clean up branches", "prune branches",
|
|
8
|
+
"delete merged branches", or "tidy up git".
|
|
9
|
+
license: MIT
|
|
10
|
+
allowed-tools: Bash
|
|
11
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires git and gh (GitHub CLI) authenticated.
|
|
12
|
+
metadata:
|
|
13
|
+
targets: [_source-only]
|
|
14
|
+
author: Oleg Koval
|
|
15
|
+
tags:
|
|
16
|
+
- git
|
|
17
|
+
- branches
|
|
18
|
+
- cleanup
|
|
19
|
+
- maintenance
|
|
20
|
+
- dependabot
|
|
21
|
+
- github
|
|
22
|
+
source: weekly-pattern-learner
|
|
23
|
+
source_reason: "dependabot-triage was added to merge dependency PRs in bulk but leaves stale remote branches behind; no skill follows up to prune them"
|
|
24
|
+
source_date: "2026-08-10"
|
|
25
|
+
---
|
|
26
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
27
|
+
|
|
28
|
+
> 🤖 *Auto-generated by **weekly-pattern-learner** · dependabot-triage was added to merge dependency PRs in bulk but leaves stale remote branches behind; no skill follows up to prune them*
|
|
29
|
+
|
|
30
|
+
# Branch Cleanup
|
|
31
|
+
|
|
32
|
+
Remove stale remote and local branches safely after a merge wave. Defaults to
|
|
33
|
+
dry-run so you see exactly what will be deleted before anything is removed.
|
|
34
|
+
|
|
35
|
+
## Inputs
|
|
36
|
+
|
|
37
|
+
- **Remote** (optional, default: `origin`)
|
|
38
|
+
- **Base branch** (optional, default: `main` — detect from `gh repo view`)
|
|
39
|
+
- **--dry-run** (optional, default: on): preview deletions without executing them
|
|
40
|
+
- **--execute**: actually delete branches (requires explicit flag — safety default)
|
|
41
|
+
- **--include-local**: also clean up merged local branches (off by default)
|
|
42
|
+
|
|
43
|
+
## Step 1 — Fetch and prune remote tracking references
|
|
44
|
+
|
|
45
|
+
Always start here. This removes local tracking refs for remote branches that are
|
|
46
|
+
already gone, without touching anything else:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
REMOTE="${Remote:-origin}"
|
|
50
|
+
git fetch --prune "$REMOTE"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
After pruning, print the count of removed tracking refs:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git branch -vv | grep ': gone]' | wc -l
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Step 2 — Identify stale remote branches
|
|
60
|
+
|
|
61
|
+
Find remote branches whose associated PR is merged or closed:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Get all non-default remote branches
|
|
65
|
+
BASE=$(gh repo view --json defaultBranchRef -q '.defaultBranchRef.name' 2>/dev/null || echo "main")
|
|
66
|
+
|
|
67
|
+
git branch -r --merged "$REMOTE/$BASE" \
|
|
68
|
+
| grep -v "HEAD" \
|
|
69
|
+
| grep -v "$REMOTE/$BASE" \
|
|
70
|
+
| sed "s|$REMOTE/||" \
|
|
71
|
+
| sort
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Cross-reference with GitHub to confirm each branch's PR state. Only include branches
|
|
75
|
+
with a confirmed merged or closed PR — an empty result means the branch is not eligible:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
STALE_BRANCHES=()
|
|
79
|
+
for branch in $(git branch -r --merged "$REMOTE/$BASE" \
|
|
80
|
+
| grep -v HEAD | grep -v "$REMOTE/$BASE" | sed "s|$REMOTE/||"); do
|
|
81
|
+
PR_DATA=$(gh pr list --head "$branch" --state merged \
|
|
82
|
+
--json number,title,mergedAt \
|
|
83
|
+
--jq '.[0] | "\(.number) merged \(.mergedAt | .[0:10])"' 2>/dev/null)
|
|
84
|
+
if [ -z "$PR_DATA" ]; then
|
|
85
|
+
PR_DATA=$(gh pr list --head "$branch" --state closed \
|
|
86
|
+
--json number,title,closedAt \
|
|
87
|
+
--jq '.[0] | "\(.number) closed \(.closedAt | .[0:10])"' 2>/dev/null)
|
|
88
|
+
fi
|
|
89
|
+
if [ -n "$PR_DATA" ]; then
|
|
90
|
+
echo "$branch ← $PR_DATA"
|
|
91
|
+
STALE_BRANCHES+=("$branch")
|
|
92
|
+
else
|
|
93
|
+
echo "$branch ← no confirmed PR (skipped)"
|
|
94
|
+
fi
|
|
95
|
+
done
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This produces a table like:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
dependabot/npm_and_yarn/lodash-4.17.21 ← 42 merged 2026-07-31
|
|
102
|
+
dependabot/npm_and_yarn/eslint-8.57.0 ← 43 merged 2026-07-31
|
|
103
|
+
feature/login-refresh ← 38 merged 2026-07-28
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Step 3 — Safety filter
|
|
107
|
+
|
|
108
|
+
**Never propose deletion of:**
|
|
109
|
+
|
|
110
|
+
| Branch | Reason |
|
|
111
|
+
|--------|--------|
|
|
112
|
+
| `main`, `master`, `develop` | Protected base branches |
|
|
113
|
+
| `beta`, `staging`, `production` | Release/deploy targets |
|
|
114
|
+
| Any branch with an open PR | May still be in review |
|
|
115
|
+
| Any branch not yet merged to base | Would lose commits |
|
|
116
|
+
| Branches the user has modified locally in the last 24h | Work-in-progress |
|
|
117
|
+
|
|
118
|
+
Check for open PRs before including a branch in the deletion list:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
OPEN=$(gh pr list --head "$branch" --state open --json number --jq 'length')
|
|
122
|
+
[ "$OPEN" -gt 0 ] && echo "SKIP (open PR): $branch"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Step 4 — Preview or execute
|
|
126
|
+
|
|
127
|
+
### Dry-run (default)
|
|
128
|
+
|
|
129
|
+
Print the deletion plan and stop. Never touch the remote without `--execute`:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
Branch cleanup preview — dry-run (pass --execute to apply)
|
|
133
|
+
|
|
134
|
+
Remote branches to delete (all merged to main):
|
|
135
|
+
origin/dependabot/npm_and_yarn/lodash-4.17.21 (PR #42, merged 2026-07-31)
|
|
136
|
+
origin/dependabot/npm_and_yarn/eslint-8.57.0 (PR #43, merged 2026-07-31)
|
|
137
|
+
origin/feature/login-refresh (PR #38, merged 2026-07-28)
|
|
138
|
+
|
|
139
|
+
Local tracking refs already pruned: 3 (by git fetch --prune)
|
|
140
|
+
|
|
141
|
+
Would NOT delete:
|
|
142
|
+
origin/beta (protected release branch)
|
|
143
|
+
origin/feature/signup (open PR #47)
|
|
144
|
+
|
|
145
|
+
Run with --execute to apply.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Execute
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Delete remote branches
|
|
152
|
+
for branch in "${STALE_BRANCHES[@]}"; do
|
|
153
|
+
git push "$REMOTE" --delete "$branch" && echo "deleted: $REMOTE/$branch"
|
|
154
|
+
done
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Step 5 — Local branch cleanup (optional, --include-local)
|
|
158
|
+
|
|
159
|
+
Only runs when `--include-local` is explicitly passed.
|
|
160
|
+
|
|
161
|
+
Find local branches already merged to base and not checked out:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
git branch --merged "$BASE" \
|
|
165
|
+
| grep -v "^\*" \
|
|
166
|
+
| grep -v "$BASE" \
|
|
167
|
+
| grep -v "main\|master\|develop\|beta\|staging"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
For each candidate, confirm there is no uncommitted work and the tracking ref is
|
|
171
|
+
gone before deleting:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
git branch -vv "$branch" # should show ': gone]' if remote is deleted
|
|
175
|
+
git branch -d "$branch" # safe delete — fails if unmerged work exists
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Never use `-D` (force delete) — let `-d` protect you from accidental data loss.
|
|
179
|
+
|
|
180
|
+
## Report
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
Branch cleanup complete
|
|
184
|
+
|
|
185
|
+
Remote:
|
|
186
|
+
Deleted: 12 branches (10 Dependabot, 2 feature branches — all merged)
|
|
187
|
+
Protected: 2 skipped (beta, open PR)
|
|
188
|
+
|
|
189
|
+
Local tracking refs:
|
|
190
|
+
Pruned: 12 stale refs (git fetch --prune)
|
|
191
|
+
|
|
192
|
+
Local branches (--include-local):
|
|
193
|
+
Deleted: 3 branches already merged to main
|
|
194
|
+
Kept: 1 branch (has uncommitted work)
|
|
195
|
+
|
|
196
|
+
Repo now has: N remote branches, M local branches
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Chaining
|
|
200
|
+
|
|
201
|
+
| Before this skill | After this skill |
|
|
202
|
+
|---|---|
|
|
203
|
+
| `olko:dependabot-triage` (merged patch PRs) | next `olko:morning-routine` starts clean |
|
|
204
|
+
| Sprint wind-down / milestone close | `git fetch` confirms clean state |
|
|
205
|
+
| Any large batch merge | nothing — maintenance complete |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Codex Adapter for branch-cleanup
|
|
2
|
+
|
|
3
|
+
This is a Codex-specific adapter for the `olko:branch-cleanup` skill.
|
|
4
|
+
The canonical skill definition is in `../../SKILL.md`.
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
Invoke in a Codex session:
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
Use the olko:branch-cleanup skill to prune stale branches after the Dependabot merge wave.
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
See `../../SKILL.md` for the full workflow: fetch and prune remote tracking refs, identify
|
|
17
|
+
merged/closed remote branches via GitHub PR state, safety-filter protected and open-PR
|
|
18
|
+
branches, preview or execute deletions, and optionally clean up merged local branches.
|
|
19
|
+
Defaults to dry-run — pass --execute to apply. The procedure is plain git/gh and is agent-agnostic.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "olko:branch-cleanup",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Prune stale git branches after a merge wave: delete closed/merged remote branches, remove local tracking refs that no longer exist on the remote, and optionally clean up merged local branches. Natural follow-up to dependabot-triage.",
|
|
5
|
+
"skills": "skills/"
|
|
6
|
+
}
|