Back to skills
SKILL.md
Collection
ASecurityPrompt engineering framework for Claude Code. Transforms vague requests into precise TCRO-structured prompts. Use when: crafting prompts for code generation, improving prompts not getting results, structuring multi-step workflows, debugging pattern drift. Triggers: optimize prompt, improve prompt, create prompt, prompt engineering, TCRO, prompt template, better prompt.
- 24 stars
- 0 votes
- 0 copies
- 2 views
- Added September 8, 2026
Works with
Security analysis
100/100Pro scans all 21 files and shows the line behind each finding
npx -y skills add mattnigh/skills_collection --skill collection --agent claude-codeAre you the author of Collection?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/mattnigh-collection-01d2cad4)---
name: prompt-optimizer
description: Prompt engineering framework for Claude Code. Transforms vague requests into precise TCRO-structured prompts. Use when: crafting prompts for code generation, improving prompts not getting results, structuring multi-step workflows, debugging pattern drift. Triggers: optimize prompt, improve prompt, create prompt, prompt engineering, TCRO, prompt template, better prompt.
---
# Prompt Optimizer
Transform vague requests into precise, actionable prompts using TCRO structure.
**Templates:** See @.claude/skills/prompt-optimizer/references/templates.md when applying structure or selecting template by task type.
## Process
**IDENTIFY → STRUCTURE → ENHANCE → VALIDATE**
## Step 1: Identify Mode
Determine single mode (mixing reduces quality 15-30%):
| Mode | Intent | Indicators |
|------|--------|------------|
| Build | Create new | "implement", "create", "add" |
| Debug | Fix problem | "fix", "error", "broken" |
| Refactor | Improve existing | "improve", "optimize", "clean" |
| Learn | Understand | "explain", "how does", "why" |
**Rule:** One prompt = One mode. Split if mixed.
## Step 2: Apply TCRO Structure
Transform any prompt into:
```
Task: [Imperative verb + specific objective]
Context: [System, dependencies, why needed]
Requirements:
1. [Functional requirement]
2. [Technical constraint]
3. [Quality standard]
4. [Edge cases]
Output: [Exact format expected]
```
Select specific template from @.claude/skills/prompt-optimizer/references/templates.md based on task type.
## Step 3: Enhance
### Add Negative Constraints
```
DO NOT use deprecated APIs
AVOID complexity > O(n²)
NEVER expose secrets in logs
```
### Add Phase Separation
Use for tasks >500 lines or requiring architecture decisions:
```
Phase 1: Analyze current implementation
Phase 2: Create detailed plan
Phase 3: Implement according to plan
Phase 4: Verify and test
```
### Specify Metrics
Replace vague terms with concrete values:
- "fast" → "<100ms for 1000 records"
- "scalable" → "handle 10K concurrent users"
- "secure" → "OWASP Top 10 compliant"
## Step 4: Validate
Check before delivering:
- [ ] Single mode (not mixed objectives)
- [ ] Imperative verb starts Task
- [ ] Measurable requirements (no "good", "nice")
- [ ] Tech stack specified
- [ ] Output format explicit
- [ ] Constraints stated
## Decision Rules
### Template Selection
| Task Type | Template |
|-----------|----------|
| New feature | Feature Development |
| API work | API Endpoint |
| UI work | React Component |
| Bug | Debugging |
| Slow code | Performance |
| Tests | Testing |
| Cleanup | Refactoring |
| Large scope (>500 LOC) | Multi-Phase |
### Complexity Escalation
- Simple task → Basic TCRO
- Multiple concerns → Add constraints
- Large scope → Multi-phase template
- Architecture decision → Phase 1 = Analysis only
## Example
### Before
"Create a login form that works well"
### After
```
Task: Implement React login form with email/password authentication.
Context: Next.js 14 App Router, part of auth flow.
Requirements:
1. Email validation (RFC 5322)
2. Password min 8 chars with complexity
3. Inline validation errors
4. Loading/error/success states
5. Tailwind CSS, responsive
Output: TypeScript component with ARIA labels
```
## Usage
When optimizing a prompt:
1. Identify mode and complexity
2. Select template from references
3. Apply TCRO structure
4. Add constraints and context
5. Validate against checklist
6. Explain key improvementsFiles in this skill
- 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md
- 17hz__nextjs-template__claude__skills__example-skill__SKILL.md
- 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md
- 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md
- 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md
- 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md
- 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md
- 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md
- 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md
- 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md
- 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md
- 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md
- 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md
- 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md
- 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md
- 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md
- 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md
- 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md
- 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md
- 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md
Attribution
Comments
Loading comments…