<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Workflow on Damian Galarza | Software Engineering &amp; AI Consulting</title><link>https://www.damiangalarza.com/tags/workflow/</link><description>Recent posts from Damian Galarza | Software Engineering &amp; AI Consulting</description><generator>Hugo</generator><language>en-us</language><managingEditor>Damian Galarza</managingEditor><atom:link href="https://www.damiangalarza.com/tags/workflow/feed.xml" rel="self" type="application/rss+xml"/><item><title>Claude Opus 4/7 + Claude Code: 7 Practical Tips for Maximizing Extended Context</title><link>https://www.damiangalarza.com/posts/2026-04-30-claude-opus-4-7-claude-code-tips-extended-context/</link><pubDate>Thu, 30 Apr 2026 00:00:00 -0400</pubDate><author>Damian Galarza</author><guid>https://www.damiangalarza.com/posts/2026-04-30-claude-opus-4-7-claude-code-tips-extended-context/</guid><description>Practical tips for getting the most from Claude Opus 4.7's 1M context window in Claude Code. Effort levels, proactive compaction, subagent delegation, and session management from daily production use.</description><content:encoded><![CDATA[<p>Claude Opus 4.7 shipped with a 1M token context window. That&rsquo;s five times what Sonnet 4.5 offers. However, this doesn&rsquo;t mean we should no longer be careful with our context window.</p>
<p>The lost-in-the-middle problem doesn&rsquo;t disappear at 1M tokens. Content in the center of the window still gets less attention than content at the beginning and end. Opus 4.7 uses a new tokenizer that improves model performance, but it also means files you read consume context in subtly different ratios than before. Anthropic&rsquo;s docs note the new tokenizer can use up to 35% more tokens per equivalent input compared to previous models. And adaptive thinking, now the only supported thinking mode in 4.7 (fixed budgets are removed), consumes context dynamically. The model thinks longer on harder problems and shorter on easy ones. That thinking counts against your window.</p>
<p>If you&rsquo;re coming from my earlier post on <a href="/posts/2025-12-08-understanding-claude-code-context-window/">Understanding Claude Code&rsquo;s Context Window</a>, everything there still applies. The fundamentals haven&rsquo;t changed. What has changed is the ceiling, and the set of controls available to you.</p>
<p>Here are seven workflow adjustments I&rsquo;ve made since Opus 4.7 dropped. Each one addresses a specific constraint I hit in daily production use.</p>
<h2 id="1-front-load-context-in-your-first-turn">1. Front-Load Context in Your First Turn</h2>
<p>One of the big changes from Opus 4.6 to Opus 4.7 is that it no longer reads between the lines. Opus 4.6 was better at taking a vague prompt and &ldquo;figuring it out&rdquo;. Opus 4.7, however, no longer does this. You need to provide good context to the model to achieve good results. The first message in the session anchors everything that follows.</p>
<p>Structure your first turn to include three things: what you want and why, which files or areas of the codebase are relevant, and what &ldquo;done&rdquo; looks like.</p>
<p>Here&rsquo;s an example. Instead of this:</p>
<pre tabindex="0"><code>Add rate limiting to the API
</code></pre><p>Try this:</p>
<pre tabindex="0"><code>Add rate limiting to the webhook ingestion endpoint in
packages/gateway/src/routes/webhooks.ts. We&#39;re getting
hammered by a misbehaving integration that sends duplicate
events. Use the existing Redis connection in src/lib/redis.ts.
Rate limit by client IP, 100 requests per minute. Add tests
in __tests__/webhooks.test.ts. Don&#39;t change the event
processing logic in src/lib/event-handler.ts.
</code></pre><p>The second version tells Opus 4.7 exactly what to touch, why, and what to leave alone. You define the &ldquo;what&rdquo; and the constraints. Let the model propose the &ldquo;how.&rdquo;</p>
<p>One thing to watch for: don&rsquo;t turn your first message into a specification document. If you find yourself writing more than a paragraph or two, you&rsquo;re probably trying to control implementation details that the model should decide. Name the files, the constraints, and the definition of done. Stop there.</p>
<h2 id="2-switch-effort-levels-mid-session">2. Switch Effort Levels Mid-Session</h2>
<p>Thinking tokens count against your context window. A single <code>xhigh</code> response on a complex problem can use significantly more tokens than the same question at <code>high</code>. Over the course of a session, this adds up fast.</p>
<p>Opus 4.7 introduced <code>xhigh</code> effort and replaced the old fixed thinking budgets with adaptive thinking. At <code>xhigh</code>, the model almost always engages deep reasoning on complex work and skips thinking on simpler tasks. That&rsquo;s useful for architecture decisions, complex debugging, and multi-file refactors. It&rsquo;s overkill for renaming a variable across twenty files.</p>
<p>Here&rsquo;s how I handle it. I start sessions at <code>xhigh</code> for the initial planning and implementation work. When I shift to mechanical tasks, I drop the effort level:</p>
<pre tabindex="0"><code>/effort high
</code></pre><p>Rename the files, run the migration, update the imports. Then when I need deep analysis again:</p>
<pre tabindex="0"><code>/effort xhigh
</code></pre><p>In practice: you spend the first part of a session at <code>xhigh</code> implementing a feature, then need to update some test fixtures and rename a few constants. Drop to <code>high</code> or even <code>medium</code> for that work. When you&rsquo;re ready to debug a failing integration test, go back to <code>xhigh</code>.</p>
<p>The gotcha here is context switching cost. Don&rsquo;t toggle effort every other message. Batch your mechanical tasks together and run them at a lower effort level in one block. Then switch back for the next piece of deep work.</p>
<h2 id="3-compact-at-60-not-when-you-see-a-warning">3. Compact at 60%, Not When You See a Warning</h2>
<p>Autocompact triggers when your context window is nearly full. By the time that happens with a 1M window, you&rsquo;ve been running with degraded output quality for a while. The lost-in-the-middle effect doesn&rsquo;t wait for you to run out of room. It starts affecting responses well before you hit the ceiling.</p>
<p>My rule of thumb: check <code>/context</code> periodically and compact when you hit around 60%. That sounds like a lot to throw away, but consider the flip side. You still have 400K tokens after compacting, which is twice the entire Sonnet 4.5 window.</p>
<p>Here&rsquo;s what <code>/context</code> output looks like in a session approaching that threshold:</p>
<pre tabindex="0"><code>Context Usage
⛁ ⛀ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   claude-opus-4-7 · 610k/1000k tokens (61%)
</code></pre><p>After a proactive compact:</p>
<pre tabindex="0"><code>Context Usage
⛁ ⛀ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   claude-opus-4-7 · 85k/1000k tokens (8.5%)
</code></pre><p>That&rsquo;s a fresh start with all the important decisions preserved. Much better than letting autocompact fire at capacity and losing coherence.</p>
<p>The trade-off with early compaction is that you lose conversational nuance. Specific phrasings, detailed file contents, and turn-by-turn reasoning all get compressed into a summary. This is why Tip 4 exists.</p>
<h2 id="4-steer-your-compaction">4. Steer Your Compaction</h2>
<p>Running <code>/compact</code> without guidance lets the model decide what to keep and what to drop. This works reasonably well for short sessions, but in a long session with multiple decisions, the model often drops specifics that matter for the next phase of work.</p>
<p>Always pass steering instructions when you compact. Name the topics and the decisions you need preserved.</p>
<p>Here are three examples from real sessions:</p>
<pre tabindex="0"><code>/compact Preserve the auth refactor decisions: we chose
JWT with rotating refresh tokens over session cookies,
the token service is in src/lib/auth/tokens.ts, and
the migration adds a refresh_tokens table.
</code></pre><pre tabindex="0"><code>/compact Keep the schema changes we made to the proposals
table (added status enum, soft delete columns, and the
client_id foreign key). Preserve the repo pattern decision
from packages/shared/src/db/repos/proposals.ts.
</code></pre><pre tabindex="0"><code>/compact We&#39;re moving to phase 2 of the API implementation.
Preserve the route structure decisions (REST for CRUD,
webhooks for async events) and the middleware chain order.
Drop the debugging of the TypeScript config issues.
</code></pre><p>Keep your steering to two or three sentences. Name the topics, not every detail. The model will fill in the specifics from the conversation history. You are giving it a priority list, not writing the summary yourself.</p>
<h2 id="5-use-subagents-for-context-isolation">5. Use Subagents for Context Isolation</h2>
<p>I covered subagents in detail in my <a href="/posts/2025-12-08-understanding-claude-code-context-window/">context window post</a>, but Opus 4.7 shifts the default behavior. In my experience, Opus 4.7 spawns fewer subagents on its own compared to earlier models (Anthropic&rsquo;s release notes confirm this as a deliberate behavior change). It&rsquo;s more inclined to do work inline, which means exploration output that used to be isolated now accumulates in your main context.</p>
<p>That&rsquo;s fine for focused tasks. It becomes a problem when you need to explore a large area of the codebase or review a significant diff. The fix: explicitly request subagent delegation.</p>
<p>The key is scoping what comes back. Instead of:</p>
<pre tabindex="0"><code>Review the changes on this branch
</code></pre><p>Try:</p>
<pre tabindex="0"><code>Have a subagent review the changes on this branch against
main. Report back: any bugs, any missing test coverage,
and any patterns that don&#39;t match our existing conventions.
Don&#39;t include the full diff in the report.
</code></pre><p>Good candidates for subagent delegation:</p>
<ul>
<li><strong>Code reviews:</strong> The subagent reads every changed file, but your main context only gets the summary.</li>
<li><strong>Codebase exploration:</strong> &ldquo;Have a subagent map out how the notification system works across packages/gateway and packages/agents.&rdquo;</li>
<li><strong>Test analysis:</strong> &ldquo;Spawn a subagent to check which tests cover the payment flow and identify gaps.&rdquo;</li>
<li><strong>Pattern audits:</strong> &ldquo;Use a subagent to find all places we handle errors in route handlers and check for consistency.&rdquo;</li>
</ul>
<p>The gotcha with subagents is that they don&rsquo;t share your conversation history. If you made a decision earlier in the session that affects how the subagent should evaluate something, include that decision in the delegation prompt. The subagent starts fresh.</p>
<h2 id="6-use-rewind-to-recover-from-failed-approaches">6. Use Rewind to Recover from Failed Approaches</h2>
<p>Every failed approach leaves artifacts in your context: the wrong implementation, the correction, the explanation of why it was wrong. With Opus 4.7&rsquo;s literal instruction following, this creates a real problem. The model may anchor on parts of a failed attempt even after you have corrected course, because that failed code is still in the conversation history.</p>
<p>The <code>/rewind</code> command (or double-tap Escape) rolls back to a previous point in the conversation. This removes the failed approach from context entirely, as if it never happened.</p>
<p>Here&rsquo;s when to use rewind versus inline correction:</p>
<p><strong>Rewind</strong> when the approach is fundamentally wrong. You asked for a webhook handler and got a giant switch statement, but your codebase uses an event routing pattern. Correcting inline means the model has both patterns in context and may blend them.</p>
<p><strong>Correct inline</strong> when the details need adjustment. The approach is right but a method name is wrong, or it missed an edge case. The cost of the correction in context is low, and the model benefits from seeing the refinement.</p>
<p>A practical example: I asked Claude to implement a notification dispatch system. The first attempt built a synchronous pipeline. My codebase uses BullMQ for async job processing. Rather than explaining why synchronous was wrong and asking it to redo the work, which would leave both approaches in context, I rewound and rephrased:</p>
<pre tabindex="0"><code>Implement notification dispatch using our existing BullMQ
job infrastructure in packages/agents/src/lib/queue.ts.
Each notification type gets its own job processor.
Follow the pattern in the heartbeat-runner for job setup.
</code></pre><p>Clean context. Clear direction. No conflicting signals.</p>
<p>One warning: rewind is destructive. If the failed approach contained useful insights (it identified the right files to modify, or surfaced a constraint you hadn&rsquo;t considered), note those before rewinding. You can include them in your rephrased prompt.</p>
<h2 id="7-know-when-to-clear-compact-or-continue">7. Know When to Clear, Compact, or Continue</h2>
<p>Quality degrades gradually in long sessions. You won&rsquo;t see a cliff. Responses get slightly less precise, slightly more generic, slightly more likely to miss constraints you established earlier. A 1M window means sessions can run much longer, which makes the decision of when to stop harder, not easier.</p>
<p>Here&rsquo;s the decision framework I use:</p>
<p><strong>Continue</strong> when you&rsquo;re mid-task, below 60% context usage, and working on a single coherent thread. The model has strong recall of recent decisions and the work is flowing.</p>
<p><strong>Compact</strong> when you&rsquo;ve finished a phase and are starting the next one. You need the architectural decisions but not the turn-by-turn implementation details. This is where Tip 4&rsquo;s steering instructions matter most.</p>
<p><strong>Clear</strong> when the next task is unrelated to what you&rsquo;ve been doing. Also clear when the model starts repeating itself, when you&rsquo;ve already compacted multiple times in the session, or when you&rsquo;ve persisted your plan externally (in a TODO file, a Linear issue, or a CLAUDE.md update).</p>
<p><strong>Start a new session</strong> when you need different MCP servers, when you&rsquo;re switching to a different branch, or when you&rsquo;re doing parallel worktree work. Each worktree should get its own session. I covered why in <a href="/posts/2026-03-10-extending-claude-code-worktrees-for-true-database-isolation/">Extending Claude Code with Worktrees for True Database Isolation</a>.</p>
<p>The full session lifecycle follows a natural arc. Start with a strong first prompt (Tip 1) at xhigh effort (Tip 2). During the working phase, delegate exploration to subagents (Tip 5) and rewind failed approaches (Tip 6). When you hit around 60% context, compact proactively (Tip 3) with steering instructions (Tip 4). Then decide whether to continue, clear, or start fresh (Tip 7).</p>
<pre tabindex="0"><code>Session Start
  ├── Tip 1: Front-load context in first turn
  ├── Tip 2: xhigh for deep work, high/medium for mechanical
  │
  │   [Working...]
  │
  ├── Tip 5: Delegate exploration to subagents
  ├── Tip 6: Rewind failed approaches
  │
  │   [~60% context used]
  │
  ├── Tip 3: Proactive /compact
  ├── Tip 4: Steer the compaction
  │
  │   [Continue or...]
  │
  └── Tip 7: Clear / New session when needed
