Use when improving general prompts for structure, examples, and constraints.
View on GitHubFebruary 5, 2026
Select agents to install to:
npx add-skill https://github.com/avifenesh/awesome-slash/blob/main/plugins/enhance/skills/enhance-prompts/SKILL.md -a claude-code --skill enhance-promptsInstallation paths:
.claude/skills/enhance-prompts/# enhance-prompts
Analyze prompts for clarity, structure, examples, and output reliability.
## Differentiation from enhance-agent-prompts
| Skill | Focus | Use When |
|-------|-------|----------|
| `enhance-prompts` | Prompt quality (clarity, structure, examples) | General prompts, system prompts, templates |
| `enhance-agent-prompts` | Agent config (frontmatter, tools, model) | Agent files with YAML frontmatter |
## Workflow
1. **Run Analyzer** - Execute the JavaScript analyzer to get findings:
```bash
node -e "const a = require('./lib/enhance/prompt-analyzer.js'); console.log(JSON.stringify(a.analyzeAllPrompts('.'), null, 2));"
```
For a specific path: `a.analyzeAllPrompts('./plugins/enhance')`
For a single file: `a.analyzePrompt('./path/to/file.md')`
2. **Parse Results** - The analyzer returns JSON with `summary` and `findings`
3. **Filter** - Apply certainty filtering based on --verbose flag
4. **Report** - Format findings as markdown output
5. **Fix** - If --fix flag, apply auto-fixes from findings
The JavaScript analyzer (`lib/enhance/prompt-analyzer.js`) implements all detection patterns including AST-based code validation. The patterns below are reference documentation.
---
## Prompt Engineering Knowledge Reference
### System Prompt Structure
Effective system prompts include: Role/Identity, Capabilities & Constraints, Instruction Priority, Output Format, Behavioral Directives, Examples, Error Handling.
**Minimal Template:**
```xml
<system>
You are [ROLE]. [PURPOSE].
Key constraints: [CONSTRAINTS]
Output format: [FORMAT]
When uncertain: [HANDLING]
</system>
```
### XML Tags (Claude-Specific)
Claude is fine-tuned for XML tags. Use: `<role>`, `<constraints>`, `<output_format>`, `<examples>`, `<instructions>`, `<context>`
```xml
<constraints>
- Maximum response length: 500 words
- Use only Python 3.10+ syntax
</constraints>
```
### Few-Shot Examples
- 2-5 examples is optimal (research-backed)
- Include edge cases and ensure format