PlanExe / tools
AGENTS.md402 starsChanged 3 months agoMITView on GitHub
Developer and maintenance utilities. These scripts are run manually, not as part of CI or the pipeline. Finds and removes stale git branches that belong to closed or merged GitHub PRs. When the user asks to clean up old branches, remove stale PR branches, or tidy up the repo. Phase 1 — Scan. Generate a JSONL file listing stale branches for the user to inspect before anything is deleted. Each JSONL line contains: branch, prnumber, prstate (CLOSED/MERGED), pr_title, local (bool),…
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
When the user asks to clean up old branches, remove stale PR branches, or tidy up the repo.
- Distinctive: line 25
Phase 2 — Delete: After the user confirms the JSONL looks correct, delete the branches.
- Distinctive: line 33
After deletion, run git remote prune origin to clean up any stale tracking refs.
- Distinctive: line 38
Only branches with an associated closed or merged PR are included.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent instructions for tools
Developer and maintenance utilities. These scripts are run manually, not as part of CI or the pipeline.
cleanup_branches.py
Finds and removes stale git branches that belong to closed or merged GitHub PRs.
When to use
When the user asks to clean up old branches, remove stale PR branches, or tidy up the repo.
Two-phase workflow
Phase 1 — Scan. Generate a JSONL file listing stale branches for the user to inspect before anything is deleted.
python3 tools/cleanup_branches.py scan -o /tmp/stale_branches.jsonlEach JSONL line contains: branch, pr_number, pr_state (CLOSED/MERGED), pr_title, local (bool), remote (bool).
Show the user the contents and wait for confirmation before proceeding.
Phase 2 — Delete. After the user confirms the JSONL looks correct, delete the branches.
python3 tools/cleanup_branches.py delete /tmp/stale_branches.jsonlThe script prints a summary and prompts [y/N] before deleting. Pass -y to skip the prompt only if the user has already confirmed.
After deletion, run git remote prune origin to clean up any stale tracking refs.
Safety
- Protected branches (
main,railway-production) are always excluded regardless of JSONL contents. - Only branches with an associated closed or merged PR are included. Orphan branches (no PR) are intentionally skipped.
- The
--limitflag (default 200) controls how many PRs per state are fetched. Increase if the repo has a long PR history.
Requirements
ghCLI, authenticated with repo accessgitwith the target repo as the working directory
Other versions1 project uses a version of this.
Word for word · 1
- PlanExeOrg/PlanExe★ 402100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- database_api/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- frontend_multi_user/AGENTS.mdAGENTS.md
- llm_config/AGENTS.mdAGENTS.md
- mcp_cloud/AGENTS.mdAGENTS.md
- public/AGENTS.mdAGENTS.md
- self_improve/AGENTS.mdAGENTS.md
- worker_plan/AGENTS.mdAGENTS.md
- worker_plan_database/AGENTS.mdAGENTS.md
- public/llms.txtllms.txt
- planexe-mcpSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

