Fix from Logs
Intelligent debugging with /ck:fix — from error logs to working code in one command
How It Works
When logs.txt exists, /ck:fix routes to its log-analysis workflow — a 6-phase pipeline where each phase delegates to a specialized agent.
Quick Start
1. Pipe logs to file
Redirect your app output to logs.txt so the AI can read errors.
npm run dev 2>&1 | tee logs.txt 2. Reproduce the error
Run your app and trigger the issue. Ensure errors are captured in logs.txt.
3. Run the fix command
Tell the AI to analyze your logs:
/ck:fix Mention logs.txt in the prompt to trigger log-analysis workflow /ck:fix "analyze logs.txt and fix errors" Modes
Choose the right mode for your situation:
--auto --quick --review --parallel Usage Examples
/ck:fix "analyze logs.txt and fix errors" Full log analysis pipeline /ck:fix "check logs.txt for auth errors" --auto Focused fix, autonomous mode /ck:fix "fix errors in logs.txt" --quick Quick fix for simple log errors /ck:fix "deploy pipeline error" --auto CI/CD fix (replaces /fix:ci) Log Piping Setup
Different ways to capture logs depending on your stack:
npm run dev 2>&1 | tee logs.txt python app.py 2>&1 | tee logs.txt go run . 2>&1 | tee logs.txt docker compose up 2>&1 | tee logs.txt npm run dev *>&1 | Tee-Object logs.txt tee is built-in on macOS & Linux. On Windows, use Tee-Object in PowerShell.
Add log piping permanently to your package.json scripts:
"dev:log": "npm run dev 2>&1 | tee logs.txt" Tips
Focus on recent errors
The debugger reads the last 30 lines first, then expands if needed. Keep logs.txt fresh — clear it before reproducing.
Use tee, not redirect
2>&1 | tee logs.txt lets you see output in terminal AND captures to file. Plain > redirect hides terminal output.
3-strike rule
If 3+ fix attempts fail, the skill stops and asks you to reconsider the architecture. No infinite loops.
Combine with /ck:debug
For deeper investigation without auto-fixing, use /ck:debug first, then /ck:fix to apply.
Related Commands
/ck:fix --quick Quick fix for type/lint errors /ck:fix --parallel Fix multiple issues simultaneously /ck:fix --review Human-in-the-loop review mode /ck:debug Deep investigation without auto-fix