Skip to content

Commit 2964cc6

Browse files
committed
Add tool implementations for 5 key techniques
Enhanced README.md with collapsible tool implementation sections for: • Set Up Memory Files - Claude Code (/init, /memory) and Cursor (AGENTS.md, @-mentions) • Run Multiple Agents in Parallel - Permission strategies for Claude Code and Codex CLI • Start Cheap, Escalate When Stuck - Model switching commands for both tools • Clear Context Between Tasks - Context management techniques • Interrupt and Redirect Often - Interruption controls for real-time guidance All implementations are hidden by default in collapsible sections to maintain clean reading experience while providing actionable commands and workflows when needed. Also removed duplicate "Start Cheap, Escalate When Stuck" section.
1 parent 23401e9 commit 2964cc6

File tree

1 file changed

+90
-7
lines changed

1 file changed

+90
-7
lines changed

README.md

Lines changed: 90 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,24 @@ Create context files that persistently guide tools about your project's structur
5858
> "`CLAUDE.md` is a special file that Claude automatically pulls into context when starting a conversation. This makes it an ideal place for documenting: common bash commands, core files and utility functions, code style guidelines, testing instructions."
5959
> [Anthropic](https://www.anthropic.com/engineering/claude-code-best-practices#:~:text=CLAUDE.md%20is%20a%20special%20file)
6060
61+
<details>
62+
<summary><strong>🛠️ Tool Implementations</strong></summary>
63+
64+
**Claude Code**: Run `/init` to auto-generate smart context files that make Claude understand your codebase instantly. Claude analyzes dependencies, scripts, and architecture automatically. Use `/memory` to edit and add project-specific gotchas.
65+
66+
- For new projects: Run `/init` in your project root to create a starter `CLAUDE.md`
67+
- For existing codebases: Run `/init` and Claude will analyze your project structure, dependencies, and configuration files to automatically generate essential information
68+
- Use `/memory` for full editor interface or `#` as quick shortcut to add notes
69+
- Memory file hierarchy: `~/.claude/CLAUDE.md` (global) and `./CLAUDE.md` (project-specific)
70+
71+
**Cursor**: Create `AGENTS.md` for project rules, then use @codebase and @docs for dynamic context. Cursor's superpower is real-time understanding of your entire codebase through @-mentions.
72+
73+
- Create `AGENTS.md` at project root (also supports legacy `.cursorrules`)
74+
- Real-time context: Use `@codebase` to pull in relevant files automatically, `@docs` to reference documentation, `@git` to understand recent changes
75+
- Combine static rules (AGENTS.md) with dynamic context (@-mentions) for best results
76+
77+
</details>
78+
6179
### Write Detailed Specs
6280

6381
Give comprehensive specs - even a conversational spec beats vague instructions.
@@ -258,6 +276,26 @@ Stop waiting for one AI agent to finish before starting another - run multiple a
258276
> "I disable all permission checks. Which basically means I run claude --dangerously-skip-permissions. More specifically I have an alias called claude-yolo set up."
259277
> [Armin Ronacher](https://lucumr.pocoo.org/2025/6/12/agentic-coding/#:~:text=I%20disable%20all%20permission%20checks)
260278
279+
<details>
280+
<summary><strong>🛠️ Tool Implementations</strong></summary>
281+
282+
**Claude Code**: Use `--dangerously-skip-permissions` on launch or `/permissions` to change permission strategy during coding session.
283+
284+
- Run `claude --dangerously-skip-permissions` to enable autonomous mode where Claude runs uninterrupted without permission prompts
285+
- Switch during session: Use `/permissions` to manage tool permissions mid-session without restarting
286+
- When to use: Fixing lint errors across multiple files, simple refactoring and variable renames, routine code updates and migrations
287+
- Safety: Best used in containers or VMs for isolation, avoid on critical production systems
288+
- Setup alias: Many users create `alias cc='claude --dangerously-skip-permissions'` for quick access
289+
290+
**Codex CLI**: Use `--full-auto` on launch or `/mode` to change permission strategy during coding session.
291+
292+
- Enable full autonomous mode with `codex --full-auto` or use in-session `/mode` command
293+
- Switch during session: Use `/mode` to hot-swap between permission levels without losing session context
294+
- Permission modes: `--suggest` (requires approval), `--auto-edit` (auto-edits files, asks for commands), `--full-auto` (complete autonomy)
295+
- When to use full-auto: Systematic refactoring tasks, bulk file operations, lint fixes and code cleanup
296+
297+
</details>
298+
261299
### Learn From It, Code Yourself
262300

263301
Use assistants to learn new languages and concepts, then apply that knowledge when you code.
@@ -272,27 +310,54 @@ Begin with faster/cheaper models for routine tasks, then escalate to more powerf
272310
> "Sonnet 4 handles 90% of tasks effectively. Switch to Opus when Sonnet gets stuck. Recommend starting with Sonnet and providing comprehensive context."
273311
> [Sankalp](https://sankalp.bearblog.dev/my-claude-code-experience-after-2-weeks-of-usage/#:~:text=Sonnet%204%20handles%2090%25)
274312
313+
<details>
314+
<summary><strong>🛠️ Tool Implementations</strong></summary>
315+
316+
**Claude Code**: Use `/model` to switch between models based on task complexity. Start with cheaper Sonnet 4 for routine work, escalate to fast Opus 4.1 when stuck.
317+
318+
- Use `/model` to switch models during your session
319+
- Cheaper, faster option: `Claude Sonnet 4`
320+
- Top-graded option: `Claude Opus 4.1`
321+
322+
**Codex CLI**: Use `/model` to escalate when needed. Start with `gpt-5-medium` for most tasks, switch to `gpt-5-high` when you hit complex problems.
323+
324+
- Use `/model` to switch models during your session
325+
- Cheaper, faster option: `gpt-5-medium`
326+
- Top-graded option: `gpt-5-high`
327+
328+
</details>
329+
275330
### Build Fast, Foolproof Tools
276331

277332
Create tools that respond quickly, provide clear error messages, and protect against being used incorrectly by AI agents.
278333

279334
> "Tools need to be fast. The quicker they respond (and the less useless output they produce) the better. Crashes are tolerable; hangs are problematic. Tools need to be user friendly! Tools must clearly inform agents of misuse or errors to ensure forward progress. Tools need to be protected against an LLM chaos monkey using them completely wrong. There is no such thing as user error or undefined behavior!"
280335
> [Armin Ronacher](https://lucumr.pocoo.org/2025/6/12/agentic-coding/#:~:text=Tools%20need%20to%20be%20fast)
281336
282-
### Start Cheap, Escalate When Stuck
283-
284-
Begin with faster/cheaper models for routine tasks, then escalate to more powerful models only when you hit complex problems.
285-
286-
> "Sonnet 4 handles 90% of tasks effectively. Switch to Opus when Sonnet gets stuck. Recommend starting with Sonnet and providing comprehensive context."
287-
> [Sankalp](https://sankalp.bearblog.dev/my-claude-code-experience-after-2-weeks-of-usage/#:~:text=Sonnet%204%20handles%2090%25)
288-
289337
### Clear Context Between Tasks
290338

291339
Reset the AI's context window between unrelated tasks to prevent confusion and improve performance on new problems.
292340

293341
> "During long sessions, Claude's context window can fill with irrelevant conversation, file contents, and commands. This can reduce performance and sometimes distract Claude. Use the `/clear` command frequently between tasks to reset the context window."
294342
> [Anthropic](https://www.anthropic.com/engineering/claude-code-best-practices#:~:text=During%20long%20sessions%2C%20Claude's%20context)
295343
344+
<details>
345+
<summary><strong>🛠️ Tool Implementations</strong></summary>
346+
347+
**Claude Code**: Use `/clear` command to reset the context window and start fresh.
348+
349+
- Run `/clear` between unrelated tasks to prevent context pollution
350+
- Preserves your memory files (CLAUDE.md) while clearing conversation history
351+
- Essential for long coding sessions to maintain performance
352+
353+
**Cursor**: Start new chat sessions or use conversation management features.
354+
355+
- Use Cmd/Ctrl+Shift+L to start a new chat for unrelated tasks
356+
- Chat history is automatically managed to prevent context overload
357+
- Use @-mentions to bring in specific context when starting fresh
358+
359+
</details>
360+
296361
### Use Strong Emphasis in Prompts
297362

298363
Use IMPORTANT, NEVER, ALWAYS liberally in prompts to steer AI away from common mistakes - it's still the most effective approach.
@@ -307,6 +372,24 @@ Don't let AI go too far down the wrong path - interrupt, provide feedback, and r
307372
> "Press Escape to interrupt Claude during any phase (thinking, tool calls, file edits), preserving context so you can redirect or expand instructions. Double-tap Escape to jump back in history, edit a previous prompt, and explore a different direction. You can edit the prompt and repeat until you get the result you're looking for."
308373
> [Anthropic](https://www.anthropic.com/engineering/claude-code-best-practices#:~:text=Press%20Escape%20to%20interrupt%20Claude)
309374
375+
<details>
376+
<summary><strong>🛠️ Tool Implementations</strong></summary>
377+
378+
**Claude Code**: Use Escape key to interrupt and redirect Claude at any time.
379+
380+
- Press `Escape` to interrupt Claude during any phase (thinking, tool calls, file edits)
381+
- Double-tap `Escape` to jump back in history and edit a previous prompt
382+
- Context is preserved so you can redirect or expand instructions
383+
- Edit the prompt and retry until you get the desired result
384+
385+
**Cursor**: Use Cmd/Ctrl+K to stop generation and provide new instructions.
386+
387+
- Stop generation with `Cmd/Ctrl+K` when you see it going off track
388+
- Provide corrective feedback immediately rather than waiting
389+
- Use the chat interface to clarify requirements before letting it continue
390+
391+
</details>
392+
310393
### Use AI as Coding Partner
311394

312395
Collaborate like with a coding partner - explain problems, get feedback, and work together on solutions.

0 commit comments

Comments
 (0)