ai-git-cleanup SKILL.md skillA

ai-git-cleanup from arcasilesgroup/ai-engineering is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add arcasilesgroup/ai-engineering/ai-git-cleanup@git:20261004.0d8569b

Pins git:20261004.0d8569b in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
arcasilesgroup/ai-engineering
Path
skills/ai-git-cleanup/SKILL.md
Versions recorded
5
Latest version
git:20261004.0d8569b, committed Oct 4, 2026
First version recorded
Sep 27, 2026
Size
11,051 bytes
Repository stars
62
License
Apache-2.0

Removes finished local git work in one automatic pass, with no question and no name to type: dead worktrees first (`git worktree remove`, then `git worktree prune`), then branches already merged into the local `main`, then the branches a squash-merged pull request left behind (tree identical to `origin/main`, tagged before deletion). Trigger for "tidy up", "tidy up these branches", "tidy branches", "delete old branches", "start fresh", "limpieza de branches", "limpia branches", or by naming…

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# ai-git-cleanup — remove finished local work in one pass

Say a cleanup phrase and the pass runs itself. It deletes only work that is
finished — worktrees whose branch is merged into the local `main`, those merged
branches, and the branches a squash-merged pull request left behind (their
content provably already in `origin/main`) — and it never asks a question and
never takes a name. Anything unfinished, unprovable, or detached is left exactly
where it is. Run the steps in order, from the primary checkout, and report what
each one did.

## The pass

1. **Remove the dead worktrees.** The loop walks the session worktrees only —
   the primary checkout is never a candidate, since `git worktree remove <repo>`
   refuses it as a main working tree (and the pass leaves the tree you are
   standing in alone). For each worktree, read two facts before
   touching it: whether its HEAD is on a branch
   (`git -C "<path>" symbolic-ref -q HEAD`) and what uncommitted content it holds,
   ignored files included
   (`git -C "<path>" status --porcelain --ignored --untracked-files=normal` — the
   option is required: a `status.showUntrackedFiles=no` in the repository or the
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add arcasilesgroup/ai-engineering/ai-git-cleanup@sha256:1dff9eb07207b5b8

The line at the top of this page pins the label git:20261004.0d8569b, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_cxyleygcmthhurdv.svg)](https://markdownregistry.com/a/art_cxyleygcmthhurdv)

3 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 5 versions of this file, between Sep 27, 2026 and Oct 4, 2026, about one every 2 days.

versioncommittedcommitsizeaudit
git:20261004.0d8569b latest2026-10-04 0d8569b 11,051 BA view · diff
git:20261004.3e3bd002026-10-04 3e3bd00 8,686 BA view · diff
git:20260929.8cccd612026-09-29 8cccd61 10,144 BA view · diff
git:20260927.6e5eae52026-09-27 6e5eae5 7,842 BA view · diff
git:20260927.5da899e2026-09-27 5da899e 5,774 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (11051 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

arcasilesgroup/ai-engineering · 62 stars · license Apache-2.0 · pushed 2026-10-19 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_cxyleygcmthhurdv
GET https://markdownregistry.com/api/v1/resolve?ref=arcasilesgroup/ai-engineering/ai-git-cleanup
GET https://markdownregistry.com/api/v1/blob/1dff9eb07207b5b87384f400b6ebbc3140f99107865f5946e867ad4d4eecf07e

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from arcasilesgroup/ai-engineering

AGENTS.md AGENTS.md file
arcasilesgroup/ai-engineering · AGENTS.md
git:20261004.3e3bd00 · audit A · 62 stars
ai-adversarial-loop SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-adversarial-loop/SKILL.md · Coordinate a multi-round debate between two agents until the code is clean. adversarial-reviewer (the critic) assumes…
git:20260926.b0fd9cf · audit A · 62 stars
ai-agents-md SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-agents-md/SKILL.md · Creates, audits and maintains the AGENTS.md a repository owes its coding agents, following the agents.md convention…
git:20260929.4338d92 · audit A · 62 stars
ai-architect SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-architect/SKILL.md · Research and advise on the best way to approach a software project, including architecture, tech stack, implementation…
git:20260926.b0fd9cf · audit A · 62 stars
ai-audit-code SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-audit-code/SKILL.md · Forces the laziest solution that actually works, simplest, shortest, most minimal. Channels a senior dev who has seen…
git:20261004.3e3bd00 · audit A · 62 stars
ai-audit-design SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-audit-design/SKILL.md · Use when a web interface needs its visual defects found and fixed with measurements rather than opinions — misaligned…
git:20260926.b0fd9cf · audit B · 62 stars
ai-audit-docs SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-audit-docs/SKILL.md · Audits documentation files against actual repo state. Detects dead references (links to nonexistent files/URLs), false…
git:20260923.5ad45c5 · audit A · 62 stars
ai-brainstorm SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-brainstorm/SKILL.md · Use when the user brings a fuzzy idea that must be pinned down before research or planning — "handshake", "get on the…
git:20260929.3986acb · audit A · 62 stars
ai-code-review SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-code-review/SKILL.md · Comprehensive code review skill. Two modes: diff review for over-engineering findings (ranked, compact), and debt…
git:20260923.5ad45c5 · audit A · 62 stars
ai-codegraph SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-codegraph/SKILL.md · Semantic code intelligence via MCP: call chains, blast radius, cross-file symbol relationships. Uses CodeGraph…
git:20260923.5ad45c5 · audit A · 62 stars
ai-config-to-project SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-config-to-project/SKILL.md · Adapts a governed project's architecture rules, config, overrides, and AGENTS.md after ai-eng init. Manual only. Writes…
git:20260929.3986acb · audit B · 62 stars
ai-debug SKILL.md skill
arcasilesgroup/ai-engineering · skills/ai-debug/SKILL.md · Finds the root cause of broken behaviour and names it at file:line, then writes the check that fails for that reason…
git:20260926.b0fd9cf · audit A · 62 stars

Every file in arcasilesgroup/ai-engineering

Browse by kind, by grade A, or by owner.