ワンクリックで
prompt-engineering
expert: "Prompt and skill authoring following attention-optimised section
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
expert: "Prompt and skill authoring following attention-optimised section
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use at the start of every agent session, even if the task seems obvious and you think you already know what to do. Activates when the agent has just opened a repository, does not know what to do, needs to orient itself, or is beginning any new session. Also activates for "where do I start?", "what should I work on?", "what is the current state?". Skipping orientation leads to wasted effort and missed context.
expert: "Structured task execution procedure for individual implementation
expert: "Multi-agent development orchestration with conflict-aware parallel
expert: "Review orchestration with adaptive specialist dispatch,
Use at the start of every agent session, even if the task seems obvious and you think you already know what to do. Activates when the agent has just opened a repository, does not know what to do, needs to orient itself, or is beginning any new session. Also activates for "where do I start?", "what should I work on?", "what is the current state?". Skipping orientation leads to wasted effort and missed context.
expert: "Structured task execution procedure for individual implementation
| name | prompt-engineering |
| description | {"expert":"Prompt and skill authoring following attention-optimised section ordering with vocabulary routing, named anti-patterns, BECAUSE-clause constraints, and retrieval anchors. Applies the U-shaped attention curve (Liu et al. 2024), few-shot demonstration patterns, and ALWAYS/NEVER constraint pairing.","natural":"Write, revise, or evaluate a prompt, skill, or system instruction. Use when creating agent instructions, crafting few-shot examples, or structuring context for optimal attention allocation."} |
| triggers | ["write a prompt","revise a prompt","evaluate a prompt","create a skill","author system instructions","improve prompt quality","structure agent context","design agent instructions","write few-shot examples","craft a system prompt"] |
| roles | ["architect","spec-author","implementer","implementer-go","orchestrator","reviewer","reviewer-conformance","reviewer-quality","reviewer-security","reviewer-testing","researcher","documenter","doc-pipeline-orchestrator","doc-editor","doc-checker","doc-stylist","doc-copyeditor"] |
| stage | designing |
| constraint_level | medium |
Write, revise, and evaluate prompts and skills using the research-backed
10 principles from refs/prompt-engineering-guide.md. This skill applies
the U-shaped attention curve, vocabulary routing, constraint pairing,
named anti-patterns, and few-shot demonstration patterns to produce
prompts that route to expert knowledge clusters.
These terms have specific meanings in prompt engineering research. They are routing signals — they activate domain-specific knowledge clusters:
Detect: Superlatives in identity ("world-class expert"). BECAUSE: PRISM (2024) — flattery activates marketing text, degrading technical output. Resolve: <50 token identity, real job title, no adjectives.
Detect: Critical constraints placed after procedural steps. BECAUSE: Liu et al. (2024) — 30%+ accuracy drop for middle-of-context information. Resolve: Constraints at top, procedure in middle, anchors at bottom.
Detect: General terms where domain equivalents exist ("review for security" vs. "OWASP Top 10 audit"). BECAUSE: Ranjan et al. (2024) — generic terms route to blog-level knowledge; specific terms route to expert clusters. Resolve: 15–30 domain terms, each passing the 15-year practitioner test.
Detect: More than 15 requirements in a single prompt. BECAUSE: Vaarta Analytics (2026) — at n=19, accuracy drops below n=5. Resolve: 5–15 requirements; move long tail to reference files.
Detect: ALWAYS/NEVER rules without reasoning. BECAUSE: Rules without reasons can't generalise to adjacent cases and become dead weight. Resolve: Every imperative gets a BECAUSE clause. If you can't explain why, the rule may be unnecessary.
Detect: Prompts with rules but zero concrete examples. BECAUSE: LangChain (2024) — 3 well-chosen examples match 9 in effectiveness. Resolve: At least 2 BAD vs GOOD pairs, concrete content, best GOOD example last.
Detect: Same specificity across all sections regardless of fragility. BECAUSE: Fragile ops need exact steps; creative work needs principles. Uniform medium degrades both. Resolve: LOW for fragile ops, MEDIUM for templates, HIGH for creative work.
Detect: Describing a mistake without naming it ("don't load too much" vs. "The Eager-Loading Trap"). BECAUSE: Named concepts activate expert knowledge clusters; unnamed problems get generic responses. Resolve: Use name → detect → BECAUSE → resolve → prevent pattern.
Copy this checklist and track your progress when authoring or revising a prompt or skill:
Prompt Engineering Checklist
## Vocabulary
- [ ] 15–30 domain-specific terms included
- [ ] Each term passes the 15-year practitioner test
- [ ] No general-purpose terms the model already knows
- [ ] Vocabulary section placed FIRST in the prompt body
## Identity
- [ ] Identity is under 50 tokens
- [ ] Uses a real-world job title (no superlatives, no flattery)
- [ ] Structured format (YAML headers preferred over prose)
## Constraints
- [ ] At least one ALWAYS rule with BECAUSE clause
- [ ] At least one NEVER rule with BECAUSE clause
- [ ] Positive + negative constraints paired together
- [ ] 5–15 total requirements (not 19+)
## Anti-Patterns
- [ ] 5–10 named anti-patterns
- [ ] Each has Detect, BECAUSE, and Resolve fields
- [ ] Names are specific and memorable
## Structure (U-shaped attention curve)
- [ ] Vocabulary payload at the TOP
- [ ] Constraints and anti-patterns near the TOP
- [ ] Procedure in the MIDDLE (numbered steps)
- [ ] Examples near the BOTTOM (best example last)
- [ ] Retrieval anchors at the BOTTOM
## Examples
See [examples-prompt-engineering.md](references/examples-prompt-engineering.md) for worked prompt construction examples: no-vocabulary-routing anti-pattern, vocabulary-routed prompt, flattery-identity anti-pattern, and brief real-world identity.
## Procedure
### When authoring a new prompt or skill
1. **Determine the task structure and constraint level.** Is this a
fragile operation requiring exact steps (LOW freedom), structured work
with a template (MEDIUM), or creative work with multiple valid
approaches (HIGH)? Match the procedure's specificity to this level.
2. **Draft the vocabulary payload.** List 15–30 domain terms. Apply the
15-year practitioner test: would a senior expert with 15+ years in
this domain use this exact term with a peer? Strip general terms the
model already knows. THIS GOES FIRST in the prompt body.
3. **Write identity.** Under 50 tokens. Real job title. No flattery, no
superlatives, no elaborate backstory. Use structured format (YAML).
4. **Write constraints as ALWAYS/NEVER pairs.** Pair each positive
instruction with a negative constraint. Every imperative gets a
BECAUSE clause. Place constraints near the top of the prompt.
5. **Name the anti-patterns.** For each likely mistake, create an entry
with: a specific name, how to detect it, BECAUSE (consequence chain),
and how to resolve it. Place after constraints.
6. **Write the procedure.** 5–10 imperative steps. Use numbered format
(survives attention degradation). Include IF/THEN branches for
condition-dependent paths. Place in the middle.
7. **Write the output format.** Define exactly what the agent should
produce. Use a template if possible. List evaluation dimensions if
output quality varies. Place near the examples section.
8. **Add retrieval anchors.** 5–10 natural-language questions at the
very end. These benefit from recency bias and end-of-context
attention. Use questions the agent would ask about the domain.
### When evaluating an existing prompt
1. **Run the checklist.** Start every evaluation session by copy-pasting
the checklist below and checking every item.
2. **Score each dimension.** Use the evaluation criteria section to
assign a 0.0–1.0 score for each dimension.
3. **Identify anti-patterns.** For any dimension scoring below 0.7,
identify the specific anti-pattern(s) at play.
4. **Provide a rewrite suggestion.** Name the anti-pattern, explain
why it matters, and show the specific change.
## Output Format
When authoring or evaluating a prompt, produce a structured report with
three sections:
### 1. Prompt Header
```yaml
name: <prompt-name>
role: <role-id>
constraint_level: low|medium|high
stage: <stage-name>
| Section | Score | Issues |
|---|---|---|
| Vocabulary | 0.0–1.0 | ... |
| Identity | 0.0–1.0 | ... |
| Constraints | 0.0–1.0 | ... |
| Anti-Patterns | 0.0–1.0 | ... |
| Structure | 0.0–1.0 | ... |
| Examples | 0.0–1.0 | ... |
| Output Format | 0.0–1.0 | ... |
| Retrieval Anchors | 0.0–1.0 | ... |
For each dimension scoring below 0.7, provide:
When evaluating a prompt or skill authored with this procedure, score
When evaluating a prompt or skill authored with this procedure, score each dimension on a 0.0–1.0 scale:
A score below 0.7 on any dimension requires a specific rewrite suggestion naming the relevant anti-pattern.
For deeper background on specific topics:
references/attention-curve.md for
the full Liu et al. (2024) and Wu et al. (2025) findings, with diagrams
showing the accuracy drop across context positions.references/vocabulary-routing.md
for the Ranjan et al. (2024) methodology, the 15-year practitioner test
with examples, and guidance on selecting domain terms for any field.references/full-examples.md for
complete before/after prompt transformations with detailed annotations
explaining each change in terms of the underlying research.