</code></pre><h2 id="the-mental-model">The Mental Model</h2>
<p>The 1M context window isn&rsquo;t five times more room. It&rsquo;s five times more rope.</p>
<p>With a 200K window, context pressure forced discipline. You had to be deliberate about what went into the window because you would run out. With 1M tokens, poor habits go unnoticed much longer before the consequences show up. That makes discipline harder, not easier.</p>
<p>The one principle behind all seven tips: active context management beats passive accumulation. Front-load your intent. Control your effort levels. Compact before you need to. Steer the compaction. Isolate expensive exploration. Remove dead ends. Know when to stop.</p>
<p>These aren&rsquo;t theoretical suggestions. They&rsquo;re the adjustments I&rsquo;ve made in my own workflow over the past week of daily Opus 4.7 usage. It rewards precision and punishes ambiguity. Give it clear context, and it delivers.</p>
<blockquote>
<p>If this post was the explanation, the cheat sheet is the reference.
Two sides: token costs for common MCPs on one, the <code>/clear</code> /
<code>/compact</code> / subagent decision tree on the other.</p>
<p><a href="/context-window-cheat-sheet/">Get the Context Window Cheat Sheet →</a></p></blockquote>
<h2 id="further-reading">Further Reading</h2>
<ul>
<li><a href="/posts/2025-12-08-understanding-claude-code-context-window/">Understanding Claude Code&rsquo;s Context Window</a></li>
<li><a href="/posts/2025-11-25-how-i-use-claude-code/">How I Use Claude Code: My Complete Development Workflow</a></li>
<li><a href="/posts/2026-03-10-extending-claude-code-worktrees-for-true-database-isolation/">Extending Claude Code with Worktrees for True Database Isolation</a></li>
<li><a href="https://claude.com/blog/best-practices-for-using-claude-opus-4-7-with-claude-code">Anthropic: Best practices for using Claude Opus 4.7 with Claude Code</a></li>
</ul>
]]></content:encoded></item><item><title>Understanding Claude Code's Context Window</title><link>https://www.damiangalarza.com/posts/2025-12-08-understanding-claude-code-context-window/</link><pubDate>Mon, 08 Dec 2025 00:00:00 -0500</pubDate><author>Damian Galarza</author><guid>https://www.damiangalarza.com/posts/2025-12-08-understanding-claude-code-context-window/</guid><description>How Claude Code's context window works: what consumes tokens (MCP servers, tools, messages), why it matters, and how to manage context effectively.</description><content:encoded><![CDATA[<p>I&rsquo;ve been using Claude Code for some time now, and as I discussed in <a href="/posts/2025-11-25-how-i-use-claude-code/">How I Use Claude Code: My Complete Development Workflow</a>, using AI coding tools effectively is a skill in itself. One of the most important parts of getting value from your AI coding assistant is managing context.</p>
<p>In this post we&rsquo;ll look at how you can make the most of your available context window in Claude Code, as well as some common pitfalls to avoid.</p>
<h2 id="understanding-the-context-window">Understanding the Context Window</h2>
<p>Before we can begin to try to optimize our developer workflow we need to get an understanding of what the context window is and how it gets filled. The context window is how much content a large language model can hold onto at one time. Each model has predefined limits to the size of its context window. For example, Claude Sonnet 4.5&rsquo;s context window is about 200,000 tokens.</p>
<h3 id="what-is-a-token">What is a Token?</h3>
<p>When you send text to an LLM, it doesn&rsquo;t process words one at a time. Instead, text is broken into <strong>tokens</strong>—the fundamental units that language models read and generate. A token typically represents 3-4 characters, or roughly 0.75 words in English.</p>
<p>For example, the phrase <code>&quot;Hello world&quot;</code> becomes 2-3 tokens, while a compound word like <code>authentication_middleware</code> might be split into 5-7 tokens despite being a single identifier. Code tends to be more token-dense than prose because of special characters, naming conventions, and syntax. This is why reading source files consumes context faster than you might expect.</p>
<h3 id="why-token-efficiency-matters">Why Token Efficiency Matters</h3>
<p>Context windows have limited space, and filling them with code happens fast. But running out of room isn&rsquo;t the only concern. LLMs suffer from a &ldquo;lost in the middle&rdquo; problem. Content at the start and end of the context window gets prioritized, while information in the middle tends to get overlooked. This mirrors how human memory works (we remember beginnings and endings better than middles).</p>
<p><img src="/images/posts/lost-in-the-middle.png" alt="Diagram showing how LLMs prioritize content at the beginning and end of context windows while missing information in the middle"></p>
<p>Additionally, our code isn&rsquo;t the only thing consuming context window space. Our context window is going to be filled by:</p>
<p><strong>MCP Servers</strong></p>
<p>Every MCP server you add is going to take some amount of space in your context window just by being available and present. Every MCP tool definition comes with:</p>
<ol>
<li><strong>Tool name</strong> (e.g., mcp__ynab__get_transactions)</li>
<li><strong>Description</strong> - an explanation as to what the tool does so that the LLM can understand when it might be needed.</li>
<li><strong>Parameter Schema</strong> - JSON schema definition of all the parameters, types, descriptions and constraints.</li>
<li><strong>Usage notes</strong> - additional instructions and potentially examples to guide the LLM during its tool choice.</li>
</ol>
<p>Let&rsquo;s take a look at an example from the YNAB MCP I built and discussed in <a href="/posts/2025-11-06-build-efficient-mcp-servers-three-design-principles/">Build Efficient MCP Servers: Three Design Principles</a>.</p>
<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:2;-o-tab-size:2;tab-size:2;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>    <span style="color:#cba6f7">&#34;name&#34;</span>: <span style="color:#a6e3a1">&#34;mcp__ynab__get_transactions&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#cba6f7">&#34;description&#34;</span>: <span style="color:#a6e3a1">&#34;Get transactions from YNAB budget.\n\n    Retrieves transactions with optional filtering by date
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">   range, account, or category.\n    Returns transaction details including date, amount, payee, category, and
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">  memo.\n\n    Use this tool when you need to:\n    - View recent transactions\n    - Find transactions in a
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">  specific date range\n    - Filter transactions by account or category\n    - Check transaction details for
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">  reconciliation\n\n    Args:\n        budget_id: Budget ID or &#39;last-used&#39; for default budget\n        since_date:
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">  Optional start date (YYYY-MM-DD format)\n        until_date: Optional end date (YYYY-MM-DD format)\n
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">  account_id: Optional account ID to filter by specific account\n        category_id: Optional category ID to filter
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">   by category\n        type: Optional transaction type (&#39;uncategorized&#39;, &#39;unapproved&#39;)\n\n    Returns:\n
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">  JSON array of transactions with:\n        - id: Transaction ID\n        - date: Transaction date\n        -
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">  amount: Amount in milliunits (divide by 1000 for dollars)\n        - memo: Transaction memo\n        - cleared:
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">  Cleared status\n        - approved: Approval status\n        - payee_id: Payee ID\n        - payee_name: Payee
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">  name\n        - category_id: Category ID\n        - category_name: Category name\n        - account_id: Account
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">  ID\n        - account_name: Account name\n\n    Example usage:\n        Get all transactions from November 2024:\n
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">          since_date=&#39;2024-11-01&#39;, until_date=&#39;2024-11-30&#39;\n\n        Get recent uncategorized transactions:\n
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">    type=&#39;uncategorized&#39;\n\n    Note: Amounts are returned in milliunits. Divide by 1000 to get dollar amounts.\n
</span></span></span><span style="display:flex;"><span><span style="color:#a6e3a1">   &#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#cba6f7">&#34;parameters&#34;</span>: {
</span></span><span style="display:flex;"><span>      <span style="color:#cba6f7">&#34;type&#34;</span>: <span style="color:#a6e3a1">&#34;object&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#cba6f7">&#34;properties&#34;</span>: {
</span></span><span style="display:flex;"><span>        <span style="color:#cba6f7">&#34;budget_id&#34;</span>: {
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;type&#34;</span>: <span style="color:#a6e3a1">&#34;string&#34;</span>,
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;description&#34;</span>: <span style="color:#a6e3a1">&#34;Budget ID or &#39;last-used&#39; for default budget&#34;</span>
</span></span><span style="display:flex;"><span>        },
</span></span><span style="display:flex;"><span>        <span style="color:#cba6f7">&#34;since_date&#34;</span>: {
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;type&#34;</span>: <span style="color:#a6e3a1">&#34;string&#34;</span>,
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;description&#34;</span>: <span style="color:#a6e3a1">&#34;Optional start date (YYYY-MM-DD format)&#34;</span>,
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;format&#34;</span>: <span style="color:#a6e3a1">&#34;date&#34;</span>
</span></span><span style="display:flex;"><span>        },
</span></span><span style="display:flex;"><span>        <span style="color:#cba6f7">&#34;until_date&#34;</span>: {
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;type&#34;</span>: <span style="color:#a6e3a1">&#34;string&#34;</span>,
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;description&#34;</span>: <span style="color:#a6e3a1">&#34;Optional end date (YYYY-MM-DD format)&#34;</span>,
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;format&#34;</span>: <span style="color:#a6e3a1">&#34;date&#34;</span>
</span></span><span style="display:flex;"><span>        },
</span></span><span style="display:flex;"><span>        <span style="color:#cba6f7">&#34;account_id&#34;</span>: {
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;type&#34;</span>: <span style="color:#a6e3a1">&#34;string&#34;</span>,
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;description&#34;</span>: <span style="color:#a6e3a1">&#34;Optional account ID to filter by&#34;</span>
</span></span><span style="display:flex;"><span>        },
</span></span><span style="display:flex;"><span>        <span style="color:#cba6f7">&#34;category_id&#34;</span>: {
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;type&#34;</span>: <span style="color:#a6e3a1">&#34;string&#34;</span>,
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;description&#34;</span>: <span style="color:#a6e3a1">&#34;Optional category ID to filter by&#34;</span>
</span></span><span style="display:flex;"><span>        },
</span></span><span style="display:flex;"><span>        <span style="color:#cba6f7">&#34;type&#34;</span>: {
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;type&#34;</span>: <span style="color:#a6e3a1">&#34;string&#34;</span>,
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;enum&#34;</span>: [<span style="color:#a6e3a1">&#34;uncategorized&#34;</span>, <span style="color:#a6e3a1">&#34;unapproved&#34;</span>],
</span></span><span style="display:flex;"><span>          <span style="color:#cba6f7">&#34;description&#34;</span>: <span style="color:#a6e3a1">&#34;Optional transaction type filter&#34;</span>
</span></span><span style="display:flex;"><span>        }
</span></span><span style="display:flex;"><span>      },
</span></span><span style="display:flex;"><span>      <span style="color:#cba6f7">&#34;required&#34;</span>: [<span style="color:#a6e3a1">&#34;budget_id&#34;</span>],
</span></span><span style="display:flex;"><span>      <span style="color:#cba6f7">&#34;title&#34;</span>: <span style="color:#a6e3a1">&#34;GetTransactionsArguments&#34;</span>
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>  }
</span></span></code></pre></div><p><strong>Token Breakdown</strong></p>
<table>
  <thead>
      <tr>
          <th>Component</th>
          <th>Tokens</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Tool name</td>
          <td>8</td>
      </tr>
      <tr>
          <td>Description (entire string)</td>
          <td>430</td>
      </tr>
      <tr>
          <td>Parameters schema</td>
          <td>225</td>
      </tr>
      <tr>
          <td>TOTAL</td>
          <td>~663 tokens</td>
      </tr>
  </tbody>
