AI Library
Books for Reading AI
Choose a book, then read it in order from the table of contents.
[AI Library] Chapter 23: Context Management: Using Your Assistant Smarter
Mastering Claude Code
Chapter 23: Context Management: Using Your Assistant Smarter
Kim Kyung-jin
Mastering Claude Code
Introduction
When you ask your assistant, "When was the new product launch date we decided last month?" and the agent finds the exact date and the reason behind it in seconds, that's not because the agent is smart. It's because the information is stored in the right location in the right format.
Now imagine the opposite. All information is concentrated in a single CLAUDE.md file. The agent must read a document of over 500 lines from start to finish every time,user information, team structure, project status, decision logs, skill usage. The model's token budget is spent quickly, and context window limits are hit fast. The agent's responses become slower and less precise.
Context management is the invisible infrastructure that determines an executive assistant's performance. How well you design this infrastructure,more than any flashy skill,sets the ceiling for what your assistant can achieve.
The Role of the context, decisions, and archives Folders
Inside your project folder are three essential folders. The names may look ordinary, but each handles a different timeframe.
The context folder holds the present. It contains information valid right now. me.md holds your name, role, and preferences; work.md holds your current business structure and key products; team.md holds the names and roles of people you work with; priorities.md records this week's and this quarter's essential tasks.
goals.md contains annual goals and quarterly milestones.
When the agent runs your morning briefing skill, writes content, or performs research, these files become the decision standard. The agent can answer "What were this quarter's goals?" because it simply reads context/goals.md.
These files are not static. When the quarter changes, priorities.md gets updated; when a new team member joins, team.md is expanded. When you tell the agent "Update priorities," it modifies the file directly.
The decisions folder preserves past judgments. Every time an important decision is made, a record is kept in this folder's log.md. The date, decision, reason, and context are all saved together.
Why is this record important? Two months later, when you ask "Why did we push back the western expansion to April?" the agent can find this log and answer. You don't have to rely on memory. As your organization grows, tracking the reasons behind past decisions becomes harder,this folder solves that problem.
The archives folder holds records from past quarters. When a quarter ends, that quarter's goals and progress records move here. The context folder keeps only the current quarter's information while older data is archived. This prevents the context folder from bloating while still letting you find past records when needed.
[Figure 23-1: Timeline diagram of context, decisions, and archives folders]
Summarized, the relationship is this: context is now, decisions is the history of choices, archives is a snapshot of the past. As time passes, part of context moves to archives, new information fills context, and decisions keeps accumulating.
The Hierarchical Organization of Information
In Chapter 20, I explained how CLAUDE.md acts as a router. Let me dig deeper into that concept.
Here's the order in which the agent processes your message:
1. Load CLAUDE.md (the starting point for every conversation). 2. Analyze your request. 3. Follow CLAUDE.md's path guidance to locate where the needed information is. 4. Selectively read only those files.
Without this structure, what happens? Either you pack everything into CLAUDE.md, or the agent searches the entire project. The first is wasteful of the model's token budget; the second wastes time.
[Figure 23-2: Information hierarchy: CLAUDE.md → routing → individual context files]
In CLAUDE.md, it reads like this:
This method's benefit is not just token savings. It maintains a single source of truth. User information lives in me.md alone, so when you update it, you modify only one file. If user information were duplicated in both CLAUDE.md and me.md, changing one would create a mismatch.
The principle for designing a routing structure is clear:
The same principle applies in skill files. A skill's YAML frontmatter contains only the name and description; the full instructions load only after the agent selects the skill. Reference files or scripts are read only when needed. This three-step loading is called progressive context loading.
[Figure 23-3: Three stages of progressive context loading]
Integration with Project Management Tools
No matter how well the context folder is organized, without real-time data, your assistant's judgment stays in the past. If a team member finished a task this morning but priorities.md still shows it as "in progress," that's a problem.
Integration with project management tools fills that gap. The agent connects directly to tools like ClickUp, Notion, or Asana to fetch the latest data. There are two main integration methods.
API integration: Store the tool's API key in an .env file and configure a skill so the agent can call the API to read and write data. Tell the agent "Create a ClickUp integration skill. I'll put the API key in .env," and the agent researches the API documentation and writes the skill.
MCP server integration: Connection via an MCP (Model Context Protocol) server. The MCP server acts as a bridge between the project management tool and the agent. With a ClickUp MCP server in place, the agent can make natural-language requests like "Show me tasks due this week."
[Figure 23-4: Project management tool integration architecture diagram]
Once integrated, skills like your morning briefing or pulse check operate on real-time data. Static information from priorities.md combines with dynamic data from the project management tool, raising the agent's judgment accuracy.
One caution during integration: when the agent searches project management tools, repeatedly traversing lists and extracting IDs can consume a lot of tokens. As mentioned in Chapter 21, you can reduce this cost by pre-recording frequently used list IDs in your skill files.
If you observe the agent working and notice repeated search patterns, hardcoding them is a practical optimization.
The Evolution Path: How Your Assistant Grows More Precise with Daily Use
Use your assistant daily for a month, and your project folder transforms. On day one, the context folder held four files and CLAUDE.md. Thirty days later, your skills folder has multiple new skills, research reports pile up, decision logs grow longer, and project folders fill with deliverables.
This accumulation is your assistant's intelligence. Even if the underlying model never changes, as your reference data grows richer, response precision increases.
Let me map the evolution path over time.
Week 1: Building foundations. You fill context files through interviews and create your first skill. The agent's responses may still feel generic,like talking to a new assistant who doesn't yet know your business.
Week 2: Pattern recognition. Daily use reveals repeating requests. You start thinking, "I could make this a skill." You bring in existing prompts from ChatGPT projects or custom GPTs and convert them into skills. As you give the agent feedback, skill quality improves.
Weeks 3 to 4: Settling in. You run the morning coffee skill daily, conduct research with the research skill two to three times a week, and write social media posts with the content generation skill. As the agent develops a thorough understanding of your business context, the accuracy of proposals rises noticeably. This is the point where you feel like you're using a completely different tool than you were a month ago.
[Figure 23-5] Timeline of assistant evolution: Week 1 → Week 2 → Week 4]
A few habits can accelerate this evolution.
Tell the agent to remember things. "Remember that I always prefer focused work in the morning." The agent saves this information to me.md or an appropriate file. When you run the morning coffee skill next time, focused work naturally gets scheduled for the morning.
Watch the skill execute and offer corrections. For the first few runs, observe how the agent executes the skill. If you spot unnecessary API calls, direct it: "Skip that step and use this ID directly." When the agent updates the skill file, the next run becomes more efficient.
Review context files periodically. The agent proposes file updates on schedules written in CLAUDE.md,weekly, monthly, quarterly. Weekly: auto-organize memories. Monthly: update priorities.md. Quarterly: refresh goal files. Following this routine keeps your context current.
Understanding .claude Folder Structure in Depth
The .claude folder holds the assistant's internal settings. It sits at your project root and consists of three main subfolders.
skills folder. Each skill has its own subfolder. Inside the skill folder is a skill.md file, with optional references/ or scripts/ subfolders added as needed. Reference files and scripts don't have to live inside .claude/skills/. As long as skill.md points to the correct path, they can sit anywhere in your project.
agents folder. Config files for secondary agents live here. Each agent file describes its role, the model it uses, and the tasks it performs. The main agent references these files when delegating work.
rules folder. Rules that govern the agent's behavior go here,communication style, formatting guidelines, forbidden phrases, and the like. Details such as "use bullet points", "keep it terse", "no em dashes".
[Figure 23-6] Interior structure of the .claude folder and the role of each subfolder]
The key in this structure is separation and reference. Rather than stuffing all settings into one file, you divide them by purpose and then reference them by path where needed. Even as skills grow to ten or twenty, this principle keeps management straightforward.
There is also the concept of a global skill. If you install a skill in your home directory rather than inside .claude/skills/, you can use that skill whenever you open any project. This works best for versatile skills that aren't tied to a single project, like a frontend design skill.
Closing Thoughts
Context management is unglamorous. Creating folders, separating files, organizing paths,tedious work, it seems. Yet without this infrastructure, skills run context-blind, agent responses stay generic, and the virtuous cycle of growing smarter with use never begins.
When the context folder holds the present, decisions records the history of judgment, archives preserves the past, and CLAUDE.md serves as the crossroads of it all,this structure is what transforms your assistant from a simple chatbot into your business's brain.
On this foundation, skills grow increasingly refined, agents learn your judgment patterns, and automation reaches levels you couldn't imagine a month ago,it becomes routine. Yet a single agent has limits in handling everything. The next frontier opens when you distribute complex work across multiple specialist agents: the world of secondary agents.
AI Policy Expert and Lawyer Kim Kyung-jin
Specialist in AI law and policy · Former member of the National Assembly · Author of multiple works
If this book has spent even a moment at your side, please support the next story coming to light.
(Voluntary support appreciated: NH Bank 302-1096-0948-81 Account holder: Kim Kyung-jin)
Kim Kyung-jin
Attorney · Former Member of the National Assembly · AI Policy Researcher
© 2026 Kim Kyung-jin. All rights reserved.
