Skip to content

Commit cb77640

Browse files
jongioCopilot
andauthored
feat(git-tidy): add confidence-rated git repository hygiene skill (#50)
* feat(git-tidy): add confidence-rated git repository hygiene skill Add the git-tidy skill: a read-only-by-default audit of branches, worktrees, stashes, tags, remotes, merge artifacts, ignored-but-tracked files, large history blobs, and maintenance health. Every finding is classified by confidence (safe, review, keep). Nothing is deleted, no history is rewritten, and no protected branch is touched without an explicit approval gate. Ported from the internal devx git-clean skill and adapted to this repo's conventions, with a Vally capability eval, a cross-surface registration test, and a gpt-image-2 thumbnail. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 875e3648-1626-4968-ba79-ca7e78eea43d * fix(git-tidy): make two eval stimuli require skill invocation The require-approval-before-cleanup and metadata-is-untrusted stimuli were answerable without opening the skill: an open-ended "clean up my repo" prompt in CI's non-repo working directory drew a clarifying question, and a single-branch classification was trivial by direct reasoning. Both failed the CI per-trial skill-invocation gate even though the overall eval scored 90.4 percent. Rewrite both to supply explicit multi-branch repository state so answering requires the git-tidy confidence taxonomy, matching the four passing stimuli. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 875e3648-1626-4968-ba79-ca7e78eea43d * fix(git-tidy): force skill invocation across all eval stimuli The protect-default-and-release stimulus intermittently failed the CI per-trial skill-invocation gate: git hygiene is common knowledge, so a capable agent answered the simple protected-branch question by direct reasoning without opening the skill. The overall eval still scored 94.4 percent. Make every stimulus request each item's git-tidy status label (merged, orphan-tracking, stash-ancient, blob-history-only, protected skipped, and so on). Those labels are defined only in SKILL.md, so producing them requires opening the skill on every trial. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 875e3648-1626-4968-ba79-ca7e78eea43d --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 875e3648-1626-4968-ba79-ca7e78eea43d
1 parent c114241 commit cb77640

19 files changed

Lines changed: 2951 additions & 2 deletions

File tree

‎.github/workflows/skill-eval.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ jobs:
125125
{"skill":"skills/eli5","skill_id":"eli5","eval_spec":"evals/eli5/eval.yaml"},
126126
{"skill":"skills/repo-ready","skill_id":"repo-ready","eval_spec":"evals/repo-ready/eval.yaml"},
127127
{"skill":"skills/dns-doctor","skill_id":"dns-doctor","eval_spec":"evals/dns-doctor/eval.yaml"},
128-
{"skill":"skills/deps-doctor","skill_id":"deps-doctor","eval_spec":"evals/deps-doctor/eval.yaml"}
128+
{"skill":"skills/deps-doctor","skill_id":"deps-doctor","eval_spec":"evals/deps-doctor/eval.yaml"},
129+
{"skill":"skills/git-tidy","skill_id":"git-tidy","eval_spec":"evals/git-tidy/eval.yaml"}
129130
]'
130131
if [ "$EVENT_NAME" = "pull_request" ]; then
131132
# Evaluate only the skills this PR actually touches. Keep these

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ general-purpose monorepo: each skill lives in its own folder under
1919
| [`eli5`](skills/eli5/) | Explain the code, error, design, or idea already in context using plain language, a useful analogy, the proper grown-up terms, and an honest note about where the analogy stops working. |
2020
| [`dns-doctor`](skills/dns-doctor/) | Audit DNS delegation, records, DNSSEC, CAA, web routing, TLS, CDN behavior, mail authentication, takeover exposure, and zone hygiene, then apply exact provider changes only after explicit user approval. |
2121
| [`deps-doctor`](skills/deps-doctor/) | Audit, update, and secure dependencies across npm, pnpm, Yarn, pip, Poetry, uv, Go, Cargo, Bundler, Composer, NuGet, Maven, Gradle, Swift, pub, and Hex, plus Docker base images, GitHub Actions, Terraform, and dev container features. Ranks vulnerabilities by exploitation evidence, withholds releases too new to have been vetted, fixes breaking changes forward instead of rolling back, and never opens an empty dependency pull request. |
22+
| [`git-tidy`](skills/git-tidy/) | Comprehensive git repo hygiene in one pass: branches, worktrees, stashes, tags, remotes, merge artifacts, ignored-but-tracked files, large history blobs, and maintenance health. Classifies every finding by confidence (safe, review, keep) and deletes nothing without explicit approval. |
2223

