code_config
code_config reads and writes CLAUDE.md files — the instruction files that configure AI agent behavior for a project. It provides structured access to sections without loading the entire file, and saves changes to memory automatically.
code_config(action="sections")code_config(action="read", section="Code Quality")code_config(action="write", section="New Rule", content="Always validate inputs with Zod.")code_config(action="append", section="Code Quality", content="- Prefer early returns over nested conditionals")Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
action | "sections" | "read" | "write" | "append" | required | Operation to perform |
section | string | — | Section heading to read or write |
content | string | — | Content for write and append actions |
Actions
Section titled “Actions”| Action | Description |
|---|---|
sections | List all section headings in CLAUDE.md |
read | Return the content of a specific section |
write | Replace a section’s content |
append | Add content to the end of a section |
When to use
Section titled “When to use”- Update project rules without reading and rewriting the full file
- Add a new rule discovered during a session
- Read a specific section of config without loading 8,000 tokens