prompt-craft
Craft effective worker prompts from backlog issues using Claude 4 best practices. Use when preparing issues for workers, writing prompts, or optimizing prompt quality. Trigger with "craft prompt", "write prompt", "prepare issue", "make ready".
What this skill does
# Prompt Craft - Claude 4 Best Practices Craft effective prompts for Claude workers using proven patterns. ## Core Principles ### 1. Be Explicit Claude 4.x follows instructions precisely. Use action verbs. | Less Effective | More Effective | |----------------|----------------| | "Can you suggest improvements?" | "Update the function to improve performance." | | "Look at this code" | "Find and fix the null check bug" | | "Help with testing" | "Write unit tests for the auth module" | ### 2. Add Context/Motivation Explain WHY, not just WHAT. Claude generalizes from explanations. | Less Effective | More Effective | |----------------|----------------| | "NEVER use ellipses" | "Never use ellipses since the TTS engine won't pronounce them correctly." | | "Always add error handling" | "Add error handling so users see helpful messages instead of stack traces." | ### 3. Natural Skill Triggers Use natural language, avoid aggressive markers. | Avoid | Use | |-------|-----| | "CRITICAL: You MUST use this tool when..." | "Use the X skill for Y." | | "ALWAYS: This is REQUIRED" | "Use this approach when..." | | "IMPORTANT!!!: Never forget to..." | "Remember to..." | ### 4. Positive Framing Tell Claude what TO do, not just what to avoid. | Less Effective | More Effective | |----------------|----------------| | "Don't write long functions" | "Keep functions under 20 lines" | | "Avoid complex logic" | "Use simple, readable patterns" | ## Prompt Structure ```markdown ## Context [1-2 sentences: Why this work matters, what problem it solves] ## Task [Clear, explicit action instruction using action verbs] ## Approach [Optional: Skill hints, patterns to follow, key considerations] Use the [skill] skill for [specific purpose]. ## Key Files [3-5 most relevant files to start with] - path/to/main/file.ts - path/to/related/file.ts ## When Done [How to complete: close issue, what to include in summary] Close issue: bd close ISSUE-ID --reason "summary" ``` ## Skill Matching Match skills based on content: | Content Signal | Suggested Skill | |----------------|-----------------| | `.tsx`, `.jsx`, React | frontend-development | | terminal, xterm, resize | xterm-js | | auth, login, session | better-auth | | database, SQL, query | databases | | API, REST, endpoint | backend-development | | CSS, styling, theme | ui-styling | | docs, markdown | docs-seeker | ## Subagent Hints Claude 4.5 naturally delegates. Add hints when beneficial: ```markdown Use subagents in parallel to scaffold Dashboard, Settings, and Profile pages. ``` ```markdown Use an Explore agent to find the relevant authentication files first. ``` ## Parallelization Hints For tasks with independent subtasks: ```markdown These components can be developed in parallel: - HeaderComponent - FooterComponent - SidebarComponent ``` ## Complexity Guidelines | Prompt Length | When to Use | |---------------|-------------| | Short (3-5 lines) | Simple bug fixes, single-file changes | | Medium (10-15 lines) | Feature work, multi-file changes | | Long (20+ lines) | Complex features, architectural changes | **Rule**: If you need more than 20 lines, the issue might need breaking down. ## Anti-Patterns Avoid these common mistakes: 1. **Overloading**: Too many skills, too many files, too much context 2. **Vague tasks**: "Make it better" without specific criteria 3. **All caps**: CRITICAL, IMPORTANT, MUST - creates anxiety, not clarity 4. **Negative framing**: Lists of don'ts without corresponding dos 5. **No completion criteria**: Worker doesn't know when they're done ## References - [Claude 4 Best Practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-4-best-practices) - [Prompt Engineering Guide](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering)
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.