2324
A skill is invoked straight from the Copilot composer &mdash; here `create-canvas-app`
2425
turns a one-line prompt into a working canvas:

‎docs/thumbnail-prompts.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ blue/green, `repo-ready` = GitHub green, `naming-is-hard` = rose pink + green,
111111
`eli5` = sky blue + warm amber.
112112
`dns-doctor` = DNS blue + health green + warning amber.
113113
`deps-doctor` = slate graphite + warning amber to health green.
114+
`git-tidy` = git orange + GitHub green + navy.
114115

115116
## Prompts
116117

@@ -258,3 +259,25 @@ blue/green, `repo-ready` = GitHub green, `naming-is-hard` = rose pink + green,
258259
> duplicated stethoscope, no words, no letters, no numerals, no version strings,
259260
> no fake text, no checklist rows, no pause or play icons, no cartoon mascot or
260261
> face, no photorealism, no 3D render.
262+
263+
### git-tidy (exact prompt used)
264+
265+
> Flat vector illustration app thumbnail on a pure white background, 1024x1024,
266+
> centered composition, matching a polished GitHub developer-tools catalog.
267+
> Create one cohesive git repository cleanup scene, not a generic icon panel.
268+
> Center: a clean git branch graph as rounded nodes connected by smooth curved
269+
> lines growing from a strong navy trunk on the left. The top two branches are
270+
> tidy and kept, each ending in a small green check badge, and one carries a
271+
> tiny navy padlock to mean protected. Two lower stale branches are faded gray
272+
> and dashed, gently detaching from the trunk and being swept up by a friendly
273+
> rounded broom whose bristles are git orange, with a small dustpan collecting
274+
> three faded branch nodes and a couple of tiny sparkles for freshness. Include
275+
> small supporting cards near the bottom edge: a worktree folder card, a stash
276+
> card, and a tag card, each with a subtle status dot. Place a small GitHub
277+
> Octocat mark in a circular badge near the upper-right, connected to the scene
278+
> by a subtle dotted guide line. Palette: deep GitHub navy, git orange, and
279+
> health green, with soft neutral gray for the stale branches. Rich but
280+
> uncluttered flat vector detail, clean modern rounded geometry, consistent
281+
> medium-weight outlines, subtle dashed guide lines, tiny sparkles, generous
282+
> white space, crisp professional finish. No words, no letters, no fake text,
283+
> no photorealism, no 3D render.

‎marketplace.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
4949
"source": "./skills/deps-doctor",
5050
"description": "Audit, update, and secure dependencies across npm, pnpm, Yarn, pip, Pipenv, Poetry, uv, Go, Cargo, Bundler, Composer, NuGet, Maven, Gradle, Swift, pub, and Hex, plus Docker base images, GitHub Actions, Terraform, and dev container features. Finds outdated, unused, and undeclared packages, withholds releases too new to have been vetted, ranks vulnerabilities by exploitation evidence, screens supply-chain risk, and fixes breaking changes forward without ever opening an empty pull request.",
5151
"version": "1.0.0"
52+
},
53+
{
54+
"name": "git-tidy",
55+
"source": "./skills/git-tidy",
56+
"description": "Comprehensive git repository hygiene in one pass across local and remote branches, worktrees, stashes, tags, remotes, merge and rebase artifacts, ignored-but-tracked files, large history blobs, and maintenance health. Classifies every finding by confidence (safe, review, keep), keeps protected branches and release tags off the deletion list, holds large-blob findings to report-only, and deletes nothing without explicit user approval.",
57+
"version": "1.0.0"
5258
}
5359
]
5460
}

‎plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/jongio"
88
},
99
"license": "MIT",
10-
"keywords": ["copilot", "skills", "agent-skills", "canvas", "create-canvas-app", "github-pages", "create-gh-pages-site", "repo-ready", "gitignore", "license", "contributing", "community-health", "naming-is-hard", "naming", "domain-check", "dns-doctor", "dns-audit", "dns-management", "dnssec", "email-authentication", "trademark", "availability", "name-generator", "eli5", "explain-like-im-five", "plain-language", "learning", "deps-doctor", "dependencies", "dependency-updates", "package-manager", "supply-chain-security", "vulnerability-remediation"],
10+
"keywords": ["copilot", "skills", "agent-skills", "canvas", "create-canvas-app", "github-pages", "create-gh-pages-site", "repo-ready", "gitignore", "license", "contributing", "community-health", "naming-is-hard", "naming", "domain-check", "dns-doctor", "dns-audit", "dns-management", "dnssec", "email-authentication", "trademark", "availability", "name-generator", "eli5", "explain-like-im-five", "plain-language", "learning", "deps-doctor", "dependencies", "dependency-updates", "package-manager", "supply-chain-security", "vulnerability-remediation", "git-tidy", "git-hygiene", "branch-cleanup", "worktree-cleanup", "stale-branches", "repo-maintenance"],
1111
"repository": "https://github.com/jongio/skills",
1212
"skills": "skills/"
1313
}

