From claude-skills
Internal guidance for composing prompts that a main agent hands off to Claude Opus subagents (e.g. claude-code-review). Based on Anthropic's official Claude 4.6 prompting best practices. Use when spawning a Claude Opus subagent and you need to structure the forwarded prompt for maximum clarity, groundedness, and reliable structured output.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-skills:claude-opus-promptingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when a main Claude Code agent is about to spawn a Claude Opus subagent (such as `sam-skills:claude-code-review`) and needs to compose the prompt it hands off. The goal is to produce a one-shot hand-off prompt that is clear, grounded, and yields reliable structured output.
Use this skill when a main Claude Code agent is about to spawn a Claude Opus subagent (such as sam-skills:claude-code-review) and needs to compose the prompt it hands off. The goal is to produce a one-shot hand-off prompt that is clear, grounded, and yields reliable structured output.
Based on Anthropic's official Claude 4.6 prompting best practices. Scope: composing forwarded prompts for Opus subagents, not general prompt engineering tutorials.
Treat Claude Opus like a brilliant but new employee who lacks context on your norms. Be explicit. Golden rule: if a colleague with no context would be confused reading the prompt, Claude will be too.
Three things Opus 4.6 rewards:
Three things Opus 4.6 is prone to if you don't push back:
<do_not_over_engineer> when the task touches code or design.<commit_to_approach> when you want it to commit.Every hand-off prompt is built from a selection of XML blocks. Include only what the task needs; don't pad with empty sections.
Canonical placement order (important — long context at top, hard rules and output contract at bottom gives Opus the freshest instructions when it starts generating):
1. <role> — one sentence, at top
2. <context> / <documents> — long-form reference material
3. <input> / <target> — the specific thing to operate on
4. <task> — one sentence restating the concrete job
5. <instructions> — ordered steps, if the workflow matters
6. <grounding_rules> — evidence requirements, if relevant
7. <constraints> — hard rules
8. <output_contract> — exact output shape, at the very bottom
See references/prompt-blocks.md for the full block catalog, including:
<role>, <task>, <context>, <documents>, <input>, <instructions>, <output_contract>, <constraints>, <examples>, <completion_signal><do_not_over_engineer> — for any task touching code or design<investigate_before_answering> — anti-hallucination for codebase tasks<commit_to_approach> — reduces over-thinking<grounding_rules> — forces quote-before-conclude for review/research<use_parallel_tool_calls> — for read-heavy subagents<subagent_usage> — when the target agent has Agent/Task tool and you want it to work directly instead of delegating further<do_not_act_before_instructions> — for read-only agentsEnd-to-end fill-in-the-blank templates for common hand-off patterns live in references/prompt-recipes.md:
sam-skills:claude-code-review with a real Obsidian task-id and plan docs (Recipe 1)When composing a new prompt, start from the closest template in that file and delete blocks the task doesn't need.
<constraints>, where negative rules are expected.<design_doc>, refer back to it as "the design_doc" throughout.<documents> with <document index="n"> + <source> + <document_content> sub-tags.<output_contract> instead.Before sending the prompt:
<task>?<output_contract> at the bottom?<instructions> and <output_contract> reference?{{placeholder}} markers from templates?Common failure modes and how to avoid them live in references/prompt-antipatterns.md. Highlights:
{{placeholder}} markers in the final promptcodex:rescue). Those have their own prompting conventions — see codex:gpt-5-4-prompting for the codex equivalent.npx claudepluginhub sampeng87/skills --plugin claude-skillsCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.