-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Summary
Add a prompt-engineering skill to .ai-rules/skills/prompt-engineering/SKILL.md that provides structured patterns for writing effective prompts for AI tools — covering system prompt design for codingbuddy agents, MCP tool description optimization, tool-specific formatting (Claude Code, Cursor, Copilot), and prompt testing methodology.
Background
A prompt is an API contract with an AI system. Poorly written prompts — in CLAUDE.md, agent system prompts, or MCP tool descriptions — produce inconsistent behavior across tools and users. This skill is especially relevant to codingbuddy because the project ships prompts as its core product (agent system prompts, MCP tool descriptions, coding rules).
Skill File Location
packages/rules/.ai-rules/skills/prompt-engineering/SKILL.md
⚠️ The SKILL.md file has already been created. This issue tracks integration, validation, and any necessary follow-up work.
What the Skill Covers
Prompt Anatomy (6 Components)
ROLE / CONTEXT / TASK / CONSTRAINTS / FORMAT / EXAMPLES
Five Prompt Patterns
- Role + Task (Basic): "You are a [role]. Your task: [action] for [context]."
- Chain-of-Thought: Force step-by-step reasoning before conclusion
- Few-Shot: Show 2–3 examples of input → output before the actual input
- Constraint-First: Lead with NEVER/ALWAYS before the task
- Meta-Prompting: Ask AI to generate or improve prompts
System Prompt Design for codingbuddy Agents
Structured template: Role definition → Expertise bullets → Approach steps → What you do NOT handle → Output Format
MCP Tool Description Design
Bad vs Good description examples, parameter description guidelines ("Search term such as 'TDD', 'security'..." vs "Query string")
Prompt Testing
Test Matrix: Happy path / Edge cases / Adversarial / Ambiguous inputs
Evaluation Rubric (20 points):
- Accuracy (1–5)
- Consistency (1–5)
- Format compliance (1–5)
- Boundary respect (1–5)
- Efficiency (1–5)
Target: ≥ 16 for production use
Tool-Specific Optimization
- Claude Code (CLAUDE.md): ## headers, bold critical rules, code blocks, trigger conditions, file references
- Cursor (.cursorrules): One rule per line, concrete examples, no multi-paragraph rules
- GitHub Copilot (.github/copilot-instructions.md): Task-oriented, examples over descriptions, < 8000 chars
Reliability Ranking
- Explicit format + examples (highest)
- Explicit format, no examples
- Implicit format with examples
- Implicit format, no examples (lowest)
Acceptance Criteria
-
packages/rules/.ai-rules/skills/prompt-engineering/SKILL.mdexists with valid YAML frontmatter - Skill is accessible via
get_skill("prompt-engineering")MCP tool - Skill appears in
list_skillsMCP tool response - Iron Law (TEST WITH AT LEAST 3 INPUTS BEFORE PRODUCTION USE) is defined
- All 6 prompt anatomy components are defined
- All 5 prompt patterns are documented with examples
- codingbuddy agent system prompt template is complete
- MCP tool description bad/good examples are provided
- Prompt testing matrix (4 dimensions) is included
- Evaluation rubric (5 criteria, 20 points, threshold ≥ 16) is defined
- Tool-specific sections for Claude Code, Cursor, and Copilot are included
- Prompt length guidelines table is included
- README.md in skills directory lists this skill
Related Skills
agent-design– Agent system prompts use prompt engineering patternsrule-authoring– Rules are prompts that AI tools followmcp-builder– MCP tool descriptions are prompts for AI tool selection
Notes
This skill is directly applicable to improving codingbuddy's own agent system prompts and MCP tool descriptions. Any contributor improving existing agents or tools should use this skill as reference.