← Back to Skills Marketplace
charlie-morrison

git-repo-cleaner

by charlie-morrison · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
99
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install git-repo-cleaner
Description
Audit and clean up Git repositories. Find stale/merged branches, large files in history, orphaned tags, repo bloat, and generate cleanup scripts. Use when as...
README (SKILL.md)

Git Repo Cleaner

Audit Git repositories for bloat, stale branches, and maintenance issues. Generate safe cleanup scripts.

Quick Audit

python3 scripts/audit_repo.py /path/to/repo

Specific Checks

# Stale branches only
python3 scripts/audit_repo.py /path/to/repo --check branches

# Large files in history
python3 scripts/audit_repo.py /path/to/repo --check large-files

# Full audit
python3 scripts/audit_repo.py /path/to/repo --check all

Output Formats

python3 scripts/audit_repo.py /path/to/repo --format text|json|markdown

Checks Performed

1. Stale Branches

  • Branches not updated in >30 days (configurable with --stale-days)
  • Branches already merged into main/master
  • Branches with no unique commits
  • Remote tracking branches with deleted remotes

2. Large Files

  • Files >1MB in current tree (configurable with --min-size)
  • Large blobs in git history (top 20)
  • Binary files that shouldn't be tracked

3. Repo Stats

  • Total repo size (.git directory)
  • Pack file stats
  • Object count and size
  • Unreachable objects

4. Maintenance

  • Missing .gitignore patterns (node_modules, pycache, .env, etc.)
  • Unoptimized packfiles
  • Stale reflog entries

Cleanup Script Generation

Use --fix to generate (not execute) cleanup scripts:

python3 scripts/audit_repo.py /path/to/repo --fix
# Outputs cleanup.sh with safe delete commands

The generated script uses git branch -d (safe delete, refuses if not merged) by default. Use --force-delete to generate git branch -D commands instead.

Workflow

  1. Run audit on repo
  2. Review findings
  3. Generate cleanup script if needed
  4. Review script before executing
  5. Execute cleanup
Usage Guidance
This skill appears to do what it says: audit a local Git repo and generate safe cleanup scripts. Before installing or running: (1) review the full scripts/audit_repo.py file (the provided listing was truncated here) to confirm there are no unexpected network calls or destructive commands; (2) run audits on a clone or non-critical copy of repositories; (3) always inspect cleanup.sh before executing, and avoid using --force-delete unless you have backups and understand the consequences; (4) ensure the machine has git and Python3 and run the tool with an account that has only the necessary filesystem access. If you want higher assurance, ask the author for the full untruncated source or run the script in a sandboxed environment first.
Capability Analysis
Type: OpenClaw Skill Name: git-repo-cleaner Version: 1.0.0 The git-repo-cleaner skill is a legitimate utility for auditing and maintaining Git repositories. The primary logic in scripts/audit_repo.py uses the Git CLI via subprocess.run (without shell=True) to perform local analysis of branches, file sizes, and repository metadata. It does not exhibit any signs of data exfiltration, network activity, or malicious execution, and the SKILL.md instructions are consistent with the tool's stated purpose of repository maintenance.
Capability Assessment
Purpose & Capability
Name, description, SKILL.md, STATUS.md, and the included Python script all describe repository auditing (stale/merged branches, large files, stats) and script generation. The declared requirements (none) and use of the git CLI are proportionate to the stated purpose.
Instruction Scope
SKILL.md instructs the agent to run the included script against a local repository path and to review generated scripts before executing. The instructions reference only repo paths and git operations; they do not ask the agent to read arbitrary unrelated files or transmit data externally.
Install Mechanism
No install spec — instruction-only with a bundled Python script. This is low-risk and consistent with a CLI tool that requires only the git binary and Python runtime.
Credentials
The skill requests no environment variables, no credentials, and no config paths. The operations (reading a repo directory and invoking git) align with the task and do not require elevated secrets or external service tokens.
Persistence & Privilege
always is false and the skill does not request persistent system-wide privileges. It generates cleanup scripts but explicitly documents that --fix produces scripts (does not execute by default). No evidence of the skill modifying other skills or system configs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install git-repo-cleaner
  3. After installation, invoke the skill by name or use /git-repo-cleaner
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release
Metadata
Slug git-repo-cleaner
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is git-repo-cleaner?

Audit and clean up Git repositories. Find stale/merged branches, large files in history, orphaned tags, repo bloat, and generate cleanup scripts. Use when as... It is an AI Agent Skill for Claude Code / OpenClaw, with 99 downloads so far.

How do I install git-repo-cleaner?

Run "/install git-repo-cleaner" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is git-repo-cleaner free?

Yes, git-repo-cleaner is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does git-repo-cleaner support?

git-repo-cleaner is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created git-repo-cleaner?

It is built and maintained by charlie-morrison (@charlie-morrison); the current version is v1.0.0.

💬 Comments