‎site/public/images/IMAGES.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ copy of `skills/<skill>/thumbnail.png`.
2828
| `thumb-create-gh-pages-site.png` | `create-gh-pages-site` card/detail | Astro site scaffold deploying to GitHub Pages. |
2929
| `thumb-deps-doctor.png` | `deps-doctor` card/detail | Dependency graph on a slate console, amber packages upgrading left to right into green ones, inspected by a stethoscope lens. Byte parity with the skill copy is asserted by a test. |
3030
| `thumb-dns-doctor.png` | `dns-doctor` card/detail | DNS diagnostic workstation, record cards, and stethoscope. |
31+
| `thumb-git-tidy.png` | `git-tidy` card/detail | Git branch tree being tidied, merged branches swept up while protected branches are kept. Byte parity with the skill copy is asserted by a test. |
3132
| `thumb-eli5.png` | `eli5` card/detail | Byte parity with the skill copy is asserted by a test. |
3233
| `thumb-naming-is-hard.png` | `naming-is-hard` card/detail | Candidate names screened across registries. |
3334
| `thumb-repo-ready.png` | `repo-ready` card/detail | Repository health checklist with gap indicators. |
514 KB
Loading
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: git-tidy
3+
tagline: "Comprehensive git repo hygiene in one pass: branches, worktrees, stashes, tags, remotes, artifacts, and history bloat, each rated safe, review, or keep, with nothing deleted without approval."
4+
useWhen: "When merged branches pile up, worktrees and stashes go stale, tags or remotes are dead, merge artifacts linger, the repo has grown large, or you want a confidence-rated cleanup audit before deleting anything."
5+
repoPath: skills/git-tidy
6+
thumb: images/thumb-git-tidy.png
7+
order: 7
8+
install:
9+
- label: Install for GitHub Copilot
10+
cmd: npx skills add jongio/skills --skill git-tidy -g --agent github-copilot
11+
- label: Install from the plugin marketplace
12+
cmd: copilot plugin marketplace add jongio/skills && copilot plugin install git-tidy@jongio-skills
13+
---
14+
15+
## What it does
16+
17+
`git-tidy` scans a repository for everything that accumulates over time and
18+
rates each finding by how safe it is to remove.
19+
20+
- Local and remote branches, classified by merge and PR status plus age.
21+
- Worktrees, including orphaned entries and ones with unsaved work.
22+
- Stashes, tags, and remotes, aged and cross-checked against GitHub.
23+
- Merge and rebase artifacts (`.orig` files, interrupted operations).
24+
- Ignored-but-tracked files that slipped in before the ignore rule.
25+
- Large history blobs and overall git maintenance health.
26+
27+
Findings are grouped 🟢 safe, 🟡 review, and 🔴 keep, so the cleanup list is
28+
obvious at a glance.
29+
30+
## Safety
31+
32+
Analysis is read-only. Cleanup runs only after you choose the items and confirm
33+
the exact commands. The skill prefers safe branch deletion over force deletion,
34+
warns before every remote deletion, keeps the default, checked-out, and
35+
protected branches off the list, and never rewrites history. Large-blob findings
36+
are report-only: it points you at Git LFS or `git filter-repo` rather than
37+
running them.
38+
39+
## Use it
40+
41+
```text
42+
git-tidy
43+
git-tidy branches
44+
git-tidy worktrees
45+
git-tidy stashes
46+
git-tidy tags
47+
git-tidy maintenance
48+
git-tidy --dry-run
49+
```
50+
51+
Use `--dry-run` to get the full audit without the approval and cleanup phase.

‎skills/git-tidy/.gitignore‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Dependencies are not committed; the optional Vally eval pulls dev deps.
2+
node_modules/
3+
4+
# Skill dev tooling writes results; its lockfile is committed for reproducible CI.
5+
vally-results/
6+
7+
# OS / editor noise
8+
.DS_Store
9+
Thumbs.db
10+
*.log

‎skills/git-tidy/.vally.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
paths:
2+
skills: "."
3+
evals: "evals"
4+
results: "vally-results"

0 commit comments

Comments
 (0)