PROACTIVELY load this skill when creating prompts for AI agents, structuring constraints, or designing prompt workflows. Secondary: implementing chain-of-thought, using example-based learning, or building meta-prompts.
Applies prompt engineering standards using XML/Markdown hybrid structure and meta-prompting patterns. Use when creating structured prompts with role definitions, constraints, examples, and task separation for AI agents or complex workflows.
/plugin marketplace add Git-Fg/thecattoolkit/plugin install git-fg-thecattoolkit@Git-Fg/thecattoolkitThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/few-shot-examples.jsonassets/prompt-template-library.mdreferences/core-techniques.mdreferences/patterns-and-templates.mdreferences/xml-markdown-decision-framework.mdThe key principle is to reduce XML usage in general prompts - use text-based heuristics and markdown structure, reserving XML only for highly structured workflows and configurations.
Every token competes with conversation history. Challenge each piece:
Default assumption: Claude is already smart. Only add what it doesn't have.
Match specificity to task fragility:
| Freedom Level | When to Use | Pattern |
|---|---|---|
| High | Multiple valid approaches, context-dependent | Text-based heuristics |
| Medium | Preferred pattern exists, some variation OK | Pseudocode with parameters |
| Low | Error-prone operations, consistency critical | Exact scripts with no parameters |
Example: Database migration = low freedom (one safe path). Code review = high freedom (context determines approach).
Use the Hybrid Semantic Structure: XML for logic containers, Markdown for content.
📖 For complete pattern selection guidance, see references/xml-markdown-decision-framework.md which provides:
See also: references/patterns-and-templates.md for the complete Container Principle guide.
When to use XML:
<context> - Large data dumps<workflow> - Non-negotiable step sequences<constraints> - Negative constraints (NEVER/MUST NOT)<output_format> - Machine-parseable responsesWhen to use Markdown:
Critical: Limit to 3-5 XML tags maximum. Never nest XML tags (avoids "XML soup").
Structure meta-prompts (prompts that generate prompts) using XML semantic containers to separate concerns.
<system_role>
Define the AI's identity and core purpose
</system_role>
<task_context>
Provide background, constraints, and domain knowledge
</task_context>
<examples>
<example>
Input: [demonstration input]
Output: [demonstration output]
</example>
</examples>
<user_input>
The actual task to perform
</user_input>
<system_role>Defines WHO the AI is for this task:
<task_context>Provides WHAT the AI needs to know:
<examples>Demonstrates HOW to perform the task:
<example> tags inside (see few-shot learning guide)<user_input>Contains the actual task:
<system_role>
You are a senior code reviewer specializing in security vulnerabilities.
You identify security issues and provide actionable remediation steps.
</system_role>
<task_context>
Review code for OWASP Top 10 vulnerabilities. Focus on:
- SQL injection
- XSS vulnerabilities
- Authentication flaws
- Insecure direct object references
For each issue found:
1. Severity (Critical/High/Medium/Low)
2. Location (file:line)
3. Vulnerability type
4. Remediation steps
</task_context>
<examples>
<example>
Input: "function getUser(id) { return db.query('SELECT * FROM users WHERE id = ' + id) }"
Output: "CRITICAL: SQL injection vulnerability
Location: auth.js:42
Fix: Use parameterized queries with prepared statements"
</example>
</examples>
<user_input>
Review this code for security issues:
function login(username, password) {
if (password === storedPassword) {
return true;
}
return false;
}
</user_input>
For quick reference, common prompt patterns include:
references/core-techniques.md - Core prompting techniques (chain-of-thought, example-based learning)references/patterns-and-templates.md - Prompt patterns, templates, and optimizationreferences/xml-markdown-decision-framework.md - Complete guide to XML/Markdown patterns (Pure Markdown, Hybrid XML/Markdown, Full XML deprecation)assets/prompt-template-library.md - Ready-to-use prompt templates for common tasks (classification, extraction, generation, transformation, Q&A)assets/few-shot-examples.json - Example datasets for few-shot learning (sentiment analysis, entity extraction, code generation, text classification, data transformation, Q&A, summarization, SQL generation)Evaluate prompts on:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.