scripts
Skill1 starsChanged 3 months agoMITView on GitHub
Discover, understand, run, and scaffold automation scripts in scripts/ folders. Use when the user wants to find a script for a task, run a script, add a new script, audit existing scripts, or get suggestions for scripts to automate repeated work. Modes: context, run, add, maintain, suggest.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- AnyOrgName/php-skillstheir own version, first seen Nov 8, 2026
- Yungho/family-doctortheir own version, first seen Mar 23, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- AnyOrgName/php-skills★ 4same name
- Yungho/family-doctor★ 2same name
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.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- context-refactorSkill
- directivesSkill
- how-tosSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 5 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Run them with python3 <path>, resolving <path> against that directory (e.g.
- Very specific: line 22
Every script must implement --help properly.
- Distinctive: line 26
Always available as a flag, regardless of other arguments.
- Distinctive: line 60
Run the discovery script first:
- Distinctive: line 80
Treat it as authoritative context for every script in that same folder, not just noise to skip — but its full content is only read once …
- Very specific: line 85
Run discover_scripts.py — list of paths
- Very specific: line 86
Run describe_scripts.py — runs --help on every script (with a timeout) and prints its output, plus any optional # tags: line.
- Distinctive: line 100
If no scripts match, say so clearly — do not fabricate scripts
- Very specific: line 106
If arguments are unclear or not provided, run <script> --help first and show the output
- Distinctive: line 107
If the script has side effects (writes files, calls external APIs, deletes data), state this and ask the user to confirm before proceeding
- Very specific: line 109
If the script fails, show stderr and suggest fixes based on the --help output
- Very specific: line 115
Run discover_scripts.py to see existing scripts in the target folder
- Very specific: line 117
Create the file at <path> with:
- Very specific: line 125
Run <path> --help and confirm it exits 0 and prints real output — fix immediately if not, don't hand back a script that fails its own …
- Very specific: line 147
Run discover_scripts.py to see what already exists
- Very specific: line 166
Use AGENTS.md, not CLAUDE.md, as the canonical file — if the project's agent is Claude Code specifically, ensure its CLAUDE.md contains a …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
You manage a project's script library — executable files in scripts/ and **/scripts/ folders that automate tasks. Scripts are self-documenting via --help — that is the authoritative source of what a script does and how to call it, not a comment header.
This skill's own discover_scripts.py/describe_scripts.py are plain Python 3 (no bash/WSL
required — this works the same on Linux, macOS, and Windows) and live in this skill's own
scripts/ directory, next to this SKILL.md file.
Run them with python3 <path>, resolving <path> against that directory (e.g. if this file is
at /home/alice/.claude/skills/scripts/SKILL.md, run
python3 /home/alice/.claude/skills/scripts/scripts/discover_scripts.py).
The --help requirement
Every script must implement --help properly. This is not optional and not just a style
preference — the discovery mechanism below executes --help on every script it considers, so a
broken --help breaks discovery itself. "Properly implemented" means:
- Always available as a flag, regardless of other arguments.
- Exits
0. - Has no side effects — no writes, no network calls, no state mutation.
--helpmust be safe to run blindly on every script in the repo. - Runs fast (well under a second in the normal case) — discovery applies a timeout and treats a hang as a failure.
- Prints a real description and usage — enough for both a human and an agent to know what the script does and how to call it correctly, not just a bare flag list.
A script whose --help errors, hangs, or prints nothing is a bug in that script, flagged by
maintain (see below) and treated with the same severity as malformed frontmatter is in the
directives skill.
Optional tags header
Deciding whether a script belongs at its current level of the directory tree, or whether it's a
near-duplicate of a sibling subproject's script worth generalizing and hoisting, is a cross-cutting
judgment call spanning the directory hierarchy — see context-refactor rather than trying to fix
it from inside maintain here.
A script may optionally carry a single header line for cheap keyword pre-filtering, without having to execute anything:
#!/usr/bin/env bash
# tags: [tag1, tag2]This is a hint only — the authoritative description/usage always comes from --help, not from a
comment. Don't duplicate the description or usage in a comment; that's a second source of truth
that can drift from what --help actually prints.
Starting every invocation
Run the discovery script first:
python3 scripts/discover_scripts.pyModes
context "<task description>"
Find and return the scripts relevant to a task. This mirrors how the directives skill resolves
conventions — discover lists what exists, describe extracts the authoritative metadata cheaply
(there: frontmatter without reading the body; here: --help output without reading the source) —
except the metadata source is --help, since scripts are executable and frontmatter would be
static, un-enforced text a script could drift away from.
A scripts/ folder may also carry a README.md — e.g. scripts/android-emulator/README.md.
That's not a script, so it has no --help, but it's often the only place gotchas,
prerequisites, or non-obvious conventions live (permission requirements, environment caveats,
recommended configs) — things no individual script's --help output would mention on its own.
Treat it as authoritative context for every script in that same folder, not just noise to skip —
but its full content is only read once that folder's scripts are relevant (step 4 below), the
same way a directive doc's body is only read once it matches in the directives skill; the
describe step below only ever sees a short summary of it, not the whole file.
- Run
discover_scripts.py— list of paths - Run
describe_scripts.py— runs--helpon every script (with a timeout) and prints its output, plus any optional# tags:line; for aREADME.mdin a scripts folder, prints only a short summary (first paragraph, capped) instead of the full file
python3 scripts/describe_scripts.py- Match the
--helpoutput, anytagsline, anyREADME.mdsummary, and the path against the task description — be inclusive, err on the side of returning more - Return each matched script with its
--helpoutput already captured in step 2 — no need to run it again. If its folder has aREADME.md, read the full file now and surface the relevant parts (don't just link to it, and don't rely on the step-2 summary) — that's frequently where the actual answer to a "how do I..." question is. - If no scripts match, say so clearly — do not fabricate scripts
run <script> [args]
Execute a script.
- If arguments are unclear or not provided, run
<script> --helpfirst and show the output - If the script has side effects (writes files, calls external APIs, deletes data), state this and ask the user to confirm before proceeding
- Execute via Bash with the provided or inferred arguments
- If the script fails, show stderr and suggest fixes based on the
--helpoutput
add <path> "<intent>"
Scaffold a new script.
- Run
discover_scripts.pyto see existing scripts in the target folder - Infer the language from existing scripts in the same
scripts/folder; if the folder is empty or mixed, ask the user; default to Python when no signal is present - Create the file at
<path>with:- Shebang line appropriate for the language
- Real argument parsing wired up (argparse for Python, getopts or a
usage()function for bash) that satisfies the--helprequirement above — not a stub.<intent>becomes the description--helpprints. - Optional
# tags:header line, inferred from<intent> - Placeholder
main()body with aTODOcomment
- Set executable bit:
chmod +x <path> - Run
<path> --helpand confirm it exits0and prints real output — fix immediately if not, don't hand back a script that fails its own--helprequirement - Report the created path and remind the user to fill in the body
maintain
Audit the script library for quality. Run describe_scripts.py first, then for each script:
--helpworks: this is the load-bearing check. Flag any scriptdescribe_scripts.pymarked as failing, hanging (timed out), or producing no output — this is a bug in the script itself (see the--helprequirement above), not a cosmetic issue- Executable bit: flag if the file is not executable
- Non-empty body: flag if the file is a stub with only the scaffold and a TODO
Report a table of findings. Apply trivial fixes inline (add executable bit). A broken --help
needs a real fix to the script's argument parsing — flag it for human attention rather than
papering over it.
suggest
Scan the project for automation opportunities and propose new scripts.
- Run
discover_scripts.pyto see what already exists - Scan the project for signals:
- Long bash one-liners or manual steps described in
docs/or README files TODO: automateorFIXMEcomments in code- Repeated commands in CI config, Makefiles, or shell history hints in docs
- Common dev patterns without a wrapper (data migration, report generation, health checks, data export)
- Long bash one-liners or manual steps described in
- For each gap, produce a proposal — do not create files yet:
- Proposed path (e.g.
investments/scripts/rebalance.py) - One-line description
- Sample tags
- Two or three bullet points describing what it would do
- Proposed path (e.g.
- Present all proposals as a numbered list. Ask the user which ones to create.
- For each approved proposal, run
add <path> "<intent>"inline — do not ask for confirmation again.
AGENTS.md instruction
The root AGENTS.md should contain this block (add it under a ## Scripts heading if missing).
Use AGENTS.md, not CLAUDE.md, as the canonical file — if the project's agent is Claude Code
specifically, ensure its CLAUDE.md contains a single-line import instead of a duplicated copy:
@AGENTS.md (Claude Code resolves that as an include). Other agents that support the emerging
AGENTS.md cross-tool convention read it directly, no import needed.
## Scripts
Before writing a new script or tool, or doing something manually that could be scripted, run
`/scripts context "<task description>"` to check whether one already exists. Prefer running an
existing script over reimplementing the same logic inline.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

