skills/agent-prompt-engineering/SKILL.md
Design and harden agent, command, workflow, and tool prompts for reliable execution across different AI models. Use when creating or revising repo-local agents to apply model-specific prompting techniques, tighten scope, and prevent common agent failure modes like doom loops, status-over-evidence routing, and impossible read-only delegation.
npx skillsauth add chelch5/scafforge agent-prompt-engineeringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when prompt wording controls how agents coordinate, route work, and use tools. Use ../../references/competence-contract.md as the package-level target: prompts should leave weaker models with one clear legal next move, not a maze of plausible interpretations.
During standard greenfield scaffolding, this is a required same-session pass after opencode-team-bootstrap and before ticket-pack-builder. The pass may be light or heavy depending on the chosen models and project-specific coordination risk, but it should not be skipped.
Read the existing prompt, command, or process doc and identify:
Read references/prompt-contracts.md for the target prompt type:
ticket_lookup.transition_guidance as the canonical next-step summary, verify artifacts before routing, and stop on repeated lifecycle contradictions instead of probing alternate stage or status valuesRead references/anti-patterns.md and eliminate:
todo to see what passes)/commands as autonomous workflow tools)Before choosing prompt density, read the scaffold's selected model tier from .opencode/meta/bootstrap-provenance.json or the generated .opencode/skills/model-operating-profile/SKILL.md. If the tier is missing, default to weak to preserve the weaker-model-first contract.
Different models have different prompting best practices. When hardening prompts for a specific model:
Step A: Check package-side model notes
Look in references/model-notes/ for existing documentation on the chosen model. Treat these notes as read-only package reference material.
Step B: Research if needed If no local docs exist for the chosen model, web search for:
Step C: Apply model-specific techniques Common model-specific differences:
Step C1: Match prompt density to the configured model tier
weak: include full stop conditions, explicit verification checklists, concrete truth-source hierarchy, named blocker paths, and short examples for every section that would otherwise be ambiguousstandard: include stop conditions and verification checklists, link back to canonical truth sources, and use examples only where the repo has historically shown confusionstrong: keep stop conditions explicit, reference local checklist and truth-source docs instead of repeating them in full, and use minimal examplesDo not let a stronger-model tier remove hard safety boundaries. Tiering changes prompt density, not ownership, artifact, or escalation rules. Do not let model-tier tuning remove stack-specific bootstrap guidance or proof requirements either; those stay mandatory across all tiers.
Step D: Record project-specific adaptations If the generation run discovers project-specific prompt adaptations worth preserving, write them into the generated repo's local notes or skill surfaces. Do not write back into Scafforge package files during project generation.
Read references/weak-model-profile.md and ensure:
uv, pytest, rg, git identity, or another required executable is unavailable, classify it as a blocker instead of inventing a workflow workaroundRe-read the final prompt and ask:
Before leaving this skill, confirm all of these are true:
ticket_lookup.transition_guidance as canonical, routes bootstrap failures to environment_bootstrap, and does not stop at summary when work remainsWhen this skill runs as a scafforge-repair follow-on hardening pass, read .opencode/meta/repair-follow-on-state.json and, after the prompt hardening work is actually complete for the current repair cycle, write:
.opencode/state/artifacts/history/repair/agent-prompt-engineering-completion.mdUse this minimal shape so the public repair runner can auto-recognize agent-prompt-engineering completion for the current repair cycle on the next run:
# Repair Follow-On Completion
- completed_stage: agent-prompt-engineering
- cycle_id: <cycle_id from .opencode/meta/repair-follow-on-state.json>
- completed_by: agent-prompt-engineering
## Summary
- Hardened the project-specific prompts and delegation rules for the current repair cycle.
Do not emit this artifact speculatively. Only write it once the prompt-hardening work is actually complete for the current repair cycle.
Continue to ../ticket-pack-builder/SKILL.md for bootstrap ticketing in greenfield generation, or return to ../scaffold-kickoff/SKILL.md for the next step in the flow.
references/prompt-contracts.md — per-agent-type prompt rulesreferences/anti-patterns.md — common prompt failuresreferences/examples.md — before/after prompt improvementsreferences/weak-model-profile.md — rules for weak-model robustnessreferences/model-notes/ — model-specific prompting documentation used as read-only package referencetesting
Use when validating Android feature flows in an emulator with adb-driven launch, input, UI-tree inspection, screenshots, and logcat capture.
development
Best practices for Remotion - Video creation in React
development
Set browser-game architecture before implementation. Use when the user needs engine choice, simulation and render boundaries, input model, asset organization, or save/debug/performance strategy.
development
Prepare and optimize browser-game 3D assets. Use when the user asks for GLB or glTF shipping work, including Blender cleanup and export, collision or LOD setup, compression, texture packaging, and runtime validation.