claude-prompt-forgelisted
Install: claude install-skill beenak4035/claude-prompt-forge
# Claude Prompt Forge
Generate production-grade prompts by applying design rules extracted from Claude Code's internal prompt architecture.
## When to Use
- Writing system prompts for agents or tools
- Designing compression/summarization prompts
- Creating tool descriptions with usage instructions
- Writing agent delegation instructions
- Any scenario where you need a structured, high-quality prompt
## Design Rules (extracted from Claude Code source)
The following rules are distilled from analyzing 40+ prompt files in Claude Code's codebase (`services/compact/prompt.ts`, `constants/prompts.ts`, `tools/*/prompt.ts`, `services/extractMemories/prompts.ts`, etc.).
### Rule 1: Layered Structure — Static Shell + Dynamic Injection
Never hardcode dynamic content in prompts. Separate into:
- **Static layer**: cacheable, shared across sessions (role definition, rules, format)
- **Dynamic layer**: injected at runtime (user config, environment state, tool names)
Pattern from Claude Code:
```
const BASE_PROMPT = `Your task is to...` // static, cacheable
export function getPrompt(customInstructions?: string): string {
let prompt = BASE_PROMPT
if (customInstructions) {
prompt += `\n\nAdditional Instructions:\n${customInstructions}`
}
return prompt
}
```
**Apply this rule**: When building prompts, clearly mark which parts are fixed vs. which accept runtime parameters. Use `${variable}` placeholders for dynamic content.
### Rule 2: Behavioral Guardrails — Bookend Patte