Optimize your prompts for Claude 4.5 models
Claude 4.5 models do exactly what you ask — no more, no less. Prompts that worked with Claude 3.x may need adjustment. copt analyzes your prompts for anti-patterns and optimizes them using Claude 4.5 itself.
| Platform | Download |
|---|---|
| macOS (Apple Silicon) | copt-macos-arm64 |
| macOS (Intel) | copt-macos-x64 |
| Linux (x64) | copt-linux-x64 |
| Windows (x64) | copt-windows-x64.exe |
# macOS/Linux quick install
curl -L https://github.com/praveenc/copt/releases/latest/download/copt-macos-arm64 -o copt
chmod +x copt && sudo mv copt /usr/local/bin/⚠️ macOS Gatekeeper note
If macOS blocks the binary, either:
- Go to System Settings → Privacy & Security and click "Allow Anyway"
- Or run:
xattr -d com.apple.quarantine /usr/local/bin/copt
cargo install --git https://github.com/praveenc/copt# Bedrock API key (recommended — simplest setup)
export AWS_BEARER_TOKEN_BEDROCK="your-bedrock-api-key"
# Or Anthropic API
export ANTHROPIC_API_KEY="sk-ant-..."
# Or AWS credential chain (SigV4 fallback — no API key needed)
# Uses ~/.aws/credentials, AWS_PROFILE, IAM roles, SSO, etc.To generate a Bedrock API key: Bedrock console → API keys → Generate long-term key (up to 1 year).
copt --config-init # Creates ~/.config/copt/config.tomlEdit the config to set your preferred defaults (including API key):
[default]
provider = "bedrock"
model = "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
[bedrock]
region = "us-west-2"
api_key = "your-bedrock-api-key" # or use AWS_BEARER_TOKEN_BEDROCK env var
[output]
format = "pretty"
show_diff = falseCLI arguments always take precedence over config values.
copt "Create a dashboard" # Direct input
copt -f my-prompt.txt # From file
copt -f prompt.txt --offline # Analyze only (no API calls)
copt -f prompt.txt -i # Interactive TUI modecopt detects Claude 3.x patterns and rewrites them for Claude 4.5:
| Pattern | Problem | Fix |
|---|---|---|
Don't use X |
Negative framing | Reframe positively |
Can you help... |
Indirect command | Direct instruction |
NEVER do X |
Aggressive caps | Normal casing |
Create something |
Vague instruction | Add explicit requirements |
Example transformation:
- Don't use placeholder data. Can you help me create a dashboard?
+ Use real data from the API. Create an analytics dashboard with:
+ - User metrics visualization
+ - Date range filtering
+ - Export functionalitySee docs/RULES.md for the full list of 25 analysis rules across 8 categories.
View full --help output
⚡ Optimize prompts for Claude 4.5 models
Usage: copt [OPTIONS] [PROMPT]
Arguments:
[PROMPT] Prompt text to optimize
Options:
-f, --file <FILE> Read prompt from file
-o, --output <FILE> Save optimized prompt to file
--output-dir <DIR> Output directory for auto-save
--no-save Disable auto-save
-p, --provider <PROVIDER> Provider: anthropic, bedrock
-m, --model <MODEL> Model ID or alias
--region <REGION> AWS region for Bedrock
--format <FORMAT> Output format: pretty, json, quiet
--diff Show before/after diff
--show-prompt Display optimized prompt
-q, --quiet Quiet mode (prompt only)
--analyze Analyze only, no optimization
--offline Offline mode (no API calls)
--check <CAT> Check specific categories
--no-suggest Disable auto-suggestions for vague prompts
-i, --interactive Launch full-screen interactive TUI mode
-e, --editor Open editor for multi-line input
--skip-connectivity-check Skip connectivity check
--config-init Create default config file and exit
-v, --verbose Verbose output
-h, --help Print help
-V, --version Print version
Use short aliases instead of full Bedrock ARNs:
| Alias | Model |
|---|---|
sonnet / sonnet-4.5 |
us.anthropic.claude-sonnet-4-5-20250929-v1:0 |
opus / opus-4.5 |
us.anthropic.claude-opus-4-5-20251101-v1:0 |
opus-4.6 |
us.anthropic.claude-opus-4-6-v1 |
haiku / haiku-4.5 |
us.anthropic.claude-haiku-4-5-20251001-v1:0 |
copt -f prompt.txt -m opus # Use Claude Opus 4.5
copt -f prompt.txt -m haiku # Use Claude Haiku 4.5copt -f prompt.txt --offline # Analyze without API calls
copt -f prompt.txt --diff # Show before/after diff
copt -f prompt.txt -p anthropic # Use Anthropic API
copt -f prompt.txt --format json # JSON output for scripting
copt -f prompt.txt --no-suggest # Disable suggestions (for CI)
copt --config-init # Create default config fileLaunch with -i for a full-screen TUI:
copt -f prompt.txt -iKeyboard shortcuts:
| Key | Action |
|---|---|
q |
Quit |
d |
Toggle diff view |
c |
Copy to clipboard |
s / e |
Save & open in editor |
? |
Help |
Optimized prompts are auto-saved to ~/.copt/prompts/YYYY-MM-DD/ with descriptive filenames:
~/.copt/prompts/
└── 2026-02-15/
├── dashboard-analytics-api_143022_original.txt
├── dashboard-analytics-api_143022_optimized.txt
└── dashboard-analytics-api_143022.json
Use --output-dir <DIR> to override, or --no-save to disable.
Optimize prompts directly from your clipboard. See scripts/raycast/README.md for setup.
- Analysis Rules — All 27 rules across 8 categories
- Migration Guide — Claude 3.x → 4.5 patterns
- Contributing — Development setup
- Rust for Pythonistas — If you're coming from Python
MIT — Copyright (c) 2026 Praveen Chamarthi