Claude Code hook
Claude Code Prompt Optimizer
AI-powered prompt optimization hook for Claude Code. Transforms simple prompts into comprehensive, structured instructions using Claude Opus 4.6's advanced reasoning capabilities.
Install
/plugin marketplace add 0-to-1-Labs/claude-marketplaceFound in the project README. Check it for setup steps after installing.
git clone https://github.com/0-to-1-Labs/claude-code-prompt-optimizer.gitFrom the README
Claude Code Prompt Optimizer 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 sends it to the same model your session is running, with a rewrite-only system prompt and no tools. 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 and logged in (claude login) - Node.js 18+ API-credit users can use ANTHROPIC_API_KEY instead; see Authentication. Quick Install Plugin marketplace (recommended) In Claude Code: Then restart Claude Code. The plugin registers the hook for you and installs its dependencies the first time you use (about 200 MB, kept across plugin updates). If you are logged into Claude Code, auth already works. Keep the plugin updated Claude Code can update this plugin automatically. Auto-update is off by default for third-party marketplaces, so turn it on once: 1. Run /plugin. 2. Open the Marketplaces tab and select 0-to-1-labs. 3. Choose Enable auto-update. Claude Code then checks for new versions after each session start and installs them. Restart Claude Code to load an update. To update by hand: Alternative: standalone install (no marketplace) The installer installs dependencies, links the repo into ~/.claude/hooks, registers the hook in ~/.claude/settings.json with the right timeout, and verifies the fast path. Use one method, not both. The installer refuses to run when the plugin is already installed, and the…
How hooks work
- Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
- They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
- A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Details
- Repository
- 0-to-1-Labs/claude-code-prompt-optimizer
- Type
- Hooks
- Language
- TypeScript
- License
- MIT
- Last updated
- 30 September 2026
- Topics
- aianthropicclaudeclaude-codedeveloper-toolshooksopusprompt-optimizationtypescript
FAQ
What is Claude Code Prompt Optimizer?
AI-powered prompt optimization hook for Claude Code. Transforms simple prompts into comprehensive, structured instructions using Claude Opus 4.6's advanced reasoning capabilities. It is a hook for Claude Code, from 0-to-1-Labs/claude-code-prompt-optimizer on GitHub.
How do I install Claude Code Prompt Optimizer?
Run /plugin marketplace add 0-to-1-Labs/claude-marketplace inside Claude Code, then follow the setup in the README.
Is Claude Code Prompt Optimizer popular?
0-to-1-Labs/claude-code-prompt-optimizer has 49 GitHub stars and 4 forks. It was last updated on 30 September 2026.
More hooks
Claude Agent Builder
46keysersoose/claude-agent-builder
Build production-ready AI agents in Claude Code from natural language. Analyzes your problem, researches best practices, and generates subagents, skills, hooks, commands & MCP configs.
claude-code-toast
18eyalzh/claude-code-toast
macOS Notification hook that shows a toast when Claude Code is waiting for you.
Claude Ignore
47li-zhixin/claude-ignore
A Claude Code PreToolUse hook that prevents Claude from reading files that match patterns in .claudeignore files, similar to how .gitignore works.
CC Best
49xiaobei930/cc-best
cc-best: Turn Claude Code into a full dev team — PM→Lead→Dev→QA autonomous workflow. 44 commands · 19 skills · 8 agents · 43 rules · 30 hooks · auto-learning pipeline. | 一个插件,完整开发团队。
Jev Axi
46shiftynick/jev-axi
Agent-ergonomic CLI for TypeSafe's Jev: fast calibrated judgments (pick, rate, check, rank, triage, guard) from the shell
UnseveredMemory
49blas0/UnseveredMemory
Simple, organic, lightweight yet purposeful memory system for Claude Code.
Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.