scripts-skill
Skill0 starsChanged 3 months agoUnlicenseView on GitHub
When a fullstack application needs operational scripts, use this skill to create scripts/setup.sh, start-all.sh, stop-all.sh, test-all.sh, status.sh, ui.sh and sql-console.sh. IF user mentions setup, start, stop, status, run the app, ops scripts, or scripts folder, use this skill.
- Reads credentials
In this repository16 other files it gives its agents.
- claude-agents-md/AGENTS.mdAGENTS.md
- claude-agents-md/CLAUDE.mdCLAUDE.md
- bash-skillSkill
- bug-recordingSkill
- bundle-sizeSkill
- changelog-skillSkill
- container-skillSkill
- fact-checkerSkill
- git-gh-skillSkill
- html-researchSkill
- index-html-skillSkill
- macos-electron-appsSkill
- pr-splitterSkill
- readme-skillSkill
- rerenderSkill
- stacks-skillSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 5 are distinctive, and 14 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.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Read the repository before writing anything.
- Very specific: line 17
Read package.json, pom.xml, build.gradle, Cargo.toml, go.mod, requirements.txt, pyproject.toml, Containerfile, docker-compose.yml, …
- Distinctive: line 22
If nothing declares a port, ask the user.
- Very specific: line 26
All scripts live in <app-root>/scripts/:
- Very specific: line 40
Create sql-console.sh only when the app really has a database or cache such as postgres, mysql, mariadb, redis, valkey, mongodb, cassandra …
- Very specific: line 43
Start from templates/ in this skill and adapt each script to the real app.
- Very specific: line 49
Every script starts with #!/usr/bin/env bash and set -euo pipefail.
- Very specific: line 50
Every script works from any directory of the repository.
- Very specific: line 56
Every port comes from scripts/ports.env.
- Very specific: line 61
Every script is idempotent.
- Distinctive: line 63
Every script exits non-zero when its job fails, and prints what failed on stderr.
- Very specific: line 67
Add .run/ to .gitignore.
- Distinctive: line 69
No comments in any script.
- Distinctive: line 70
No emojis and no icons in any script output.
- Very specific: line 75
Write scripts/ports.env with the real services and ports.
- Very specific: line 76
Write scripts/common.sh, then the six scripts, then sql-console.sh when a database exists.
- Very specific: line 78
Add .run/ to .gitignore when it is missing.
- Very specific: line 79
Verify: run scripts/status.sh from the repo root and from a nested directory, run setup.sh, start-all.sh, status.sh, test-all.sh, …
- Very specific: line 115
Only list the scripts the app actually has.
≈ “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
Scripts Skill
Give a fullstack application one predictable set of operational scripts so anyone can set it up, start it, check it, test it, open it and stop it without reading the code.
Inputs
Read the repository before writing anything. Never guess a port, a command or a service.
- Find the app root: the directory holding the backend and frontend, or the repo root.
- Read
package.json,pom.xml,build.gradle,Cargo.toml,go.mod,requirements.txt,pyproject.toml,Containerfile,docker-compose.yml,podman-compose.yml,.env,application.properties,application.yml,vite.config.*,next.config.*. - Collect every real port: backend HTTP, frontend dev server, database, cache, broker.
- Collect the real commands for install, build, run and test of each stack in the app.
- If nothing declares a port, ask the user. Do not invent one.
Output
All scripts live in <app-root>/scripts/:
| Script | What it does |
setup.sh | Installs every dependency and prepares the app to run for the first time |
start-all.sh | Starts every service, waits until each declared port is listening, then echoes the full link of every service |
stop-all.sh | Stops everything it started and frees every declared port |
test-all.sh | Runs every test suite in the app and fails on the first failing suite |
status.sh | Prints one line per service with its port, UP or DOWN, and the pid |
ui.sh | Opens the frontend URL in the browser, starting nothing |
sql-console.sh | Opens a console against the database. Only when the app has one |
common.sh | Shared root resolution, port helpers and waiting loops sourced by the others |
ports.env | SERVICE=PORT per line, the single source of truth for every port |
Create sql-console.sh only when the app really has a database or cache such as postgres, mysql,
mariadb, redis, valkey, mongodb, cassandra or clickhouse.
Start from templates/ in this skill and adapt each script to the real app. The templates are a
starting point, not the answer: delete the stacks the app does not have and fill in the real
commands. Never ship a script with a branch for a stack the app does not use.
Hard Rules
- Every script starts with
#!/usr/bin/env bashandset -euo pipefail. - Every script works from any directory of the repository. Resolve the app root from the script's
own location and
cdthere before doing anything:ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)". Never rely on the caller's directory and never use a relative path that assumes one. - Stay bash 3.2 compatible so the scripts run on a stock macOS: no associative arrays, no
mapfile, no${var,,}. - Every port comes from
scripts/ports.env. No port is hardcoded in any other script. start-all.shmust end by echoing the full link of every service, never only the port:http://localhost:8080,http://localhost:3000,postgresql://localhost:5432. Use the real scheme and the real base path the app serves, such ashttp://localhost:8080/api. Build every link withservice_urlfromcommon.sh.- Every script is idempotent. Running
setup.shtwice,start-all.shon a started app orstop-all.shon a stopped app succeeds and changes nothing. - Every script exits non-zero when its job fails, and prints what failed on stderr.
- Waiting is a loop that checks a condition with
sleep 1between tries and a bounded number of tries. Neversleepmore than 1 and never wait longer than 60 seconds. - Background processes write a pid file into
<app-root>/.run/and a log into<app-root>/.run/logs/. Add.run/to.gitignore. - Containers use
podmanandpodman-compose. Neverdockerordocker-compose. - No comments in any script.
- No emojis and no icons in any script output.
chmod +xevery script after writing it.
Steps
- Write
scripts/ports.envwith the real services and ports. - Write
scripts/common.sh, then the six scripts, thensql-console.shwhen a database exists. chmod +x <app-root>/scripts/*.sh.- Add
.run/to.gitignorewhen it is missing. - Verify: run
scripts/status.shfrom the repo root and from a nested directory, runsetup.sh,start-all.sh,status.sh,test-all.sh,stop-all.sh,status.shin that order and confirm every one exits zero and the ports go up and then down. Fix anything that fails. - Append the documentation section to
README.md.
README.md
Append this section at the end of the app README.md, with the real ports of the app. Replace an
existing ## Scripts section instead of adding a second one.
## Scripts
All scripts live in `scripts/` and run from any directory of the repository.
| Script | What it does |
|---|---|
| `./scripts/setup.sh` | Installs dependencies and prepares the app |
| `./scripts/start-all.sh` | Starts every service and prints the full link of each one |
| `./scripts/status.sh` | Shows every service port as UP or DOWN |
| `./scripts/test-all.sh` | Runs every test suite |
| `./scripts/ui.sh` | Opens the UI in the browser |
| `./scripts/stop-all.sh` | Stops every service |
| `./scripts/sql-console.sh` | Opens a console on the database |
Ports are declared in `scripts/ports.env`.
```bash
./scripts/setup.sh
./scripts/start-all.sh
./scripts/status.sh
./scripts/ui.sh
./scripts/stop-all.sh
```Only list the scripts the app actually has. Drop the sql-console.sh row when there is no database.
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.

