prompt-optimization-claude-45
Optimize CLAUDE.md files and Skills for Claude Code CLI. Use when reviewing, creating, or improving system prompts, CLAUDE.md configurations, or Skill files. Transforms negative instructions into positive patterns following Anthropic's official best practices.
npx skills add majiayu000/claude-skill-registry --skill prompt-optimization-claude-45 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Claude Code Prompt Optimization Optimize CLAUDE.md files and Agent Skills for Claude Code CLI using Anthropic's official prompt engineering best practices. ## Core Principles ### 1. Positive Framing Over Prohibitions Models attend to key nouns/concepts. "NEVER use cat" still activates "use cat". Negation requires an extra logical step that can get lost during generation. | Instead of | Write | | ----------------- | -------------------------------- | | "Never use X" | "Use Y instead [because reason]" | | "Don't include X" | "Include only Y" | | "Avoid X" | "Prefer Y" | | "X is forbidden" | "Use Y for this operation" | | "Don't explain" | "Output only the result" | ### 2. Be Specific Over Vague From Anthropic's memory best practices: "Use 2-space indentation" is better than "Format code properly". | Vague | Specific | | ---------------------------- | ---------------------------------------------------------------- | | "Format code properly" | "Use 2-space indentation for all code" | | "Write good commit messages" | "Use conventional commits: `type(scope): description`" | | "Handle errors correctly" | "Catch exceptions only when you have a specific recovery action" | | "Be concise"
- Core Principles
- 1. Positive Framing Over Prohibitions
- 2. Be Specific Over Vague
- 3. Provide Context and Motivation
- 4. Structure with Markdown Headings
- 5. Front-Load Priorities
- 6. Use Examples for Complex Behaviors
- CLAUDE.md Optimization Process
- Step 1: Identify Negative Patterns
- Step 2: Extract the Desired Behavior
- Step 3: Add Motivation
- Step 4: Provide Concrete Examples
- Step 5: Structure with Headings
- Claude 4.5 Specific Optimizations
What does the prompt-optimization-claude-45 skill do?
Optimize CLAUDE.md files and Skills for Claude Code CLI. Use when reviewing, creating, or improving system prompts, CLAUDE.md configurations, or Skill files. Transforms negative instructions into positive patterns following Anthropic's official best practices.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill prompt-optimization-claude-45 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
