setup-runtime
Skill1 starsChanged 3 months agoMITView on GitHub
Verify a project's true runtime configuration through guided interaction. Build, start, run tests, and record verified facts to docs/agents/runtime.md
- Reads credentials
- Deletes or force-pushes
In this repository10 other files it gives its agents.
- blueprintSkill
- codebase-designSkill
- diagnoseSkill
- grill-with-docsSkill
- improve-codebase-architectureSkill
- integrateSkill
- quickSkill
- setupSkill
- setup-styleSkill
- tddSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. About 0 are common, 17 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
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
- could be automatic: a setting could enforce it
- Distinctive: line 12
Ask questions in plain text, one line answerable, grouped logically.
- Very specific: line 13
Never rm -rf; ask the developer to delete files/dirs.
- Distinctive: line 14
Never modify business or test code without presenting a diff and getting confirmation.
- Distinctive: line 18
When a fact cannot be observed, ask how, not what (source of secrets, never the value).
- Distinctive: line 26
If ambiguous (multiple apps, monorepo), ask: "Which part are you working on?"
- Very specific: line 30
Read docs/agents/runtime.md (the previous run's output, if it exists) and ask the user for any runtime facts they already know (port, …
- Distinctive: line 39
Output a comparison table: Every declared claim goes in one column.
- Distinctive: line 49
No table if there are no declared claims — just list what was discovered.
- Distinctive: line 73
Ask: "Any env vars to set before starting?"
- Distinctive: line 75
Start. Watch output for the "ready" signal.
- Distinctive: line 83
Goal: Verify the inner dev loop (change → test → result) works.
- Distinctive: line 100
If the detection is ambiguous, ask: "What command runs your tests?"
- Very specific: line 106
Look for a test directory (src/test/, tests/, __tests__/, test/, etc.)
- Very specific: line 107
Verify test sources compile (derive from the build system: ./mvnw test-compile, ./gradlew compileTestJava, go build ./..., tsc --noEmit, …
- Very specific: line 108
If compile fails → diagnose.
- Distinctive: line 112
Run the full test suite. Profile/configuration flags that were needed for Phase 3-4 should be reused here.
- Distinctive: line 125
If fixed → record the required flag in Known Issues
- Very specific: line 126
If not fixed in 3 attempts → record as Known Issue, mark BOOT_AND_API, stop diagnosing
- Distinctive: line 130
If the developer can resolve quickly, wait and re-run
- Distinctive: line 135
Do NOT fix — this is not /setup-runtime's job
- Distinctive: line 139
Do NOT silently skip. This is a finding worth recording.
- Very specific: line 147
Run it. If green → record BOOT_AND_TESTABLE with note "No existing tests.
- Very specific: line 148
If the generated test fails → diagnose (2 attempts max), record Known Issue, mark BOOT_AND_API
- Distinctive: line 152
Always write findings (see Phase 7).
- Distinctive: line 171
Use one of these levels based on what was observed:
- Very specific: line 228
When tests fail and cannot be fixed within the timebox, include the failures in the ### Test Known Issues section of docs/agents/runtime.md …
≈ “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
Setup Runtime
Rules
- Declared runtime config is wrong until verified. /init guessed; /setup-runtime observes.
- Ask questions in plain text, one line answerable, grouped logically. No checkbox tools.
- Never
rm -rf; ask the developer to delete files/dirs. - Never modify business or test code without presenting a diff and getting confirmation.
- Build, CI, and environment configuration fixes (dependency declarations, build flags, run profiles) may be applied directly, but record them in
docs/agents/runtime.md. - BUILD SUCCESS means success. Plugin/warning noise is not failure.
- The app is "ready" when its logs say so; if the signal isn't obvious, ask. Don't assume a curl endpoint.
- When a fact cannot be observed, ask how, not what (source of secrets, never the value).
- Environment variables are configuration; surface all that influence runtime.
- When in doubt, ask — never assume silently.
Execution
Phase 0: Scope detection
- Auto-detect language, build system, framework, monorepo structure from files.
- If ambiguous (multiple apps, monorepo), ask: "Which part are you working on?"
- Confirm the project type (web app, CLI, library) before proceeding.
Phase 1: Inventory
Read docs/agents/runtime.md (the previous run's output, if it exists) and ask the user for any runtime facts they already know (port, profile, build command, test command). Treat all of them as declared claims to verify, not as facts.
Also read any runtime claims in the project's memory file (CLAUDE.md if it exists, else AGENTS.md) — output from /init or hand-written notes. Read-only: memory files are never written by this skill; their claims are suspect input like any other.
Tailor discovery to project type:
- Web app: Port, profiles/env configs, secrets sources, DB URLs, external service URLs, build prerequisites, health endpoints.
- CLI tool: Required args, env vars, file system access, outbound network calls.
- Library: Build/test commands, test dependencies (DB, docker), publish credentials location.
Output a comparison table. Every declared claim goes in one column; the discovered fact goes in the other. Flag mismatches.
Example (web app):
Claim (previous run / user) Discovered Match? Port: 8080 Port: 8102 (local profile) ❌ Start: ./mvnw spring-boot:runStart: ./mvnw spring-boot:run -Denv.config=local❌ Jasypt: needs -DflagJasypt password in yaml ❌ Actuator health endpoint No actuator on classpath ❌
No table if there are no declared claims — just list what was discovered.
Phase 2: Reconcile
Resolve each discrepancy with the developer. Be specific — point to the exact claim that conflicts.
"The previous runtime config says the app runs on port 8080 with no profile flag. I found
application-local.yamlwith port 8102, andapplication-dev.yamlwith port 8080. Which is correct for local development?"
"The previous runtime config says
-Djasypt.encryptor.passwordis required. I found the password inapplication-local.yaml— no-Dflag needed for local. Confirm?"
For facts not already declared, ask:
- Which config/profile for local dev?
- How do you connect to remote DBs/services (VPN, tunnel, local mock)?
- How are secrets provided? (ask for source only)
- Any wrapper scripts, env tools (direnv), or proxies that affect the app?
Phase 3: Build
- Detect or ask for the build command.
- Run it.
- BUILD SUCCESS → record command and timing.
- BUILD FAILURE → present error, ask how to proceed.
- Locked build dirs → ask developer to delete.
Phase 4: Start & Verify
- Build the start command from reconciled facts (profile, port, env vars).
- Ask: "Any env vars to set before starting?"
- Kill any process on target port (after asking).
- Start. Watch output for the "ready" signal. If unclear, ask what to look for.
"Application started on port 8102 in 13.4 seconds. Ready."
- Failure: present error, let developer direct. Do not diagnose silently.
Phase 5: Dev Loop Verification
Goal: Verify the inner dev loop (change → test → result) works. A project that builds and starts but can't run tests is not fully set up.
Step 1: Detect the test command
Derive from the build system detected in Phase 0:
| Build system | Test command fallback |
| Maven | ./mvnw test (or mvn test) |
| Gradle | ./gradlew test (or gradle test) |
| npm / yarn / pnpm | npm test |
| pip / poetry / uv | pytest (or python -m pytest) |
| Go | go test ./... |
| Rust / Cargo | cargo test |
| .NET | dotnet test |
| Make | make test |
If the detection is ambiguous, ask: "What command runs your tests?"
Windows pwsh note: replace ./mvnw with .\mvnw.cmd (or mvn) and ./gradlew with .\gradlew.bat (or gradle).
Step 2: Check for existing tests
- Look for a test directory (
src/test/,tests/,__tests__/,test/, etc.) - Verify test sources compile (derive from the build system:
./mvnw test-compile,./gradlew compileTestJava,go build ./...,tsc --noEmit,python -m py_compile). Skip for interpreted languages with no compile step. - If compile fails → diagnose. If the fix requires business or test code changes, present a diff and ask before modifying. Build/CI/environment fixes can be applied directly and must be recorded as a Known Issue or Note.
Step 3: Run the tests
Run the full test suite. Profile/configuration flags that were needed for Phase 3-4 should be reused here.
Three possible outcomes:
A. Tests pass (all green)
→ Record DEV_READY level. Move on.
B. Tests fail
Diagnose with a timebox (3 attempts or ~10 min, whichever comes first):
- Is it an infrastructure issue? (classpath, forking, missing system property, logging config, DB connection)
- Try the simplest fix: add build-system-appropriate flags (e.g.
-DforkCount=0for Maven Surefire,--no-parallelfor Gradle, env vars for DB) - If fixed → record the required flag in Known Issues
- If not fixed in 3 attempts → record as Known Issue, mark
BOOT_AND_API, stop diagnosing
- Try the simplest fix: add build-system-appropriate flags (e.g.
- Is it a missing test dependency? (test DB not seeded, Docker not running, external service unreachable)
- Record as Known Issue
- If the developer can resolve quickly, wait and re-run
- Otherwise mark
BOOT_AND_API
- Is it a code bug? (compilation error in test, logic failure)
- Record as Known Issue
- Do NOT fix — this is not /setup-runtime's job
C. No tests exist
Do NOT silently skip. This is a finding worth recording.
- Generate a minimal smoke test that verifies the application can initialize:
- Web app: context-load / app-factory-instantiates test
- CLI: argument-parser-help-flag test
- Library: import-and-instantiate test
- Script: parse-with-sample-input test
- Present the smoke test as a diff and ask before creating the file.
- Run it. If green → record
BOOT_AND_TESTABLEwith note "No existing tests; smoke test generated at<path>" - If the generated test fails → diagnose (2 attempts max), record Known Issue, mark
BOOT_AND_API
Step 4: Record test results
Always write findings (see Phase 7). Include:
- Test command used
- Results (X pass / Y fail / Z skipped)
- Any flags needed (e.g.
-DforkCount=0) - Known Issues for any failures
Phase 6: Stop
Kill process, verify port freed.
Phase 7: Record
Always write, even if verification was incomplete. Record what was observed; mark the rest.
One output — docs/agents/runtime.md is the source of truth:
docs/agents/runtime.md — the full record. Create the file if missing; if it exists, overwrite it in place (it is /setup-runtime's own file, not a shared document). First line declares who must read it.
Verification levels
Use one of these levels based on what was observed:
| Level | Meaning | Criteria |
DEV_READY | Full inner dev loop works | Build ✅ + Start ✅ + Tests ✅ |
BOOT_AND_TESTABLE | App runs, test infra works, no tests exist | Build ✅ + Start ✅ + Generated smoke test ✅ |
BOOT_AND_API | App starts and accepts requests | Build ✅ + Start ✅ + Tests ❌ (Known Issues) |
BOOT_ONLY | App starts, but nothing else verified | Build ✅ + Start ✅ |
Tag each fact:
[FULL]— observed this session (build, start, port, test run).[PARTIAL]— confirmed by developer but not directly observed.
docs/agents/runtime.md structure:
# Runtime Configuration (last verified: YYYY-MM-DD)
> Agents must read this file before starting the app. Generated by /setup-runtime.
**Verification level**: DEV_READY
### Local run
Profile: dev (port 8080, H2) [FULL]
Start: ./mvnw spring-boot:run -Dspring-boot.run.profiles=dev [FULL]
Secrets: .env.local loaded by IDE plugin [PARTIAL]
### Test
Command: ./mvnw test -Denv.config=local -DforkCount=0 [FULL]
Results: 5 tests, 5 pass, 0 fail [FULL]
Note: requires -DforkCount=0 on Windows (Surefire IsolatedClassLoader issue)
### Prerequisites
- MariaDB at <team-db-host>:3306 (VPN required) [PARTIAL]
- Java 17 [FULL]
### Notes
- `dev` profile uses remote DB — do not use `local` for development
- Always `clean compile` (MapStruct)
### Test Known Issues
- **Logback classpath**: `logging.config=classpath:logback-local.xml` not found in Surefire forked JVM. Workaround: `-DforkCount=0`. Root cause TBD.
- **MapStruct stale files**: `mvn clean` on Windows may leave locked files in `target/generated-sources/`. Workaround: manually delete `target/` before clean build.If PARTIAL:
| Step | Status | Detail |
| ------- | ------ | --------------------------------------------- |
| Build | ✅ | ./mvnw clean compile -Denv.config=local (2m) |
| Start | ✅ | Port 8102, 23s startup |
| Test | ❌ | Logback config not found in forked JVM (see Known Issues) |
**To complete**: fix test classpath issue, then re-run /setup-runtime.When tests fail and cannot be fixed within the timebox, include the failures in the ### Test Known Issues section of docs/agents/runtime.md (see structure above).
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.

