Check skills/commands for negative framing and suggest positive alternatives
Analyzes skills and commands for negative framing and suggests positive alternatives.
/plugin marketplace add laurigates/claude-plugins/plugin install agent-patterns-plugin@lgates-claude-pluginsCheck Claude skills, commands, and subagent prompts for negative examples and convert them to positive framing.
Background: Anthropic's prompt engineering best practice recommends positive framing instead of negative instructions to avoid the "pink elephant problem" - telling Claude "don't do X" can actually increase the likelihood of X happening because it primes that concept.
What to detect:
Steps:
Scan for negative patterns:
# Search in skills
grep -rn -E "(don't|do not|doesn't|do NOT|never|NEVER|avoid|Avoid|AVOID|must not|shouldn't|should not|can't|cannot)" \
~/.claude/skills/ \
--include="*.md" \
-A 1 -B 1
# Search in commands
grep -rn -E "(don't|do not|doesn't|do NOT|never|NEVER|avoid|Avoid|AVOID|must not|shouldn't|should not|can't|cannot)" \
~/.claude/commands/ \
--include="*.md" \
-A 1 -B 1
Analyze findings:
Generate positive alternatives: For each negative instruction found, suggest positive reframing:
Common transformations:
Examples from real scenarios:
Present findings report:
🔍 Negative Framing Analysis
=============================
Scanned locations:
- ~/.claude/skills/ (XX files)
- ~/.claude/commands/ (XX files)
Total negative patterns found: XX
📊 Breakdown by pattern:
- "don't"/"do not": XX occurrences
- "never": XX occurrences
- "avoid": XX occurrences
- Other: XX occurrences
📁 Files with most negative framing:
1. path/to/file.md (XX instances)
2. path/to/file2.md (XX instances)
🔧 Suggested rewrites:
File: ~/.claude/skills/example/SKILL.md:42
❌ Current: "Don't use X when processing data"
✅ Suggested: "Use Y for data processing tasks"
[Continue for each finding...]
Ask user for action: Use AskUserQuestion to ask:
Found XX instances of negative framing across XX files.
What would you like to do?
1. Show all findings with suggested fixes
2. Auto-fix straightforward cases (review before commit)
3. Show summary only
4. Export report to file
Apply fixes (if requested):
For auto-fix option:
For manual review:
Final report:
✅ Negative Framing Check Complete!
Summary:
- Scanned: XX files
- Found: XX instances
- Fixed: XX instances
- Remaining: XX instances (require manual review)
Next steps:
1. Review changes: git diff
2. Test affected skills/commands
3. Commit if satisfied: git commit -m "fix: convert negative framing to positive alternatives"
💡 Tip: Use positive framing to tell Claude what TO do, not what NOT to do.
This prevents the "pink elephant problem" where mentioning unwanted behavior
actually increases its likelihood.
Implementation notes:
Best practices for positive framing:
References: