agentleFS
sfalascasfalasca/agent-context-kit/skills/scripts/SKILL.md

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

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. AnyOrgName/php-skills★ 4same name
    2. 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.

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
  1. Very specific:

    Run them with python3 <path>, resolving <path> against that directory (e.g.

    line 16
  2. Very specific:

    Every script must implement --help properly.

    line 22
  3. Distinctive:

    Always available as a flag, regardless of other arguments.

    line 26
  4. Distinctive:

    Run the discovery script first:

    line 60
  5. Distinctive:

    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 …

    line 80
  6. Very specific:

    Run discover_scripts.py — list of paths

    line 85
  7. Very specific:

    Run describe_scripts.py — runs --help on every script (with a timeout) and prints its output, plus any optional # tags: line.

    line 86
  8. Distinctive:

    If no scripts match, say so clearly — do not fabricate scripts

    line 100
  9. Very specific:

    If arguments are unclear or not provided, run <script> --help first and show the output

    line 106
  10. Distinctive:

    If the script has side effects (writes files, calls external APIs, deletes data), state this and ask the user to confirm before proceeding

    line 107
  11. Very specific:

    If the script fails, show stderr and suggest fixes based on the --help output

    line 109
  12. Very specific:

    Run discover_scripts.py to see existing scripts in the target folder

    line 115
  13. Very specific:

    Create the file at <path> with:

    line 117
  14. Very specific:

    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 …

    line 125
  15. Very specific:

    Run discover_scripts.py to see what already exists

    line 147
  16. Very specific:

    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 …

    line 166

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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. --help must 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.py

Modes

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.

  1. Run discover_scripts.py — list of paths
  2. Run describe_scripts.py — runs --help on every script (with a timeout) and prints its output, plus any optional # tags: line; for a README.md in a scripts folder, prints only a short summary (first paragraph, capped) instead of the full file
python3 scripts/describe_scripts.py
  1. Match the --help output, any tags line, any README.md summary, and the path against the task description — be inclusive, err on the side of returning more
  2. Return each matched script with its --help output already captured in step 2 — no need to run it again. If its folder has a README.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.
  3. If no scripts match, say so clearly — do not fabricate scripts

run <script> [args]

Execute a script.

  1. If arguments are unclear or not provided, run <script> --help first and show the output
  2. If the script has side effects (writes files, calls external APIs, deletes data), state this and ask the user to confirm before proceeding
  3. Execute via Bash with the provided or inferred arguments
  4. If the script fails, show stderr and suggest fixes based on the --help output

add <path> "<intent>"

Scaffold a new script.

  1. Run discover_scripts.py to see existing scripts in the target folder
  2. 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
  3. 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 --help requirement above — not a stub. <intent> becomes the description --help prints.
    • Optional # tags: header line, inferred from <intent>
    • Placeholder main() body with a TODO comment
  4. Set executable bit: chmod +x <path>
  5. 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 --help requirement
  6. 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:

  • --help works: this is the load-bearing check. Flag any script describe_scripts.py marked as failing, hanging (timed out), or producing no output — this is a bug in the script itself (see the --help requirement 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.

  1. Run discover_scripts.py to see what already exists
  2. Scan the project for signals:
    • Long bash one-liners or manual steps described in docs/ or README files
    • TODO: automate or FIXME comments 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)
  3. 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
  4. Present all proposals as a numbered list. Ask the user which ones to create.
  5. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.