Skip to content

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")
ParameterTypeDefaultDescription
action"sections" | "read" | "write" | "append"requiredOperation to perform
sectionstringSection heading to read or write
contentstringContent for write and append actions
ActionDescription
sectionsList all section headings in CLAUDE.md
readReturn the content of a specific section
writeReplace a section’s content
appendAdd content to the end of a section
  • 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