<?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>Tmux on Masutaka&#39;s ChangeLog Memo</title>
    <link>https://masutaka.net/en/tags/tmux/</link>
    <description>Recent content in Tmux on Masutaka&#39;s ChangeLog Memo</description>
    <generator>Hugo -- 0.138.0</generator>
    <language>en</language>
    <lastBuildDate>Sun, 12 Apr 2026 17:00:44 +0900</lastBuildDate>
    <atom:link href="https://masutaka.net/en/tags/tmux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>[2026-04] How I Currently Use Claude Code</title>
      <link>https://masutaka.net/en/2026-04-12-1/</link>
      <pubDate>Sun, 12 Apr 2026 17:00:44 +0900</pubDate>
      <guid>https://masutaka.net/en/2026-04-12-1/</guid>
      <description>&lt;p&gt;Here&amp;rsquo;s a summary of how I currently use &lt;a href=&#34;https://github.com/anthropics/claude-code&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Claude Code&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;I previously introduced a Claude Code book in &lt;a href=&#34;https://masutaka.net/2026-01-16-1/&#34;&gt;[2026-01-16-1]&lt;/a&gt;
, but this time I&amp;rsquo;ll write about my own workflow.&lt;/p&gt;
&lt;h2 id=&#34;development-environment&#34;&gt;Development Environment&lt;/h2&gt;
&lt;p&gt;I work on my MacBook&amp;rsquo;s built-in display. I&amp;rsquo;m not really someone who uses external monitors.&lt;/p&gt;
&lt;p&gt;I display the macOS built-in Terminal.app in full screen and use &lt;a href=&#34;https://github.com/tmux/tmux&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;tmux&lt;/a&gt;
. I don&amp;rsquo;t split tmux windows—instead, I switch between tabs (windows). I haven&amp;rsquo;t (yet?) switched to &lt;a href=&#34;https://github.com/ghostty-org/ghostty&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Ghostty&lt;/a&gt;
 or &lt;a href=&#34;https://github.com/gnachman/iTerm2&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;iTerm2&lt;/a&gt;
.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Here&rsquo;s a summary of how I currently use <a href="https://github.com/anthropics/claude-code" target="_blank" rel="noopener">Claude Code</a>
.</p>
<p>I previously introduced a Claude Code book in <a href="/2026-01-16-1/">[2026-01-16-1]</a>
, but this time I&rsquo;ll write about my own workflow.</p>
<h2 id="development-environment">Development Environment</h2>
<p>I work on my MacBook&rsquo;s built-in display. I&rsquo;m not really someone who uses external monitors.</p>
<p>I display the macOS built-in Terminal.app in full screen and use <a href="https://github.com/tmux/tmux" target="_blank" rel="noopener">tmux</a>
. I don&rsquo;t split tmux windows—instead, I switch between tabs (windows). I haven&rsquo;t (yet?) switched to <a href="https://github.com/ghostty-org/ghostty" target="_blank" rel="noopener">Ghostty</a>
 or <a href="https://github.com/gnachman/iTerm2" target="_blank" rel="noopener">iTerm2</a>
