Skip to content

feat(skill): Add prompt-engineering skill for writing AI-readable instructions and agent system prompts #605

@JeremyDev87

Description

@JeremyDev87

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

  1. Role + Task (Basic): "You are a [role]. Your task: [action] for [context]."
  2. Chain-of-Thought: Force step-by-step reasoning before conclusion
  3. Few-Shot: Show 2–3 examples of input → output before the actual input
  4. Constraint-First: Lead with NEVER/ALWAYS before the task
  5. 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

  1. Explicit format + examples (highest)
  2. Explicit format, no examples
  3. Implicit format with examples
  4. Implicit format, no examples (lowest)

Acceptance Criteria

  • packages/rules/.ai-rules/skills/prompt-engineering/SKILL.md exists with valid YAML frontmatter
  • Skill is accessible via get_skill("prompt-engineering") MCP tool
  • Skill appears in list_skills MCP 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 patterns
  • rule-authoring – Rules are prompts that AI tools follow
  • mcp-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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    configRoot config and rulesdocumentationImprovements or additions to documentationfeatpriority:couldCould Have - 있으면 좋은 기능skillNew skill addition to .ai-rules/skills/

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions