Teach your agent slo-gen
Coding agents are good at YAML and bad at guessing what an unfamiliar CLI does to a server. These files close that gap. Each one is the same guide: the spec formats with every field and default, every command, the safety rules, the error codes, and a short list of things the agent must never do for you.
.claude/skills/slo-gen/SKILL.md or ~/.slo/user_skills/slo-gen/SKILL.mdAGENTS.md at the root of your infrastructure repoanywhere your agent reads context fromClaude Code
Claude Code loads skills from .claude/skills/<name>/SKILL.md in your project, or ~/.claude/skills/<name>/SKILL.md for every project. Install it for the repo that holds your specs:
mkdir -p .claude/skills/slo-gen
curl -fsSL https://gen.slostack.io/agents/slo-gen/SKILL.md -o .claude/skills/slo-gen/SKILL.md
The frontmatter tells Claude when to load it: whenever you mention sg, slo-gen, a machine.yaml or a cluster.
Slo
Slo reads your own skills from ~/.slo/user_skills/, and yours win over the built-ins:
mkdir -p ~/.slo/user_skills/slo-gen
curl -fsSL https://gen.slostack.io/agents/slo-gen/SKILL.md -o ~/.slo/user_skills/slo-gen/SKILL.md
Codex
Codex reads AGENTS.md from the root of your repository on every run. If you don't have one yet:
curl -fsSL https://gen.slostack.io/agents/AGENTS.md -o AGENTS.md
If you already have an AGENTS.md, append it so your existing instructions stay:
curl -fsSL https://gen.slostack.io/agents/AGENTS.md >> AGENTS.md
Anything else
slo-gen.md is the plain guide. Paste it into a chat, attach it, or point your CLAUDE.md at it:
curl -fsSL https://gen.slostack.io/agents/slo-gen.md -o docs/slo-gen.md
echo 'When working with sg or slo-gen specs, read docs/slo-gen.md first.' >> CLAUDE.md
There's also an llms.txt at the site root for tools that look for one.
What the guide tells your agent not to do
The guide is written so an agent asks before anything irreversible. It tells the agent never to:
- answer a
[y/N]confirmation for you, or add--yesunless you asked for it after reading the plan; - put a secret value in a spec, a command it echoes or a committed file;
- edit or delete
.sg/state.db, or touch~/.ssh/known_hoststo get past a host-key error; - use
--force-volume-share,--confirm-root-dataor--forceto make an error go away; - run a destroy without confirming in plain words what will be deleted.
Prompts that work well
Once the file is in place, ask for things the way you would ask a colleague:
Write machine.yaml files for three Hetzner boxes at 203.0.113.11-13. They have
80 GB disks and 8 GB RAM. I want to reach the LXD UI from my laptop on the
tailnet. Then plan the first one and show me the plan.
Add a PostgreSQL 17 database to application.yaml on node-c with a 20GiB block
volume, expose it on the tailnet, and run sg application plan. Don't deploy.
sg application deploy failed. Read the output, tell me what it refused and why,
and suggest the smallest spec change. Don't use any --force flags.