.</p>
<p>My editor is <a href="https://www.gnu.org/software/emacs/" target="_blank" rel="noopener">Emacs</a>
. Before Claude Code came along, I had tried switching to VSCode several times and given up each time, but now I no longer need to think about it. What a relief.</p>
<p>On a related note, Emacs&rsquo;s <code>global-auto-revert-mode</code> is really handy. When Claude Code edits a file that&rsquo;s open in Emacs, the buffer automatically refreshes. Here&rsquo;s <a href="https://github.com/masutaka/dotfiles-public/blob/44515ec73117fa32f310358e003db22399d9f222/.emacs.d/init.el#L1646-L1649" target="_blank" rel="noopener">my configuration</a>
.</p>
<p>For the Claude Code model, I use Opus 4.6 (1M context) both personally and at work. I basically don&rsquo;t use Sonnet. My personal Claude plan alternates between Pro and Max, and on Max I get the 1M context.</p>
<h2 id="workflow">Workflow</h2>
<p>I follow a 3-step workflow starting from GitHub Issues.</p>
<h3 id="1-creating-a-work-plan">1. Creating a Work Plan</h3>
<p>The starting point is a custom skill (slash command) called <a href="https://github.com/masutaka/dotfiles-public/tree/44515ec73117fa32f310358e003db22399d9f222/.claude/skills/create-plan-for-gh-issue/SKILL.md" target="_blank" rel="noopener"><code>/create-plan-for-gh-issue</code></a>
.</p>
<p>It creates a work plan as a Markdown file based on the content of a GitHub Issue. The Issue can be for creating a PR, doing research, or anything else.</p>
<p>The key is to write the necessary information in the Issue. It can go in the description or comments, and it&rsquo;s fine if the content is messy. It also reads attached images.</p>
<p>After generating the plan, I go back and forth a few times to refine it.</p>
<h3 id="2-reviewing-the-work-plan">2. Reviewing the Work Plan</h3>
<p>I have a separate Claude Code session review the plan. When I&rsquo;m unsure, I also have Codex review it.</p>
<p>I don&rsquo;t use Codex directly very often—instead, I use it through a custom skill called <a href="https://github.com/masutaka/dotfiles-public/tree/44515ec73117fa32f310358e003db22399d9f222/.claude/skills/codex-discuss/SKILL.md" target="_blank" rel="noopener"><code>/codex-discuss</code></a>
.</p>
<p>&#x1f4a1; <code>/codex-discuss</code> will start a discussion on whatever you pass as an argument, and even without arguments, it figures out what to discuss on its own. When it&rsquo;s unclear what to discuss, it asks the user. I find it valuable for getting a third-party perspective, though the downside is that it&rsquo;s slow&hellip;</p>
<p>Since the plan is a Markdown file, it&rsquo;s easy to review, and there&rsquo;s no problem even if the work carries over into the next week.</p>
<p>Once the plan is finalized, I paste it as a comment on the GitHub Issue for record-keeping. I used to commit plans to <code>docs/plans/</code> in the repository, but stopped because deleted filenames would show up in grep results as noise, and it just didn&rsquo;t feel right.</p>
<h3 id="3-executing-and-reviewing-the-work">3. Executing and Reviewing the Work</h3>
<p>Plans are typically divided into Phases, with each Phase expected to result in a commit.</p>
<p>For now, git operations are done manually by me. For suggesting commit messages, a custom skill called <a href="https://github.com/masutaka/dotfiles-public/tree/44515ec73117fa32f310358e003db22399d9f222/.claude/skills/suggest-commit-message/SKILL.md" target="_blank" rel="noopener"><code>/suggest-commit-message</code></a>
 has been very useful.</p>
<p>Before requesting a PR review, I run <code>/review</code> in a separate Claude Code session, and if I&rsquo;m still unsure, I discuss it with <code>/codex-discuss</code>.</p>
<p>I also tried <a href="https://github.com/openai/codex-plugin-cc" target="_blank" rel="noopener">openai/codex-plugin-cc</a>
, but it didn&rsquo;t quite fit my style.</p>
<p>Additionally, for reviewing PRs from Dependabot, <a href="https://github.com/masutaka/dotfiles-public/tree/44515ec73117fa32f310358e003db22399d9f222/.claude/skills/review-dependabot-pr/SKILL.md" target="_blank" rel="noopener"><code>/review-dependabot-pr</code></a>
 has been very handy.</p>
<h2 id="conclusion">Conclusion</h2>
<p>I&rsquo;ve summarized how I use Claude Code as of April 2026.</p>
<p>I try not to over-customize Claude Code. Looking at Twitter, it seems like everyone is doing advanced things, but I try not to be too influenced and instead trust my own intuition.</p>
<p>The Claude Code configurations I introduced above are all gathered in the following dotfiles-public repository.</p>

<object type="image/svg+xml" data="https://gh-card.dev/repos/masutaka/dotfiles-public.svg?fullname=&link_target=_blank"></object>

