Skip to content

Instantly share code, notes, and snippets.

View futuregerald's full-sized avatar

Gerald Onyango futuregerald

View GitHub Profile
#!/usr/bin/env bash
set -euo pipefail
# patch-claude-code.sh — Rebalance Claude Code prompts to fix corner-cutting behavior
#
# What this does:
# Patches the npm-installed @anthropic-ai/claude-code cli.js to rebalance
# system prompt instructions that cause the model to cut corners, simplify
# excessively, and defer complicated work.
#
const fs = require('fs');
if (process.env.CONTEXT === 'branch-deploy') {
const writeStream = fs.createWriteStream('./dist/_headers');
const headers = `# These are headers generated by headers.js
/*
Basic-Auth: test:password
`;