Claude Code Prompt Optimizer
Description
AI-powered prompt optimization hook for Claude Code. Transforms simple prompts into comprehensive, structured instructions using Claude Opus 4.6's advanced reasoning capabilities.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Claude Code Prompt Optimizer

[](https://opensource.org/licenses/MIT) [](https://nodejs.org) [](https://www.anthropic.com)
A Claude Code hook that transforms simple prompts into detailed, structured instructions. Add `` to any prompt and it'll expand your request into something Claude can really sink its teeth into.
What It Does
When you tag a prompt with ``, this hook intercepts it and runs it through Claude's extended thinking mode. The result is a fleshed-out version of your original request with:
- Specific implementation steps
- Error handling considerations
- Testing requirements
- Edge cases to watch for
Basically, it does the prompt engineering for you.
Requirements
- Claude Code CLI installed
- Node.js 18+
- One of the following:
CLAUDE_CODE_OAUTH_TOKEN(Claude Pro/MAX subscribers)ANTHROPIC_API_KEY(API credit users)- Stored OAuth from
claude login
Quick Install
git clone https://github.com/johnpsasser/claude-code-prompt-optimizer.git
cd claude-code-prompt-optimizer
npm run install-hook
The installer handles dependencies, auth setup, hook configuration, and verification.
Authentication
The Agent SDK checks for credentials in this order:
| Priority | Method | Variable | Best For |
|---|---|---|---|
| 1 | OAuth token | CLAUDE_CODE_OAUTH_TOKEN |
Claude Pro/MAX subscribers |
| 2 | API key | ANTHROPIC_API_KEY |
API credit users |
| 3 | Stored OAuth | (none — uses claude login) |
Already logged in |
If `CLAUDE_CODE_OAUTH_TOKEN` is set, the API key is ignored. If neither env var is set, the Agent SDK falls back to stored OAuth credentials from `claude login`.
Setting Up OAuth To
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI