Power users optimize Claude Code itself and automate repetitive work to push productivity to the limit.
Claude Code's behavior is driven by a massive system prompt that can be tens of thousands of tokens. ykdojo successfully reduced it from ~19k tokens to under 10k by patching it.
Why reduce the system prompt?
ykdojo's 58 patches targeted:
How to apply patches:
# clone ykdojo repo
git clone https://github.com/ykdojo/claude-code-tips.git
cd claude-code-tips
# run patch script
./scripts/apply-patches.sh
Warning: expert territory
If you patch the system prompt incorrectly, Claude's performance can degrade severely.
When delegating long-running work to Claude, use an exponential backoff strategy.
check after 1m -> 2m -> 4m -> 8m -> ...
Press Ctrl+B while a command is running to send it to the background.
"I need to analyze a large codebase. Run 3 subagents in the background and have each analyze a different module."
# Claude:
# - Agent 1: analyze /src/auth
# - Agent 2: analyze /src/api
# - Agent 3: analyze /src/database
# runs them in parallel
ykdojo calls this "automation of automation."
ykdojo's automation journey:
ykdojo's philosophy:
"Repeating something 2-3 times is fine. But if you repeat it more than that, find a way to automate it. And automate the automation process itself."
Claude Code can be integrated into CI/CD pipelines as a powerful CLI tool.
Headless mode:
# basic
claude -p "Fix the lint errors"
# pipeline integration
git diff | claude -p "Explain these changes"
# JSON output
echo "Review this PR" | claude -p --json
GitHub Actions example:
.github/workflows/claude-review.yml:
name: Claude Code Review
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Claude Code
run: curl -fsSL https://claude.ai/install.sh | sh
- name: Review PR
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
git diff origin/main...HEAD | \
claude -p "Review this PR and identify potential issues" \
> review.md
- name: Comment on PR
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const review = fs.readFileSync('review.md', 'utf8');
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: review
});
Ado's advice:
"Headless mode integrates AI into your pipeline. The -p flag runs non-interactively and writes directly to stdout."