Skip to content

πŸ§ͺ Recipes

Copy-paste workflows that survive contact with reality. Less theory. More β€œpaste this and win”. πŸ†

🍳

Chef’s note: if a recipe asks for a tiny change, keep it tiny. The turkey rule applies in the kitchen too. πŸ¦ƒ


Recipe: first green run 🟒

curl -fsSL https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install-remote.sh | bash
omlx start   # or configure Ollama β€” see Providers

mkdir -p /tmp/slm-demo && cd /tmp/slm-demo
printf 'package main\n\nfunc Hello() string { return "hi" }\n' > hello.go
slmcode init
slmcode run -v "Add a short Go doc comment to Hello(). Tiny change only."
cat hello.go

Recipe: safe edits on a real repo πŸ›‘οΈ

cd ~/code/my-app
slmcode init
slmcode config set permission review
slmcode run -v "Add input validation to the login handler"
slmcode apply          # when the staged patches look sane
slmcode diff
slmcode commit -m "slmcode: validate login input"

Recipe: β€œwhere is X?” without writing code πŸ”Ž

slmcode run --agent explorer --dry-run "Where is authentication handled?"
# or
slmcode run --agent docs "Summarize the public HTTP API surface"

Maps without mayhem. Excellent for onboarding days and panic Mondays.


Recipe: slow SLM survival kit πŸ’βž‘οΈπŸ‡

slmcode config set think_passes 2
slmcode config set retries 2
slmcode config set max_context_kb 16
slmcode config set parallel 1
slmcode run -v "…"

If it wanders: tighten AGENTS.md, pin atomic-coding, force explore once.

SLMCODE_FORCE_EXPLORE=1 slmcode run -v "…"

Recipe: hybrid brains 🧬

Local worker, sharper reviewer β€” budget diplomacy at its finest.

slmcode tui
# then:
/agent edit worker provider=ollama model=qwen2.5-coder:14b endpoint=http://127.0.0.1:11434
/agent edit reviewer provider=openai model=gpt-4o-mini endpoint=https://api.openai.com/v1

Or edit YAML under .slmcode/agents/.


Recipe: resume after lunch (or panic Ctrl+C) πŸ₯ͺ

# during a run: Ctrl+C or /stop
slmcode session list
slmcode session resume run-…
# TUI: /resume

Your checkpoint remembers. Your sandwich does not. Prioritize accordingly.


Recipe: OpenRouter weekend 🌈

export SLMCODE_PROVIDER=openrouter
export SLMCODE_ENDPOINT=https://openrouter.ai/api/v1
export SLMCODE_API_KEY=sk-or-…
export SLMCODE_MODEL=anthropic/claude-3.5-sonnet
slmcode doctor
slmcode run -v "Refactor the retry helper and add tests"

Recipe: Studio + TUI dual wield πŸ₯Š

# terminal A
slmcode studio

# terminal B
cd the-same-project
slmcode watch

Edit CONTEXT in Studio; watch the board in the terminal. Feel powerful. Use responsibly.


Recipe: teach house style once 🏠

# AGENTS.md

- Prefer table-driven tests
- No drive-by refactors
- Match existing naming; don't invent parallel worlds
slmcode skills new house-style --agents worker,reviewer,corrector
slmcode run --skill house-style "…"

πŸ“œ

Bonus tip: vague skills make vague agents. β€œBe careful” is not a skill. β€œNever rewrite unrelated files” is a skill.

β˜€οΈ Made with β™₯ by UnicoLab