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…
Об этом скилле
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" | "Lead with observations, state facts, omit preamble" |
3. Provide Context and Motivation
Claude generalizes better when it understands WHY. Each instruction benefits from a brief reason.
## Python Environment
Use `uv run` for all Python execution.
**Reason**: Manages virtual environments and dependencies automatically.
4. Structure with Markdown Headings
Group related instructions under descriptive headings. Format each memory as a bullet point.
## File Operations
- Read files with `Read()` tool (handles encoding, large files)
- Search patterns with `Grep()` tool (returns structured matches)
- Find files with `Glob()` tool (respects gitignore)
## Communication Style
- Lead with findings and observations
- State facts directly without hedging
- Acknowledge dependencies when uncertain about duration
5. Front-Load Priorities
Key instructions placed early receive more attention. Put critical behaviors at the top of CLAUDE.md.
6. Use Examples for Complex Behaviors
3-5 diverse, relevant examples dramatically improve accuracy and consistency. Wrap in <example> tags.
## Commit Message Format
<examples>
<example>
feat(auth): add OAuth2 support for GitHub login
</example>
<example>
fix(api): handle null response in user endpoint
</example>
<example>
docs(readme): update installation instructions
</example>
</examples>
CLAUDE.md Optimization Process
Step 1: Identify Negative Patterns
Scan for prohibition markers:
- "NEVER", "DON'T", "FORBIDDEN", "PROHIBITED"
- "❌", "⛔", "🚫" emoji markers
- "Avoid", "Do not", "Must not"
Step 2: Extract the Desired Behavior
For each prohibition, ask: "What SHOULD Claude do instead?"
| Prohibition | Desired Behavior |
|---|---|
| "Never use bare python commands" | "Run Python with uv run script.py" |
| "Don't use cat, head, tail" | "Use Read() tool for file content" |
| "Never state timelines" | "Acknowledge dependencies when uncertain" |
| "Avoid performative gratitude" | "Lead with observations and findings" |
Prohibition markers are used only with very explicit absolute examples.
Step 3: Add Motivation
For each instruction, provide a brief reason:
## Tool Selection
| Operation | Tool | Reason |
|-----------|------|--------|
| Read files | `Read()` | Handles encoding, large files, binary detection |
| Search patterns | `Grep()` | Returns structured matches with context |
| Write files | `Write()` | Atomic writes, preserves permissions |
| Run Python | `Bash(uv run ...)` | Manages venv and dependencies correctly |
Step 4: Provide Concrete Examples
Replace abstract descriptions with multishot examples:
## Error Handling Pattern
Catch exceptions only when you have a specific recovery action:
<example>
def get_user(id):
return db.query(User, id) # Errors surface naturally
def get_user_with_fallback(id):
try:
return db.query(User, id)
except ConnectionError:
logger.warning("DB unavailable, using cache")
return cache.get(f"user:{id}") # Specific recovery
</example>
Step 5: Structure with Headings
Organize instructions into logical groups:
## Tool Usage
## Communication Style
## Code Standards
## Verification Process
## Project-Specific Context
Claude 4.5 Specific Optimizations
Direct Action Langu
Установить prompt-optimization-claude-45 в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл 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.
Как установить скилл prompt-optimization-claude-45?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл prompt-optimization-claude-45 запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic