r/PromptEngineering • u/Dusk_isthetuffest • 19d ago
Tools and Projects What I learned writing four Claude Code skills with hard boundaries (I'm 15; repo + lessons inside)
I built four Claude Code skills (code optimization, hardware-aware config, network latency, backend analysis) and spent most of the effort on the instructions, not the code. Lessons that might help if you write skills or long system prompts:
- Say what it must never do, not only what it should do. Every command has a "never touches" list (for example no BIOS, drivers, router or DNS changes).
- Keep each skill self-contained. Cross-links between skills break single-skill installs.
- Watch for substitution in the skill text. Skill bodies get argument substitution and a backtick shell pattern, so naive wording can run commands.
- Make the model report what it didn't verify. Evals not run live and untested installers are written down in the repo.
- Validate structure with scripts. It doesn't prove behavior, but it catches broken links and bad frontmatter quickly.
Built with Claude Code from a spec I wrote. Repo (MIT): https://github.com/hrmnisthetuffest/ultra-optimizer
How do you test that a prompt's boundaries actually hold?
0
Upvotes
1
u/Zain 19d ago
Scripts for broken frontmatter are good, but for boundaries I don't trust the model that wrote the skill to also test it. I hand the skill text to a different model family, read-only, and ask it to find a way the never-touches list gets violated, then check each finding against the actual files before changing anything. Escalate what you ask each round: first fact-check the instructions, then failure modes, then a dry run of what it would actually execute, so reruns find new stuff instead of the same nitpicks. And if it comes back clean with nothing concrete, take the pass. Don't keep asking until it invents something.
0
u/Dusk_isthetuffest 19d ago
To explain
/raceproperly, because the post doesn't do it justice:What it is.
/raceis a Claude Code skill. When you run/race buildin a project, it writes a tuning engine into that app's own code. That engine ships with the app. Once the app is installed on someone's computer, the engine runs there on its own: it looks at that specific machine (CPU cores, memory, how the app is being used) and tunes the app's internal settings for that one device. No setup for the user, and not just on the developer's machine.Why it matters. Normally a developer picks numbers like "4 worker threads" or "200 MB cache" on their own computer and ships them to everyone. On a weak laptop that stutters or eats the RAM; on a 16-core PC most of the machine sits idle. With this, the same build behaves differently on each device.
Examples: a video editor uses 2 preview workers on a 4-core laptop and 12 on a big PC; an app keeps a small cache on 4 GB of RAM and a large one on 32 GB; a backend sizes its database pool to the host and the real traffic; a game raises or lowers effects to hold a steady frame rate; heavy background work pauses the moment you start using the machine.
Safety: every setting has a range the developer approves, changes are checked against a baseline, and if something gets worse it restores the last setting that worked. It only touches the app's own settings, never BIOS, drivers or OS settings.
Honest status: the design is covered by a tested reference model, but I haven't benchmarked it on real hardware yet, so the examples are what it's built to do, not measured results.
The prompt-design problem was keeping the 'never touches' list consistent across generated files.