agentleFS
DshamirDshamir/slm-forge/skills/forge-bootstrap/SKILL.md

forge-bootstrap

Skill1 starsChanged 6 months agoMITView on GitHub

Installs the training stack on a freshly-provisioned EC2 instance — Python venv, Torch with matching CUDA, transformers + peft + datasets + accelerate, and (in the background) llama.cpp so the build is ready by the time TRAIN finishes. Drops a sentinel file so re-runs skip cleanly. 30-minute SSM-command timeout by default.

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify manifest.compute_target.instance_id is Online in SSM

    line 15

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

forge-bootstrap

When this fires

Phase position: BOOTSTRAP — after forge-provision, before forge-train. Runs entirely on the EC2 instance via SSM RunCommand.

What it does

  1. Verify manifest.compute_target.instance_id is Online in SSM
  2. Upload scripts/bootstrap.sh to the instance and execute it
  3. Inside the instance: mount the EBS, create the Python venv, install torch + transformers + peft + datasets + accelerate + bitsandbytes
  4. In the background, start cloning + building llama.cpp so it's ready when QUANTIZE fires (overlaps with TRAIN to save wall-clock)
  5. Drop /workspace/.forge-bootstrap-complete sentinel
  6. Sync bootstrap logs to S3
  7. Set manifest.compute_target.bootstrap_completed = true and advance to TRAIN

Inputs

  • $1 = forge-id
  • manifest.compute_target.instance_id
  • scripts/bootstrap.sh (uploaded to the instance)
  • FORGE_BOOTSTRAP_TIMEOUT_SEC (env, default 1800)

Outputs

  • /workspace/.forge-bootstrap-complete (sentinel on the instance)
  • s3://.../logs/bootstrap.log
  • manifest.compute_target.bootstrap_completed = true
  • manifest.state.current_phase = TRAIN

Idempotency

If manifest.compute_target.bootstrap_completed == true, exits 0. The bootstrap script itself is also idempotent (re-running on a half-installed instance picks up where it left off).

Failure modes

ExitReason
0sentinel exists or already-set
1SSM command timeout OR sentinel never created. Errors logged with recoverable=true so forge-resume can re-attempt. llama.cpp clone failure is non-fatal (background).
64no forge-id provided

External resources

  • AWS EC2 + SSM (RunCommand)
  • AWS S3 (log sync)
  • GitHub (llama.cpp clone — background, non-fatal)

Cost class

spends GPU time — instance is already running and billing.

Depends on

forge-provision (instance live + SSM Online)

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.

Reviews can't be read right now.

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.