</table>
<p>This one tool definition takes up about 663 tokens. Not terrible on its own, but my YNAB MCP has about 15 tools. As you add more and more MCP servers to your stack you are consuming more and more of your context window from tool definitions alone. So it&rsquo;s important to be careful not to overload your coding assistant with too many MCP servers.</p>
<p>The community has been exploring new ways to make MCP servers more context efficient. One approach Anthropic has written about is allowing code execution within MCP servers. You can learn more about this in <a href="https://www.anthropic.com/engineering/code-execution-with-mcp">Code execution with MCP: Building more efficient agents</a> but the short version is instead of having an MCP server expose lots of different tools, it exposes a single tool or handful of tools which can then execute their own code in a sandboxed environment to achieve results on its own. Anthropic also recently announced a beta feature for <a href="https://www.anthropic.com/engineering/advanced-tool-use">advanced tool use</a> in Claude. One of the stand out updates here is moving away from a static tool list to being able lazily load tool definitions via a tool search tool.</p>
<p>Both of these are in their early stages so we&rsquo;ll continue to need to be careful about how many MCP servers we add to our coding agents and how much of the context window they consume. With that out of the way let&rsquo;s take a look at a real world scenario of a context window in a development environment and how we can make the best out of it.</p>
<h2 id="a-view-into-your-context-window">A View Into Your Context Window</h2>
<p>Claude Code provides us with a command we can run within a session called <code>/context</code>. This command will report back the current state of your context window including how much space everything is taking up. Let&rsquo;s take a look at the output of <code>/context</code> within <a href="http://www.tracewell.ai">Tracewell AI</a>:</p>
<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:2;-o-tab-size:2;tab-size:2;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>Context Usage
</span></span><span style="display:flex;"><span>⛁ ⛀ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   claude-sonnet-4-5-20250929 · 101k/200k tokens <span style="color:#89dceb;font-weight:bold">(</span>51%<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁
</span></span><span style="display:flex;"><span>⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀ ⛶   ⛁ System prompt: 3.1k tokens <span style="color:#89dceb;font-weight:bold">(</span>1.6%<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 19.8k tokens <span style="color:#89dceb;font-weight:bold">(</span>9.9%<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ MCP tools: 26.5k tokens <span style="color:#89dceb;font-weight:bold">(</span>13.3%<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Custom agents: 2.8k tokens <span style="color:#89dceb;font-weight:bold">(</span>1.4%<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Memory files: 4.0k tokens <span style="color:#89dceb;font-weight:bold">(</span>2.0%<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛝ ⛝ ⛝   ⛁ Messages: <span style="color:#fab387">8</span> tokens <span style="color:#89dceb;font-weight:bold">(</span>0.0%<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝   ⛶ Free space: 99k <span style="color:#89dceb;font-weight:bold">(</span>49.4%<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝   ⛝ Autocompact buffer: 45.0k tokens <span style="color:#89dceb;font-weight:bold">(</span>22.5%<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>MCP tools · /mcp
</span></span><span style="display:flex;"><span>└ mcp__memory__create_entities <span style="color:#89dceb;font-weight:bold">(</span>memory<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">686</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__memory__create_relations <span style="color:#89dceb;font-weight:bold">(</span>memory<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">689</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__memory__add_observations <span style="color:#89dceb;font-weight:bold">(</span>memory<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">668</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__memory__delete_entities <span style="color:#89dceb;font-weight:bold">(</span>memory<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">612</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__memory__delete_observations <span style="color:#89dceb;font-weight:bold">(</span>memory<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">666</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__memory__delete_relations <span style="color:#89dceb;font-weight:bold">(</span>memory<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">690</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__memory__read_graph <span style="color:#89dceb;font-weight:bold">(</span>memory<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">568</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__memory__search_nodes <span style="color:#89dceb;font-weight:bold">(</span>memory<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">607</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__memory__open_nodes <span style="color:#89dceb;font-weight:bold">(</span>memory<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">609</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__whoami <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">602</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__find_organizations <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">735</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__find_teams <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.0k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__find_projects <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">999</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__find_releases <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.2k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__get_issue_details <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.4k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__get_trace_details <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.3k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__get_event_attachment <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.3k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__update_issue <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.5k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__search_events <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.5k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__find_dsns <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.0k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__analyze_issue_with_seer <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.3k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__search_docs <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.8k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__get_doc <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">768</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__search_issues <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: 1.5k tokens
</span></span><span style="display:flex;"><span>└ mcp__sentry__use_sentry <span style="color:#89dceb;font-weight:bold">(</span>sentry<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">968</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__context7__resolve-library-id <span style="color:#89dceb;font-weight:bold">(</span>context7<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">887</span> tokens
</span></span><span style="display:flex;"><span>└ mcp__context7__get-library-docs <span style="color:#89dceb;font-weight:bold">(</span>context7<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">957</span> tokens
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>Custom agents · /agents
</span></span><span style="display:flex;"><span>└ rails-backend-expert <span style="color:#89dceb;font-weight:bold">(</span>Project<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">444</span> tokens
</span></span><span style="display:flex;"><span>└ cybersecurity-expert <span style="color:#89dceb;font-weight:bold">(</span>Project<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">287</span> tokens
</span></span><span style="display:flex;"><span>└ prompt-engineer <span style="color:#89dceb;font-weight:bold">(</span>Project<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">609</span> tokens
</span></span><span style="display:flex;"><span>└ tailwind-viewcomponent-expert <span style="color:#89dceb;font-weight:bold">(</span>Project<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">417</span> tokens
</span></span><span style="display:flex;"><span>└ product-strategy-advisor <span style="color:#89dceb;font-weight:bold">(</span>Project<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">608</span> tokens
</span></span><span style="display:flex;"><span>└ regulatory-510k-consultant <span style="color:#89dceb;font-weight:bold">(</span>Project<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">459</span> tokens
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>Memory files · /memory
</span></span><span style="display:flex;"><span>└ User <span style="color:#89dceb;font-weight:bold">(</span>/home/dgalarza/.claude/CLAUDE.md<span style="color:#89dceb;font-weight:bold">)</span>: <span style="color:#fab387">10</span> tokens
</span></span><span style="display:flex;"><span>└ Project <span style="color:#89dceb;font-weight:bold">(</span>/home/dgalarza/Code/tracewell.ai/CLAUDE.md<span style="color:#89dceb;font-weight:bold">)</span>: 4.0k tokens
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>SlashCommand Tool · <span style="color:#fab387">16</span> commands
</span></span><span style="display:flex;"><span>└ Total: 2.7k tokens
</span></span></code></pre></div><p>As you can see this gives us a nice detailed view of our context window, including what percentage of the context window is currently available and a breakdown of what is taking up space. From it we can see that my MCP tools are taking up 26.5k tokens which is about 13.3% of the Claude Sonnet 4.5 context window. Aside from that, we can see that the Custom agents that are defined and available are taking up about 2.8k tokens, my project&rsquo;s CLAUDE.md is 4k tokens and about 22% of the context window is reserved for autocompacting.</p>
<h3 id="what-is-autocompacting">What is autocompacting?</h3>
<p>In order to understand autocompacting we first need to understand how a typical conversation flows within the Anthropic API. By default, every call to the Anthropic Claude API has no recollection of previous parts of a conversation. Instead as the consumer of the API we need maintain that conversation history and provide it to the API. Take a look at the following diagram:</p>
<p><img src="/images/posts/claude-conversation.png" alt="Diagram illustrating how Claude Code maintains conversation history across API requests, showing message flow and context accumulation"></p>
<p>You can see that the first request kicks off the conversation with &ldquo;Add error handling to the auth module&rdquo;. From there we get a response back from the LLM with the result of what it did. When the user then continues the conversation in request 2, we can see they say &ldquo;Now add tests for those changes&rdquo;. You can see here though that we actually end up sending the full conversation history, with our first message, along with the response from the LLM and now our new message. This is a simplified example which doesn&rsquo;t include tool calling. Any tool call requests would also be in this history as well as the results from tool calling. As your conversation gets longer and longer, more and more of the context window is being taken up. As you approach the limit of the context window space must be freed up. One way to do this is compaction.</p>
<p>Compacting the context window is a context engineering technique to compress a long running conversation or session by summarizing the conversation in order to free up space. This summarization is typically handled by an LLM. This generated summary then becomes the basis of the remainder of the conversation. Compacting the conversation history can sometimes work well. However it&rsquo;s not an exact science and you are beholden to the LLM to identify the correct things to include in the summary. If you&rsquo;ve ever had a long running conversation with Claude Code and started feeling like things have started to go off the rails, you might have experienced this. In the long conversation you might end up with multiple autocompact calls where now the LLM is summarizing a summarization along with the rest of the conversation.</p>
<p><strong>Warning signs of problematic autocompact:</strong></p>
<ul>
<li>Claude forgets decisions you made earlier in the conversation</li>
<li>Claude repeats work it already completed</li>
<li>Claude asks questions you already answered</li>
<li>Solutions start contradicting earlier approaches</li>
</ul>
<p>When you notice these symptoms, it&rsquo;s usually time for a <code>/clear</code> and a fresh start rather than continuing to fight against a degraded context.</p>
<h2 id="managing-your-context-window">Managing Your Context Window</h2>
<p>Now that we understand what the context window is, how a conversation&rsquo;s history occurs and how it impacts the context window let&rsquo;s explore different ways to manage the context window to make the most out of it.</p>
<h3 id="delegating-to-subagents">Delegating to Subagents</h3>
<p>Claude Code has the ability to spin off &ldquo;subagents&rdquo; when it&rsquo;s working. These subagents each have their own context window which is separate from the main conversation. This gives us two advantages. First, the subagent&rsquo;s context window isn&rsquo;t cluttered with our previous conversation history. Second, and this is the flip side, our main conversation isn&rsquo;t cluttered with all the details of whatever the subagent was instructed to work on. Instead, it reports back its results. You can see this in action with Claude Opus 4.5 whenever you plan something. It typically delegates its tasks out to subagents to help aid with the plan.</p>
<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:2;-o-tab-size:2;tab-size:2;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>⏺ <span style="color:#fab387">3</span> Explore agents finished <span style="color:#89dceb;font-weight:bold">(</span>ctrl+o to expand<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>   ├─ Explore Tracewell Agent workflow · <span style="color:#fab387">23</span> tool uses · 104.5k tokens
</span></span><span style="display:flex;"><span>   │  ⎿ Done
</span></span><span style="display:flex;"><span>   ├─ Explore Tracewell DHF extractions · <span style="color:#fab387">28</span> tool uses · 108.0k tokens
</span></span><span style="display:flex;"><span>   │  ⎿ Done
</span></span><span style="display:flex;"><span>   └─ Explore <span style="color:#89dceb">eval</span> framework · <span style="color:#fab387">24</span> tool uses · 101.8k tokens
</span></span><span style="display:flex;"><span>      ⎿ Done
</span></span></code></pre></div><p>You can also instruct Claude to invoke a subagent explicitly. Some examples:</p>
<ul>
<li>&ldquo;Have a subagent do a code review of this branch against main&rdquo;</li>
<li>&ldquo;Use a subagent to explore how authentication works in this codebase&rdquo;</li>
<li>&ldquo;Spawn a subagent to research different caching strategies for this use case&rdquo;</li>
</ul>
<p>When the subagent completes, you&rsquo;ll see a summary like this in your main conversation:</p>
<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:2;-o-tab-size:2;tab-size:2;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>⏺ Task agent finished · <span style="color:#fab387">15</span> tool uses · 52.3k tokens
</span></span><span style="display:flex;"><span>  ⎿ The code review found <span style="color:#fab387">3</span> issues: <span style="color:#89dceb;font-weight:bold">[</span>summary of findings...<span style="color:#89dceb;font-weight:bold">]</span>
</span></span></code></pre></div><p>Notice that the subagent used 52k tokens of its own context, but your main conversation only receives the summary. This is the key benefit: the detailed work happens in isolation.</p>
<p>I&rsquo;ve found subagents work best for self-contained tasks that require reading lots of files. Code reviews are a natural fit. The subagent can dig through diffs without polluting your main context. The same goes for codebase exploration when you&rsquo;re trying to understand how an unfamiliar feature works across multiple modules. Research tasks also work well here; you can have a subagent investigate implementation options and report back before you commit to an approach.</p>
<h3 id="using-custom-agents">Using Custom Agents</h3>
<p>Custom agents take subagents to another level. They allow us to define a custom agent with a persona and expertise area which makes use of the same functionality of subagents where they have their own context window. Additionally we can also define what tools it has access to. This is useful if you are defining an agent that you know doesn&rsquo;t need specific tools so their tool definitions don&rsquo;t need to take space in the context window.</p>
<p>An agent is a markdown file which lives in either <code>~/.claude/agents</code> or <code>.claude/agents</code>. You can provide it a name, a description, a model, and tools which it is allowed to use. This is all handled via YAML frontmatter. After the frontmatter you define the agent itself.</p>
<p>Let&rsquo;s take a look at a practical example.</p>
<p>In Tracewell I have defined a few subagents that you can see in the earlier <code>/context</code> output. The <code>rails-backend-expert</code> doesn&rsquo;t need access to the Linear MCP so I can choose not to give the agent access to it or any of its tools. This is handled by setting an allow list of what tools you want to give the model access to:</p>
<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:2;-o-tab-size:2;tab-size:2;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#fab387">---</span>
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">name</span>: rails-backend-expert
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">description</span>: Use this agent when working on Ruby on Rails backend code, including models, controllers, services, jobs, database migrations, API endpoints, background processing, or any server-side Ruby logic.
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">tools</span>: Bash, Glob, Grep, Read, Edit, Write, NotebookEdit, WebFetch, TodoWrite, WebSearch, BashOutput, KillShell, AskUserQuestion, Skill, SlashCommand, mcp__memory__create_entities, mcp__memory__create_relations, mcp__memory__add_observations, mcp__memory__delete_entities, mcp__memory__delete_observations, mcp__memory__delete_relations, mcp__memory__read_graph, mcp__memory__search_nodes, mcp__memory__open_nodes, mcp__context7__resolve-library-id, mcp__context7__get-library-docs
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">model</span>: sonnet
</span></span><span style="display:flex;"><span><span style="color:#fab387">---</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>You are a Ruby on Rails backend expert. Your role is to help with...
</span></span></code></pre></div><p>The agent&rsquo;s full persona and instructions follow after the frontmatter. I recommend using the <code>/agents</code> command to get started. From there Claude will walk you through creating your first agent. When doing so Claude will ask you if you want Claude to generate or manually configure the agent. I recommend going with its recommended approach which is to have Claude create the agent. You can provide a high level prompt and it will then generate the full agent description for you. As part of the wizard for creating the agent Claude will ask you what tools you want the agent to have access to.</p>
<h3 id="claude-skills">Claude Skills</h3>
<p>In October 2025 Anthropic announced <a href="https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills">Agent Skills</a> a way of encapsulating domain expertise or workflows for agents to follow. Skills are organized in folders with a core <code>SKILL.md</code> file which has frontmatter that has required metadata such as the name and the description. The body of the <code>SKILL.md</code> contains the instruction set of the skill itself.</p>
<p>When Claude Code starts, it loads the name and description of every skill available into its context via the system prompt. This allows Claude to use progressive disclosure in determining when to use a skill without loading the entire thing into its context window. This can be a powerful tool that can even potentially replace some MCP servers. This is possible because skills can also contain scripts that Claude can run. Instead of having to always expose tools into the context window via an MCP server you can provide a skill which has scripts that it can run that only get added to the agent&rsquo;s context window when it is useful.</p>
<p>A great example of this is the <a href="https://github.com/lackeyjb/playwright-skill">Playwright Skill for Claude Code</a> by Bryan Lackey. Previously if you wanted to easily add Playwright to Claude Code for interfacing with your web application, you&rsquo;d add the <a href="https://github.com/microsoft/playwright-mcp">playwright-mcp</a>. The playwright-mcp adds 22 tools which consume about 14.3k tokens, which is 7.2% of your context window just by being available.</p>
<p>The skill, by contrast, only adds about 200 tokens at startup for its name and description. The full SKILL.md (around 4-5k tokens) only loads when you actually invoke the skill. If you use Playwright in maybe one out of every five sessions, you&rsquo;re saving roughly 10k tokens in the sessions where you don&rsquo;t need it.</p>
<h3 id="using-clear">Using clear</h3>
<p>Another tool at your disposal is to use the <code>/clear</code> command often. This command resets / empties the context window providing a fresh start. I highly recommend that you do this often especially when you have completed a distinct task and are moving onto a new one where the previous conversation history is no longer needed or useful.</p>
<h3 id="compacting-the-conversation-manually">Compacting the conversation manually</h3>
<p>Along with autocompact you can also manually choose when to compact a conversation. You can do this by running <code>/compact</code>. It takes an optional argument which is instructions on how Claude should perform the compaction. You can guide Claude to make sure that it captures certain information while generating its summary and compacting the conversation. I recommend this when you have made significant progress on your work and are moving onto some related work. Perhaps Claude broke up the work into multiple phases and you just completed phase 1. You could:</p>
<ol>
<li>Use <code>/clear</code> to reset the context window. However, if you didn&rsquo;t persist the plan / TODO list somewhere you&rsquo;ll start from scratch.</li>
<li>Continue until autocompact kicks in and you let the LLM do the heavy lifting of summarizing / compacting the conversation.</li>
</ol>
<p>Instead, I&rsquo;d recommend using the <code>/compact</code> command and instruct Claude to summarize the progress you&rsquo;ve made so far and start with a &ldquo;fresh&rdquo; context window on the next phase of work. I say &ldquo;fresh&rdquo; since we aren&rsquo;t fully clearing the context window but are compressing the previous conversation.</p>
<h3 id="being-strategic-about-file-reads">Being Strategic About File Reads</h3>
<p>It&rsquo;s easy to overlook how quickly file reads consume context. Every time Claude reads a file, that content gets added to the conversation history. Large files, broad grep results, or reading several files in sequence can eat through your available context faster than you&rsquo;d expect.</p>
<p>A few things I&rsquo;ve learned to do:</p>
<ul>
<li>When I know roughly where something is, I&rsquo;ll point Claude to specific line ranges rather than having it read entire files. For example: &ldquo;Look at the <code>authenticate</code> method in <code>app/services/auth_service.rb</code> around lines 45-80&rdquo; instead of just &ldquo;check the auth service&rdquo;</li>
<li>I try to use targeted grep patterns before asking Claude to read files. Narrowing down candidates first means fewer files loaded into context. For example, instead of &ldquo;find where we handle webhook failures&rdquo;, I might say &ldquo;grep for <code>webhook.*fail</code> or <code>handle.*webhook</code> in app/services/ and show me the matches before reading any files.&rdquo; This way Claude identifies the 2-3 relevant files first rather than speculatively reading 10 service files looking for the right one.</li>
<li>For orientation questions like &ldquo;what does this module do?&rdquo;, asking Claude to summarize rather than read the whole thing can save significant tokens</li>
</ul>
<p>This becomes especially important in larger codebases where a single exploration session can involve dozens of file reads.</p>
<h3 id="optimizing-your-claudemd">Optimizing Your CLAUDE.md</h3>
<p>Your project&rsquo;s <code>CLAUDE.md</code> file loads into every conversation, so it&rsquo;s worth keeping it lean. Looking back at my <code>/context</code> output, my project&rsquo;s CLAUDE.md takes up 4k tokens, which is 2% of my context window before I&rsquo;ve even started working.</p>
<p>A few things to keep in mind:</p>
<ul>
<li>Bullet points tend to be more token-efficient than prose</li>
<li>Put the most critical instructions at the beginning since Claude pays more attention to the start and end of content (that &ldquo;lost in the middle&rdquo; problem again)</li>
<li>Consider whether instructions belong at the project level or could live in your user-level <code>~/.claude/CLAUDE.md</code> instead</li>
<li>Periodically audit for outdated instructions that no longer apply</li>
</ul>
<p>It&rsquo;s a balancing act. You want enough context for Claude to understand your project&rsquo;s conventions, but not so much that you&rsquo;re burning tokens on rarely-relevant details.</p>
<h2 id="best-practices-for-context-window-management">Best Practices for Context Window Management</h2>
<ol>
<li><strong>Monitor regularly</strong> - Run <code>/context</code> at the start of each session to understand your baseline usage</li>
<li><strong>Audit your MCP servers</strong> - Remove any MCP servers you haven&rsquo;t used recently; each one consumes tokens just by existing</li>
<li><strong>Prefer skills over MCP servers</strong> - When building new functionality, consider skills first for better context efficiency through progressive disclosure</li>
<li><strong>Clear between tasks</strong> - Use <code>/clear</code> liberally when switching between unrelated work</li>
<li><strong>Strategic compacting</strong> - Use <code>/compact</code> with custom instructions when transitioning between related phases of work</li>
<li><strong>Delegate complex work</strong> - Use subagents for self-contained tasks to keep their context isolated from your main conversation</li>
</ol>
<blockquote>
<p><strong>Running a team on Claude Code?</strong> Context window management gets
harder with 5+ engineers making different choices about MCP servers,
CLAUDE.md conventions, and workflow patterns. A
<a href="/services/#retainer">Production AI Retainer</a>
standardizes this across your team.</p></blockquote>
<h2 id="conclusion">Conclusion</h2>
<p>Context management isn&rsquo;t just about avoiding limits; it&rsquo;s about keeping your conversations focused and effective. A cluttered context window leads to degraded responses, just like a cluttered desk makes it harder to find what you need.</p>
<p>The key takeaways: monitor your usage with <code>/context</code>, delegate to subagents for isolated work, and use <code>/clear</code> liberally between tasks. When possible, prefer skills over MCP servers for better context efficiency through progressive disclosure.</p>
<p>Start by running <code>/context</code> in your next Claude Code session to see where your tokens are going. You might be surprised by what you find.</p>
<p><strong>Update:</strong> With Claude Opus 4.7&rsquo;s 1M token context window, the fundamentals here still apply but the ceiling and controls have changed. See <a href="/posts/2026-04-30-claude-opus-4-7-claude-code-tips-extended-context/">7 Practical Tips for Maximizing Extended Context</a> for workflow adjustments specific to the larger window.</p>
<blockquote>
<p>If this post was the explanation, the cheat sheet is the reference.
Two sides: token costs for common MCPs on one, the <code>/clear</code> /
<code>/compact</code> / subagent decision tree on the other.</p>
<p><a href="/context-window-cheat-sheet/">Get the Context Window Cheat Sheet →</a></p></blockquote>
]]></content:encoded></item><item><title>How I Use Claude Code: My Complete Development Workflow</title><link>https://www.damiangalarza.com/posts/2025-11-25-how-i-use-claude-code/</link><pubDate>Tue, 25 Nov 2025 00:00:00 -0500</pubDate><author>Damian Galarza</author><guid>https://www.damiangalarza.com/posts/2025-11-25-how-i-use-claude-code/</guid><description>After 8 months with Claude Code, here's my complete workflow. Learn how I combine Linear, MCP servers, and Obsidian for AI-assisted development that works.</description><content:encoded><![CDATA[<p>For the past 8 months I&rsquo;ve been using Claude Code as my daily driver. It&rsquo;s become a core part of my development workflow. Before this I tried Cursor for a few months and enjoyed it. However, I&rsquo;ve been a terminal/Vim user for quite a while, so moving to an IDE was a significant change. I found myself drawn to Claude Code&rsquo;s agentic workflow rather than autocomplete or chat panels.</p>
<p>During this time my workflow has evolved significantly. This is partly from learning how to get the most out of it, but also from the Anthropic team&rsquo;s continuous improvements to the product. New features are coming out at a rapid pace.</p>
<p>There&rsquo;s an ongoing debate in our industry. Some developers swear by AI assistants while others remain skeptical. You hear stories about companies claiming developers are no longer needed, alongside dismissals that AI-generated code is always garbage. I find myself somewhere in the middle.</p>
<p>I believe using these tools is a skill in and of itself. When people tell me &ldquo;it takes longer to get the LLM to do it right&rdquo; or &ldquo;I can do it faster myself,&rdquo; I understand where they&rsquo;re coming from. When I first started programming, I was slow too. But I got faster with practice. The same applies to working with agentic development tools.</p>
<p>This post walks through my typical Claude Code workflow. While I focus on Claude Code specifically, these concepts apply to many agentic coding tools.</p>
<h2 id="context-is-king">Context is King</h2>
<p>One of the biggest complaints I hear from developers goes something like this: &ldquo;I tried using an AI assistant but it just wouldn&rsquo;t get it right. I spent so much time trying to get it to do what I wanted and eventually gave up.&rdquo;</p>
<p>I&rsquo;ve written about <a href="/posts/2025-11-06-build-efficient-mcp-servers-three-design-principles/">how MCP tools consume the context window</a> before. But context matters in other ways too.</p>
<p>When I dig deeper into these frustrations, I typically ask how they prompted the LLM. The answer is usually a fairly vague prompt. In a smaller codebase this might work fine, but in an established codebase it often falls short. We need to give the LLM a well-structured problem.</p>
<p>One thing I&rsquo;ve learned is that developers who have experience managing or delegating tasks tend to adapt quickly. They already understand how to break down problems into small pieces for someone else to work on. This is why I spend time breaking down problems into bite-sized chunks—a common practice in agile development.</p>
<p>For example, while building <a href="https://www.tracewell.ai">Tracewell AI</a> I work with Linear for issue tracking. Even though I&rsquo;m typically working alone, being disciplined about creating issues pays off. I often use Claude via the desktop app or terminal to scope out work, break down problems, and create Linear issues. This upfront work makes implementation much smoother.</p>
<h2 id="tools-i-use">Tools I Use</h2>
<p>My Claude Code setup relies on a few key tools that work together to provide rich context. Each addresses a different aspect of development—project management, error tracking, version control, and memory—creating a network of information that Claude can draw from when planning and implementing features.</p>
<h3 id="linear-mcp-server">Linear MCP Server</h3>
<p>The <a href="https://linear.app/docs/mcp">Linear MCP Server</a> is a backbone of my workflow. It gives Claude direct access to project issues, enabling both the creation of backlog items and the delegation of implementation tasks.</p>
<h3 id="sentry-mcp-server">Sentry MCP Server</h3>
<p>I use Sentry for error tracking, so the <a href="https://docs.sentry.io/product/sentry-mcp/">Sentry MCP</a> is a natural addition. It allows me to point Claude at an exception for triaging or fixing. While I have Sentry connected to Linear for automatic issue creation, the MCP integration adds another layer of context when investigating errors. If you want to see this workflow in action, check out my video on <a href="https://youtu.be/GfDczm2xJ1M">Debugging Production Issues with AI</a>.</p>
<h3 id="github-cli">GitHub CLI</h3>
<p>This one is critical. If you&rsquo;ve read the <a href="https://www.anthropic.com/engineering/claude-code-best-practices">Claude Code Best Practices</a> you&rsquo;ve likely seen the recommendation to install the <a href="https://cli.github.com/">GitHub CLI</a> (<code>gh</code>). If you haven&rsquo;t read that guide, I highly recommend starting there.</p>
<p>Claude Code excels at using the GitHub CLI for tasks like:</p>
<ol>
<li>Opening pull requests</li>
<li>Investigating GitHub issues</li>
<li>Debugging GitHub Action runs</li>
<li>Reviewing PR feedback</li>
<li>Performing code review on others&rsquo; pull requests</li>
</ol>
<h3 id="memory-mcp-server">Memory MCP Server</h3>
<p>The <a href="https://github.com/modelcontextprotocol/servers/tree/main/src/memory">Memory MCP Server</a> provides Claude with persistent memory across conversations. In my workflow, I use it to store implementation plans so Claude can track progress and maintain context throughout a feature&rsquo;s development. When Claude creates a plan for a Linear issue, it saves it to the memory graph. This becomes especially useful when work spans multiple sessions.</p>
<p>With these tools in place, let&rsquo;s look at another core part of my workflow.</p>
<h2 id="obsidian-notes">Obsidian Notes</h2>
<p>I&rsquo;ve been using Obsidian for notes for over a year, but it never occurred to me to connect it to Claude Code until I heard the Every podcast episode with Noah Brier: <a href="https://every.to/podcast/how-to-use-claude-code-as-a-thinking-partner">How to Use Claude Code as a Second Brain</a>. This significantly changed how I provide context to my development work.</p>
<p>Why is this connection so important? When I&rsquo;m working on a project, I&rsquo;m taking notes. At a project kick-off I&rsquo;m capturing potential solutions, key pieces of code, and product knowledge. These notes go into my vault under paths like <code>01-Projects/DHF Extraction/2025-11-01-Pairing Session.md</code>. Meeting transcripts end up in the same project folder.</p>
<p>When it&rsquo;s time to implement, I put Claude in plan mode and instruct it to &ldquo;Review my notes in 01-Projects/DHF Extraction and help me implement X.&rdquo; Claude can now gather all the context I&rsquo;ve assembled to inform its implementation plan.</p>
<blockquote>
<p>If you want to learn more about how I process meeting notes in Obsidian, check out my <a href="https://github.com/dgalarza/claude-code-workflows/tree/main/.claude/skills/process-meeting-transcript">Process Meeting Transcript Skill</a> on GitHub.</p></blockquote>
<p>To make the most of this, use the <code>/add-dir</code> command to add your Obsidian vault path. This allows Claude Code to reference files in your vault without permission issues.</p>
<h2 id="putting-it-all-together">Putting It All Together</h2>
<p>With MCP servers handling project management, error tracking, and memory, plus Obsidian providing my accumulated notes and research, I have all the pieces needed for a comprehensive workflow. All of these tools come together in a <a href="https://www.claude.com/blog/skills">Claude Agent Skill</a> that takes a Linear issue by ID and implements a solution. Let me break down this skill.</p>
<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:2;-o-tab-size:2;tab-size:2;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span><span style="color:#fab387;font-weight:bold"># Overview
</span></span></span><span style="display:flex;"><span><span style="color:#fab387;font-weight:bold"></span>
</span></span><span style="display:flex;"><span>This skill provides a comprehensive workflow for implementing Linear issues with professional software engineering practices. It automates the entire development lifecycle from issue analysis through PR creation, ensuring quality through test-driven development, parallel code reviews, and systematic validation.
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#fab387;font-weight:bold">## When to Use This Skill
</span></span></span><span style="display:flex;"><span><span style="color:#fab387;font-weight:bold"></span>
</span></span><span style="display:flex;"><span>Use this skill when:
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">-</span> User provides a Linear issue ID (format: <span style="color:#a6e3a1">`TRA-9`</span>, <span style="color:#a6e3a1">`DEV-123`</span>, etc.)
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">-</span> User requests implementation of a Linear issue
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">-</span> User wants a structured TDD approach with code review
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">-</span> User needs automated workflow from issue to PR
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>Examples:
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">-</span> &#34;Implement TRA-142&#34;
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">-</span> &#34;Help me build the feature in DEV-89&#34;
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">-</span> &#34;Work on Linear issue ABC-456&#34;
</span></span></code></pre></div><p>This sets the stage for what the skill does and when to invoke it. Now let&rsquo;s look at the core workflow.</p>
<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:2;-o-tab-size:2;tab-size:2;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span><span style="color:#fab387;font-weight:bold"># Core Workflow
</span></span></span><span style="display:flex;"><span><span style="color:#fab387;font-weight:bold"></span>
</span></span><span style="display:flex;"><span>The skill follows a 14-step process:
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">1.</span> <span style="font-weight:bold">**Fetch Linear Issue**</span> - Retrieve complete issue details via Linear MCP
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">2.</span> <span style="font-weight:bold">**Gather Additional Context**</span> - Search Obsidian, Sentry, and GitHub for related information
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">3.</span> <span style="font-weight:bold">**Move to In Progress**</span> - Update issue status to indicate active work
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">4.</span> <span style="font-weight:bold">**Create Feature Branch**</span> - Use Linear&#39;s suggested git branch naming
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">5.</span> <span style="font-weight:bold">**Analyze &amp; Plan**</span> - Break down requirements and create implementation plan
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">6.</span> <span style="font-weight:bold">**Save to Memory**</span> - Store plan in memory graph for tracking
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">7.</span> <span style="font-weight:bold">**Review Plan**</span> - Present plan for user confirmation
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">8.</span> <span style="font-weight:bold">**TDD Implementation**</span> - Invoke <span style="color:#a6e3a1">`tdd-workflow`</span> skill for test-driven development
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">9.</span> <span style="font-weight:bold">**Parallel Code Reviews**</span> - Invoke <span style="color:#a6e3a1">`parallel-code-review`</span> skill for comprehensive analysis
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">10.</span> <span style="font-weight:bold">**Address Feedback**</span> - Invoke <span style="color:#a6e3a1">`code-review-implementer`</span> skill to systematically fix issues
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">11.</span> <span style="font-weight:bold">**Validation**</span> - Ensure all tests and linters pass
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">12.</span> <span style="font-weight:bold">**Logical Commits**</span> - Create meaningful commit history
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">13.</span> <span style="font-weight:bold">**Create PR**</span> - Generate comprehensive pull request with Linear linking
</span></span><span style="display:flex;"><span><span style="color:#cba6f7">14.</span> <span style="font-weight:bold">**Final Verification**</span> - Confirm CI/CD pipeline and Linear integration
</span></span></code></pre></div><p>There&rsquo;s a lot happening here, but the goal is straightforward: build as much context as possible before implementation begins. The workflow pulls in details from the Linear issue, related Obsidian notes, Sentry exceptions if relevant, and any linked GitHub discussions. For example, a Linear issue might have been extracted from a previous pull request discussion as a follow-up task—pulling that context in gives Claude a much better starting point.</p>
<p>One thing worth highlighting: step 7 (Review Plan) is a key part of this workflow. After gathering context and creating a plan, Claude presents it and <em>waits for my approval</em> before writing any code. This human-in-the-loop checkpoint prevents runaway implementations and gives me a chance to course-correct before significant work begins.</p>
<p>You&rsquo;ll notice a few other skills referenced in the workflow. These are also available in the <a href="https://github.com/dgalarza/claude-code-workflows/tree/main/.claude/skills">claude-code-workflows</a> repo:</p>
<p><strong>tdd-workflow skill</strong>
A skill that outlines a test-driven development workflow following an outside-in testing approach.</p>
<p><strong>parallel-code-review</strong>
This workflow spins off two Claude sub-agents to perform code review in parallel. One focuses on Rails and object-oriented best practices while the other performs security analysis.</p>
<p><strong>code-review-implementer</strong>
A skill that ranks code review feedback by priority and systematically addresses it. High priority feedback is always addressed. Medium and low priority items are presented for my decision before implementation.</p>
<h2 id="getting-started">Getting Started</h2>
<p>If you want to try this workflow yourself, here&rsquo;s how to get started:</p>
<ol>
<li>
<p><strong>Install the MCP servers</strong> - Set up Linear, Sentry (if you use it), and Memory MCP servers in your Claude Code configuration.</p>
</li>
<li>
<p><strong>Copy the skills</strong> - Clone or copy the skills from my <a href="https://github.com/dgalarza/claude-code-workflows">claude-code-workflows</a> repo into your project&rsquo;s <code>.claude/skills/</code> directory. You&rsquo;ll need <code>linear-implement</code> and its dependencies (<code>tdd-workflow</code>, <code>parallel-code-review</code>, <code>code-review-implementer</code>).</p>
</li>
<li>
<p><strong>Customize for your stack</strong> - My skills are tailored to Rails projects with specific conventions (POODR principles, Result pattern, RSpec). If you&rsquo;re using Django, Node, Go, or another stack, you&rsquo;ll want to adapt the code review criteria and testing workflows to match your conventions.</p>
</li>
<li>
<p><strong>Connect your notes</strong> - Use <code>/add-dir</code> to add your Obsidian vault (or wherever you keep project notes) so Claude can reference them.</p>
</li>
<li>
<p><strong>Try it out</strong> - Once everything is set up, just type &ldquo;Implement TRA-142&rdquo; (substituting your issue ID) and the workflow kicks off automatically.</p>
</li>
</ol>
<p>Claude Code auto-discovers skills in the <code>.claude/skills/</code> directory, so there&rsquo;s no additional configuration needed beyond placing the files.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Getting value from agentic development tools requires building the right habits. By investing time upfront in breaking down problems, maintaining good notes, and connecting your tools together, you can create workflows that dramatically improve your productivity.</p>
<p>The key insight is that context matters. The more relevant information you can surface for the LLM, the better its output will be. This is true whether you&rsquo;re using Claude Code, Cursor, or any other AI-assisted development tool.</p>
<p>If you&rsquo;re interested in the full skill, you can find it in my <a href="https://github.com/dgalarza/claude-code-workflows/tree/main/.claude/skills/linear-implement">claude-code-workflows</a> repo on GitHub.</p>
<h2 id="further-reading">Further Reading</h2>
<ul>
<li><a href="https://youtu.be/Q7YR5-KtgJU">Getting Started with Claude Code</a> - Video walkthrough for those new to Claude Code</li>
<li><a href="https://www.anthropic.com/engineering/claude-code-best-practices">Claude Code: Best Practices for agentic coding</a></li>
<li><a href="https://every.to/podcast/how-to-use-claude-code-as-a-thinking-partner">How to Use Claude Code as a Second Brain</a></li>
<li><a href="https://www.youtube.com/watch?v=qizQkByZ4WM&amp;t=1246s">Forward Deployed, Episode 2: Claude Code Skills and the Progressive Disclosure Problem</a></li>
<li><a href="https://www.youtube.com/watch?v=-uW5-TaVXu4">Most devs don&rsquo;t understand how context windows work</a></li>
</ul>
<hr>
<p>If you&rsquo;re looking to build a workflow like this for your team, I offer coaching and workshops on Claude Code. <a href="/claude-code/">See how I can help</a>.</p>
]]></content:encoded></item></channel></rss>