Add prompt enhancement to claw-code (open-source Claude Code) via Ctrl+E in the REPL.
User types a prompt in claw REPL
│
├── Enter ───────► Submit as-is
│
└── Ctrl+E ──────► Enhance via chiron-enhance
│ (repo context + strategy)
▼
Enhanced prompt pre-filled in input box
User can keep editing → Enter to submit
Single Ctrl+E — no double-press needed. The enhanced text replaces your input so you can review and edit before submitting.
curl -fsSL https://raw.githubusercontent.com/EdwinjJ1/chiron-prompt/main/integrations/claw-code/install.sh | bashThis will:
- Clone claw-code (or use your existing clone with
--claw-dir) - Apply the Ctrl+E enhancement patch
- Build with
cargo - Install
claw-chironlauncher to~/.local/bin/
- Rust (
cargoin PATH) - chiron-enhance (
npm linkfromchiron-prompt/cli/)
# Install chiron-enhance first
git clone https://github.com/EdwinjJ1/chiron-prompt.git ~/.chiron
cd ~/.chiron/cli && npm linkIf you already have claw-code cloned:
./install.sh --claw-dir /path/to/claw-codeclaw-chiron-updateOr re-run with --update:
./install.sh --claw-dir /path/to/claw-code --updateclaw-chironInside the REPL:
| Key | Action |
|---|---|
Enter |
Submit prompt |
Ctrl+E |
Enhance prompt, pre-fill result for editing |
Ctrl+C |
Exit (on empty input) |
Ctrl+J / Shift+Enter |
Insert newline |
# Use Gemini CLI for rewriting (default, recommended)
export CHIRON_ENHANCE_BACKEND=gemini
# Use local strategy only (no LLM call)
export CHIRON_ENHANCE_BACKEND=localThe patch modifies three files:
| File | Change |
|---|---|
input.rs |
Bind Ctrl+E → Cmd::Interrupt, capture input as ReadOutcome::Enhance |
main.rs |
Handle Enhance → call chiron-enhance --inline → re-open input with readline_with_initial |
config.rs |
Skip non-string hook entries (compatibility with new Claude Code settings format) |
The integration is loosely coupled — claw-code calls chiron-enhance as an external binary. If it's not installed, Ctrl+E falls back to the original prompt.
MIT — same as Chiron and claw-code.