スキル一覧に戻る
Danik911

prompt-writing

by Danik911

0🍴 0📅 2025年12月19日
GitHubで見るManusで実行

SKILL.md


name: prompt-writing description: Creates effective prompts for AI coding agents and subagent delegation. Use PROACTIVELY when writing prompts for Task tool delegation, creating agent instructions, or designing multi-step workflows. MUST BE USED when delegating complex tasks to subagents or writing system prompts. allowed-tools: ["Read", "Write", "Edit", "Grep", "Glob"]

Prompt Writing Skill

Overview

Core Principle: Context completeness over brevity. Agents cannot infer what you don't provide.

Target Users:

  • Claude Code delegating to subagents via Task tool
  • UI agents that need to generate prompts
  • Engineers writing system prompts or agent instructions

The CLEAR Framework

Use this mnemonic for every prompt you write:

LetterComponentPurposeKey Question
CContextBackground informationWhat does the agent need to know?
LLimitationsConstraints, prohibitionsWhat should NOT be done?
EExpectationsOutput format, success criteriaWhat exactly should be returned?
AActionsStep-by-step instructionsWhat steps to follow?
RResourcesFiles, tools, referencesWhat materials are available?

C - Context

Complete background: project state, environment, history. Include file paths, versions, prior decisions.

L - Limitations

Explicit boundaries: DO NOT modify X, use only Y, forbidden patterns, compliance requirements.

E - Expectations

Exact output format: markdown structure, JSON schema, where to save, success criteria checklist.

A - Actions

Numbered steps, validation checkpoints, decision points, error handling guidance.

R - Resources

Required reading (file paths), available tools, reference implementations, examples.

Full guide with examples: reference/prompt-anatomy.md


Context Patterns

Critical Insight

Subagents have NO conversation history. Each invocation is completely fresh. They cannot infer context.

Three Strategies

StrategyWhen to UseHow
File-BasedMulti-step workflowsSave to file, pass path to next agent
EmbeddedSmall contextsInclude all info directly in prompt
LayeredLarge contextsSummary + references for deep-dive

State Transfer Pattern

Agent 1 → Save results to `.claude/state/results/agent-{timestamp}.md`
Agent 2 → Read from that file path

Full patterns: reference/context-patterns.md


Output Format Quick Reference

PatternUse CaseKey Feature
Structured MarkdownComprehensive resultsTables, sections, test output
Binary VerdictReview/validationPASS/FAIL first, then details
ChecklistMulti-requirementProgress tracking with status
CondensedSubagent responsesMax 3 findings, no verbose output

Delivery Patterns

  • State directory: .claude/state/results/[agent]-[timestamp].md
  • Project output: output/[task-id]/[artifact].md
  • Inline: Return directly (use for summaries only)

Full templates: reference/output-specifications.md


Quality Checklist

Before sending any prompt, verify:

Context (C)

  • All background information included?
  • File paths explicit and complete?
  • No assumptions about prior knowledge?

Limitations (L)

  • Constraints clearly stated?
  • Prohibited actions explicit?
  • Scope boundaries defined?

Expectations (E)

  • Output format specified exactly?
  • Success criteria measurable?
  • Delivery location defined?

Actions (A)

  • Steps numbered and sequential?
  • Validation checkpoints included?
  • Error handling guidance provided?

Resources (R)

  • Required files listed with paths?
  • Available tools mentioned?
  • Examples provided where helpful?

Subagent-Specific

  • No implicit context assumptions?
  • State transfer mechanism defined?
  • Output format prevents overload?

Anti-Patterns Quick Reference

Anti-PatternProblemSolution
Context AmnesiaAssumes agent remembersEmbed all context explicitly
Vague Expectations"Give me a good result"Specify exact format
Implicit Constraints"Follow best practices"List specific requirements
Unbounded Scope"Improve the code"Define precise boundaries
Missing Resources"Check the docs"Provide file paths
Output OverloadNo format limitsRequest condensed response

Full examples with solutions: reference/anti-patterns.md


Templates

Ready-to-use templates for common scenarios:

TemplatePurpose
templates/subagent-delegation.mdTask tool delegation
templates/code-task.mdImplementation tasks
templates/research-task.mdResearch/exploration
templates/review-task.mdCode review/validation

Quick Start

  1. Choose template from templates/ matching your task type
  2. Fill CLEAR sections systematically
  3. Run checklist to verify completeness
  4. Execute the prompt
  5. Iterate if results don't match expectations

Remember: More context is almost always better. When in doubt, include it.


Troubleshooting

ProblemLikely CauseSolution
Irrelevant resultsInsufficient contextAdd explicit file references, examples
Wrong formatVague specificationProvide template with placeholders
Unwanted changesMissing constraintsAdd explicit DO NOT statements
Incomplete taskUnclear success criteriaAdd specific acceptance criteria
Agent asks questionsAmbiguous requirementsMake all decisions upfront

Reference Documentation

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です