dev-stack
Skill0 starsChanged 5 months agoMITView on GitHub
Generate or update a `start.sh` (or `bin/start.sh`) dev-stack management script for Docker Compose projects. Use when the user invokes @dev-stack, says dev-stack, or asks to create, scaffold, rewrite, or extend a start/stop/manage shell script for a Docker-based dev environment, mentions terms like "start script", "dev menu", "docker compose wrapper", "stack manager", "nuke volumes", "drop tables", or asks how to safely manage a docker compose stack without affecting other projects on the host. Also trigger when the user shares an existing start.sh and asks to add commands, adapt it to a new stack, or harden its isolation guarantees.
- Reads credentials
- Deletes or force-pushes
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- bablsoft/accessflowtheir own version, first seen Sep 9, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- bablsoft/accessflow★ 9same 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 repository22 other files it gives its agents.
- ai-directorSkill
- code-implementationSkill
- code-repairSkill
- code-verifySkill
- concept-runSkill
- db-migrationSkill
- deploy-basicSkill
- deploy-filesSkill
- docsSkill
- feature-specSkill
- infra-terraformSkill
- plan-foundationSkill
- plan-masterSkill
- plan-repairSkill
- plan-syncSkill
- plan-verifySkill
- process-routerSkill
- project-bootstrapSkill
- project-query-setupSkill
- session-controlSkill
- tauri-developmentSkill
- x-directorSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 3 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Stack isolation is mandatory: Every docker compose call uses the full scoping pattern in reference.md §Compose invocation - no bare docker …
- Very specific: line 31
Host hygiene: Do not document or script host-side npm/yarn/pip install for stack services.
- Very specific: line 32
Operator handoff: every response that ends a turn follows the Operator handoff contract - terse output.
- Distinctive: line 72
Read-only. No file writes.
- Very specific: line 74
Check bin/start.sh (or user-named path) exists.
- Very specific: line 75
If exists: check executable bit (test -x), file size, and run bash -n for syntax.
- Very specific: line 92
If bin/start.sh is missing → recommend @dev-stack init.
- Very specific: line 93
If syntax / scoping / guard missing → recommend @dev-stack init (will regenerate.
- Very specific: line 101
If bin/start.sh already exists, stop and report:
- Distinctive: line 103
Ask once: overwrite | keep | abort.
- Distinctive: line 108
Do not silently overwrite a customized script.
- Very specific: line 116
If they only want the skill or "how to": output the script body in a fenced sh block and state that they should save it as bin/start.sh and …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
dev-stack
Generate or update a single-file POSIX shell script (bin/start.sh preferred) that gives developers a safe, isolated control plane for one Docker Compose project - without affecting other stacks on the host. Project-agnostic: adapt compose paths, service names, profiles, and DB tooling to the target repo.
Tool-agnostic (Cursor, Claude Code, opencode, Codex). Pairs with: project docker-compose*.yml, .env.example, local .env (never committed).
Canonical path: .ai/skills/dev-stack/skill.md · Invocation patterns, tables, CI: reference.md
Hard rules:
- Never
source .env. Parse key=value safely (seereference.md§Safe env parsing). - Stack isolation is mandatory. Every
docker composecall uses the full scoping pattern inreference.md§Compose invocation - no baredocker stop/docker rm/ wildcard volume nukes for "cleanup". - Dangerous operations (
down -v, drop schema, flush caches) require double confirmation with project/database identity - pattern inreference.md§Dangerous commands. - Dual mode: interactive full menu when invoked with no args or
dev; headless subcommands (start,stop, …) for CI;MENU_QUIET=1for non-interactive, capture-on-failure logging - seereference.md§CI. - Menu UX: categorized sections, live stack summary (running/total, health probes), optional terminal colors,
rrefresh,?help - seereference.md§Interactive menu. set -euo pipefailat top; in interactive menu loops, scopeset +e/set -earound compose calls so failures return to the menu instead of exiting the shell.- Respect protected files where the repo marks them (e.g. this project's
.cursorrules§Protected Files): do not changedocker-compose*.yml,Dockerfile.*, or.env*unless the user explicitly permits those edits in the same message. The skill may still generatebin/start.shwithout touching compose. - Host hygiene: Do not document or script host-side
npm/yarn/pip installfor stack services. Package installs belong inside compose services (.cursorrules§ Host hygiene);start.shmay offerexecinto a service for installs when appropriate. - Operator handoff: every response that ends a turn follows the Operator handoff contract - terse output; approvals under
**Needs your approval:**citingpath:L<n>; questions numbered under**Needs your answer:**; exactly one**Next step:**command; one line when nothing is needed (Form A). Decisions and questions never mixed; empty sections omitted.
Parse invocation
Normalize the user message to verb + optional target path.
| User says | Verb | Action |
@dev-stack status | status | Status protocol - read-only: report whether bin/start.sh exists, is executable, and matches the current skill contract |
@dev-stack init | init | Generate fresh bin/start.sh (see Generation protocol) |
@dev-stack update | rewrite | init | Same as init - overwrite existing file after isolation audit |
@dev-stack (no verb) | init | Default to generate / update |
Aliases: update, rewrite, scaffold, generate → init.
Step 0 - Pick a mode
| Mode | Condition | Action |
| status | user asks "is start.sh ready?", "do we have it?", "what version?" | Status protocol - read-only |
| init | user asks to create, update, or rewrite the script | Generation protocol |
Default output
| Artifact | Rule |
| Path | Prefer bin/start.sh at the repository root (create bin/ if missing). Use another path only if the user names it. |
| Executable | Instruct chmod +x bin/start.sh (or apply in the same change if the user asked to create the file). |
| Self-contained | One file; no required sibling lib/ scripts unless the user explicitly wants a split layout. |
Status protocol
Read-only. No file writes.
- Check
bin/start.sh(or user-named path) exists. - If exists: check executable bit (
test -x), file size, and runbash -nfor syntax. - Detect compose project name (
grep -E 'COMPOSE_PROJECT_NAME|--project-name' bin/start.sh). - Detect dangerous-command pattern presence (
grep -E '_double_confirm|print_banner' bin/start.sh). - Output:
## dev-stack status
**Path:** bin/start.sh · **Exists:** yes/no · **Executable:** yes/no
**Syntax:** pass | fail (`bash -n` exit code)
**Compose scoping:** detected | missing
**Dangerous-command guard:** detected | missing
**Recommendation:** ok | run `@dev-stack init` to regenerateEnd the report with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md.
If bin/start.sh is missing → recommend @dev-stack init.
If syntax / scoping / guard missing → recommend @dev-stack init (will regenerate; confirm before overwrite - see Brownfield below).
Brownfield gate (init mode)
Before generating:
- If
bin/start.shalready exists, stop and report:- Current file size, last-modified, executable bit, detected compose scoping.
- Ask once: overwrite | keep | abort.
- On keep: exit with a status summary; do not write.
- On abort: exit silently.
- On overwrite: proceed to Generation protocol.
Do not silently overwrite a customized script.
Present the overwrite | keep | abort question in the closing Operator handoff block (Form B with path:L<n> citations + one **Next step:** command) per SKILL_DEPENDENCIES.md - not only in prose.
When the user has not asked for a file yet
If they only want the skill or "how to": output the script body in a fenced sh block and state that they should save it as bin/start.sh and chmod. If they asked to create the file, write bin/start.sh and verify syntax (sh -n) when possible.
Generation protocol
S1 - Discover the stack (ask or read)
Minimum inputs (record gaps as Unverified until filled):
- Compose file path(s) - default
docker-compose.ymlat repo root. COMPOSE_PROJECT_NAME(or equivalent) - must be stable and unique per clone; recommend reading from.envwith a documented default.- Compose profile - e.g.
dev,local(omit--profileonly if the project truly uses no profiles). - Service names for DB/Redis waits and one-off
exectargets. - DB engine (Postgres, MySQL, none) and how schema is applied (migrations CLI, raw SQL, none).
- URL/port hints - which env vars expose host ports (project-specific).
S2 - Scaffold from the contract
Implement the anatomy and command set in reference.md. Adapt:
_compose_invoke/dc/quiet_dcto the repo's compose files and profile.urls_hintto actual env vars.- DB commands: include, omit, or rename per stack.
S3 - Isolation audit (mandatory before delivery)
Confirm in the generated script:
- No bare
dockermutations outsidedocker composewith project name + project directory + compose file(s). - No
source .envorevalon env content. - Destructive paths use double confirmation +
print_banner(or equivalent) showing which project.
S4 - Completion checklist
| # | Check | Result |
| 1 | bin/start.sh path (or user path) agreed | pass |
| 2 | Compose scoping pattern present | pass |
| 3 | Safe .env reader present | pass |
| 4 | --help lists subcommands | pass |
| 5 | MENU_QUIET=1 + CI path documented | pass |
| 6 | bash -n bin/start.sh (or sh -n for POSIX scripts) | pass / skip |
End the checklist with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md.
Anti-patterns
docker compose downwithout-p/ wrong project directory (destroys wrong stack).- Sourcing
.envfor convenience. - Single
y/nfor volume wipe. - Hard-coded container names from other projects.
- Embedding secrets in the script; read from env only.
- Burying operator actions/questions in prose instead of the closing Operator handoff block (Form A single line / Form B labeled sections).
Source note
Plain-text authoring for this skill lives in skill.md + reference.md. If a collaborator provides a *.skill binary blob, do not treat it as canonical - extract requirements in chat or replace with this markdown skill.
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.

