# Init Script Contract

Author idempotent init.sh under 120s plus sibling test.sh, stop.sh, reset.sh, serve.sh...

- Repository: https://github.com/Archive228/loopkit (756 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-07-14
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Archive228/loopkit --skill init-script-contract -g -a claude-code -y`
Codex: `npx skills add Archive228/loopkit --skill init-script-contract -g -a codex -y`
Cursor: `npx skills add Archive228/loopkit --skill init-script-contract -g -a cursor -y`
Gemini CLI: `npx skills add Archive228/loopkit --skill init-script-contract -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Archive228/loopkit`

## Description

Author idempotent init.sh under 120s plus sibling test.sh, stop.sh, reset.sh, serve.sh with fixed names the harness relies on.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Init Script Contract

Every coding session in a multi-session project starts by bringing the dev server up. If the entry point is named differently each time, or takes four minutes, or prompts for input, you burn tokens and wall-clock on every single session. The fix is a fixed set of script names at the project root with a hard contract. The initializer agent writes them once; every downstream session relies on them.

The names are load-bearing, [[shift-notes]] and [[broken-window-check]] both refer to them by name. Do not invent your own.

## When to apply

- You are the initializer agent scaffolding a fresh project.
- You just discovered setup exceeds 120s and need to split cleanly.
- You are auditing an existing project whose sessions keep re-discovering how to launch the app.

## The five scripts

| Script | Contract |
|---|---|
| `init.sh` | Clean clone → dev server up on `localhost`. Idempotent. Under 120s. Zero prompts. |
| `serve.sh` | Start the dev server only. Written when `init.sh` cannot fit under 120s. |
| `test.sh` | Run the full test suite. Exit non-zero on any failure. |
| `stop.sh` | Cleanly kill the dev server. Sessions run this before exiting. |
| `reset.sh` | Wipe local DB and ephemeral state. Leave code untouched. Used by [[broken-window-check]]. |

## Procedure

The rest: https://github.com/Archive228/loopkit/blob/HEAD/skills/init-script-contract/SKILL.md
