<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Bash on Nick Liu - Software Engineer</title><link>https://nick-liu.com/tags/bash/</link><description>Recent content in Bash on Nick Liu - Software Engineer</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>nickboy@users.noreply.github.com (Nick Liu)</managingEditor><webMaster>nickboy@users.noreply.github.com (Nick Liu)</webMaster><copyright>2026 Nick Liu</copyright><lastBuildDate>Sat, 11 Jul 2026 15:08:00 -0700</lastBuildDate><atom:link href="https://nick-liu.com/tags/bash/index.xml" rel="self" type="application/rss+xml"/><item><title>Your First Claude Code Hook: Auto-Name Every Session</title><link>https://nick-liu.com/posts/first-claude-code-hook/</link><pubDate>Sun, 21 Jun 2026 00:00:00 +0000</pubDate><author>nickboy@users.noreply.github.com (Nick Liu)</author><guid>https://nick-liu.com/posts/first-claude-code-hook/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;
 
In Part 1 we learned that named sessions are easy to find. Now let's make naming automatic with a hook. This is also a perfect first hook project, so I'll explain the whole idea from scratch.

&lt;/div&gt;

&lt;nav class="series-progress" aria-label="Series progress"&gt;
 &lt;span class="series-progress-label"&gt;Taming Claude Code Sessions · Part 2 of 6&lt;/span&gt;
 &lt;ol class="series-progress-dots"&gt;&lt;li class="series-progress-dot is-done"&gt;
 &lt;a href="https://nick-liu.com/posts/find-claude-code-sessions/" title="Stop Losing Your Claude Code Conversations"&gt;1&lt;/a&gt;
 &lt;/li&gt;&lt;li class="series-progress-dot is-current"&gt;
 &lt;a href="https://nick-liu.com/posts/first-claude-code-hook/" title="Your First Claude Code Hook: Auto-Name Every Session" aria-current="step"&gt;2&lt;/a&gt;
 &lt;/li&gt;&lt;li class="series-progress-dot"&gt;
 &lt;a href="https://nick-liu.com/posts/tmux-window-titles/" title="Make tmux Show What Each Window Is Doing"&gt;3&lt;/a&gt;
 &lt;/li&gt;&lt;li class="series-progress-dot"&gt;
 &lt;a href="https://nick-liu.com/posts/managing-many-ai-agents/" title="Running Several AI Coding Agents Without Losing Track"&gt;4&lt;/a&gt;
 &lt;/li&gt;&lt;li class="series-progress-dot"&gt;
 &lt;a href="https://nick-liu.com/posts/parallel-agents-git-worktrees/" title="Git worktrees gave each Claude agent its own sandbox. And scattered my sessions."&gt;5&lt;/a&gt;
 &lt;/li&gt;&lt;li class="series-progress-dot"&gt;
 &lt;a href="https://nick-liu.com/posts/claude-code-skills-hooks-subagents/" title="Hooks are guarantees, skills are knowledge, subagents are other people."&gt;6&lt;/a&gt;
 &lt;/li&gt;&lt;/ol&gt;
 &lt;/nav&gt;
&lt;div class="tested-with" role="note"&gt;
 &lt;span class="tested-with-icon" aria-hidden="true"&gt;🧪&lt;/span&gt;
 &lt;span&gt;Tested with &lt;strong&gt;Claude Code&lt;/strong&gt; &lt;code&gt;2.1.x&lt;/code&gt; · macOS / Linux&lt;/span&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://nick-liu.com/posts/find-claude-code-sessions/" &gt;Part 1&lt;/a&gt; left us with one chore: you still
have to remember to name your sessions. Let&amp;rsquo;s delete that chore.&lt;/p&gt;</description></item></channel></rss>