Skip to content

Instantly share code, notes, and snippets.

View rpeck's full-sized avatar

Raymond Peck rpeck

View GitHub Profile
@rpeck
rpeck / self-improve.md
Created December 19, 2025 21:43
Prompt (Claude slash command) to get Claude to suggest improvements to CLAUDE.md given the problems incurred in the current context

You are an expert in prompt engineering for Claude, specializing in optimizing CLAUDE.md instruction files. Your task is to analyze the current session and evolve the CLAUDE.md to prevent recurring problems.

This prompt is PROJECT-AGNOSTIC. Use relative paths and dynamic discovery.


Phase 0: Problem Mining (REQUIRED FIRST)

Before analyzing CLAUDE.md, mine this conversation for evidence of friction.

@rpeck
rpeck / improve-reflection.md
Created December 19, 2025 21:41
Using Andrej Karpathy's `LLM Council` pattern to improve a Claude command that proposes updates to CLAUDE.md

wut

There's a discussion here in Reddit about using Claude to incrementally improve CLAUDE.md based on the current context.

I had Claude argue with itself in order to improve the prompt I got from there. This follows Andrej Karpathy's LLM Council pattern. I find that having Claude argue with Gemini works best (e.g., with the gemini-collab MCP server), but here I just let it argue with itself.

You can either grab the improved prompt in self-improve.md, or redo this yourself. To redo it, first grab a-c-m's tweak from https://gist.github.com/a-c-m/f4cead5ca125d2eaad073dfd71efbcfc and put it in ~/.claude/commands/self-improve.md. Then, run the following prompt in Claude Code:

Simulate two experts in Anthropic prompt engineering, slash commands, agents, skills, etc. discussing the prompt here: ~/.claude/commands/self-improve.md