<p>I&rsquo;ll continue to refine my setup going forward, and I&rsquo;m also planning to try out <a href="https://openai.com/index/introducing-the-codex-app/" target="_blank" rel="noopener">Codex.app</a>
, which has been getting good reviews.</p>
<h2 id="gleanings">Gleanings</h2>
<h3 id="answering-yesno-questions-from-claude-code-with-yn">Answering Yes/No Questions from Claude Code with y/n</h3>
<p>When Claude Code asks a Yes/No question, <code>y</code> or <code>n</code> is sufficient. It&rsquo;s a small thing, but it helps reduce token usage.</p>
<h3 id="interview-style-hearings-from-claude-code">Interview-Style Hearings from Claude Code</h3>
<p>When the task at hand is vague, having Claude Code conduct an &ldquo;interview-style&rdquo; hearing helps organize your thoughts.</p>
<p>When there isn&rsquo;t enough information, Claude Code autonomously asks questions.</p>
<p>I have the line &ldquo;Use the AskUserQuestion tool when asking the user for choices or decisions&rdquo; in my <a href="https://github.com/masutaka/dotfiles-public/blob/44515ec73117fa32f310358e003db22399d9f222/.claude/CLAUDE.md" target="_blank" rel="noopener">~/.claude/CLAUDE.md</a>
.</p>
<h3 id="keep-claude-code-sessions-short">Keep Claude Code Sessions Short</h3>
<p>I try not to extend Claude Code sessions too long, even when there&rsquo;s room left in the context window. My experience is that noise from intermediate steps creeps in and things start to go a bit off.</p>
<p>By the way, I monitor the current context window (cw) usage via the Claude Code status line.</p>
<p><img alt="Claude Code status line" loading="lazy" src="/images/claude-code-statusline.png"></p>
<p>Here&rsquo;s the configuration for the status line above:</p>
<ul>
<li><a href="https://github.com/masutaka/dotfiles-public/blob/44515ec73117fa32f310358e003db22399d9f222/.claude/settings.json#L49-L52" target="_blank" rel="noopener">~/.claude/settings.json#L49-L52</a>
</li>
<li><a href="https://github.com/masutaka/dotfiles-public/blob/44515ec73117fa32f310358e003db22399d9f222/.claude/scripts/statusline.js" target="_blank" rel="noopener">~/.claude/scripts/statusline.js</a>
</li>
</ul>
<h3 id="notification-settings-from-claude-code">Notification Settings from Claude Code</h3>
<p>To avoid missing when Claude Code finishes processing, I have a setup that sends notifications to both the tmux status line and the macOS Notification Center.</p>
<p><img alt="tmux status line" loading="lazy" src="/images/claude-code-tmux-statusline.png"></p>
<p><img alt="macOS Notification Center" loading="lazy" src="/images/claude-code-macos-notification.png"></p>
<p>An article by Yoshida-san, a former colleague, was very helpful.</p>
<ul>
<li><a href="https://zenn.dev/milmed/articles/845f47259eca07" target="_blank" rel="noopener">Reliably Detecting &ldquo;My Turn&rdquo; in Claude Code - Zenn</a>
</li>
</ul>
<p>Yoshida-san&rsquo;s article explains in detail how spinner display and unread markers work. My setup is based on that, with the following adjustments:</p>
<ul>
<li>Common:
<ul>
<li>Added a <code>Notification</code> hook so I can be alerted by tmux&rsquo;s unread marker and a notification sound even during idle states like waiting for tool approval</li>
</ul>
</li>
<li>tmux:
<ul>
<li>Added a <code>SessionEnd</code> hook to clean up the spinner, fixing the issue where the spinner kept spinning after exiting with <code>/exit</code> or <code>C-c C-c</code></li>
<li>Introduced a heartbeat file that monitors mtime as a TTL, so the spinner also auto-stops when interrupted with Esc</li>
<li>Changed the unread indicator dot color from red to cyan, as cyan looks more like an &ldquo;unread&rdquo; marker</li>
</ul>
</li>
<li>macOS Notification Center:
<ul>
<li>Used different sounds for <code>Notification</code> (Funk) and <code>Stop</code> (Glass), so I can distinguish &ldquo;attention needed&rdquo; from &ldquo;completed&rdquo; by ear</li>
<li>Added <code>(tmux:N)</code> with the window number in the notification body, so I know which window to switch back to</li>
</ul>
</li>
</ul>
<p>Here&rsquo;s the actual code:</p>
<ul>
<li><a href="https://github.com/masutaka/dotfiles-public/blob/44515ec73117fa32f310358e003db22399d9f222/.claude/settings.json#L53-L122" target="_blank" rel="noopener">~/.claude/settings.json#L53-L122</a>
 (hooks configuration)</li>
<li><a href="https://github.com/masutaka/dotfiles-public/blob/44515ec73117fa32f310358e003db22399d9f222/.claude/scripts/tmux-spinner.sh" target="_blank" rel="noopener">~/.claude/scripts/tmux-spinner.sh</a>
</li>
<li><a href="https://github.com/masutaka/dotfiles-public/blob/44515ec73117fa32f310358e003db22399d9f222/.claude/scripts/macos-notify.sh" target="_blank" rel="noopener">~/.claude/scripts/macos-notify.sh</a>
</li>
<li><a href="https://github.com/masutaka/dotfiles-public/blob/44515ec73117fa32f310358e003db22399d9f222/.config/tmux/tmux.conf#L22-L32" target="_blank" rel="noopener">~/.config/tmux/tmux.conf#L22-L32</a>
</li>
</ul>
]]></content:encoded>
    </item>
  </channel>
</rss>
