<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Workflow on Chen Kai Blog</title><link>https://www.chenk.top/en/tags/workflow/</link><description>Recent content in Workflow on Chen Kai Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 24 Apr 2026 09:00:00 +0000</lastBuildDate><atom:link href="https://www.chenk.top/en/tags/workflow/index.xml" rel="self" type="application/rss+xml"/><item><title>Claude Code Hands-On (7): Ten Hooks I Actually Use, with the Code</title><link>https://www.chenk.top/en/claude-code-learn/07-hooks-deep-dive/</link><pubDate>Fri, 24 Apr 2026 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/claude-code-learn/07-hooks-deep-dive/</guid><description>&lt;p>&lt;a href="https://www.chenk.top/en/claude-code-learn/05-hooks/">Chapter 5&lt;/a>
 provided a conceptual tour of hooks. This chapter is the field guide. From the 100-script reference repo, ten scripts earn their place in every serious project I run. I&amp;rsquo;ll walk through these ten with code.&lt;/p>
&lt;p>All examples assume Node 18+, save scripts to &lt;code>./hooks/&lt;/code>, mark them &lt;code>chmod +x&lt;/code>, and wire them in &lt;code>.claude/settings.json&lt;/code> like:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;span class="lnt">7
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-json" data-lang="json">&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;hooks&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;PreToolUse&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">[&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">{&lt;/span> &lt;span class="nt">&amp;#34;matcher&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;Read|Grep&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nt">&amp;#34;hooks&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">[{&lt;/span> &lt;span class="nt">&amp;#34;type&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;command&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nt">&amp;#34;command&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;node ./hooks/block-env-read.js&amp;#34;&lt;/span> &lt;span class="p">}]&lt;/span> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Before we dive in, here&amp;rsquo;s the hook lifecycle to make the following code clear:&lt;/p></description></item><item><title>Claude Code Hands-On (3): Custom Slash Commands and Conversation Control</title><link>https://www.chenk.top/en/claude-code-learn/03-custom-commands/</link><pubDate>Mon, 20 Apr 2026 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/claude-code-learn/03-custom-commands/</guid><description>&lt;p>Built-in slash commands like &lt;code>/clear&lt;/code> and &lt;code>/init&lt;/code> are the visible part of the iceberg. The main point of the system is for you to write your own commands, which live in your repo.&lt;/p>
&lt;p>&lt;figure class="article-figure">
 &lt;img src="https://blog-pic-ck.oss-cn-beijing.aliyuncs.com/posts/en/claude-code-learn/03-custom-commands/illustration_1.png" alt="Claude Code Hands-On (3): Custom Slash Commands and Conversation Control — Chapter overview" loading="lazy" decoding="async" class="content-image">
 
&lt;/figure>
&lt;/p>
&lt;hr>
&lt;h2 id="what-a-slash-command-is" class="heading-anchor">What a slash command is&lt;a href="#what-a-slash-command-is" class="heading-link" aria-label="Permalink to this section" title="Copy link to this section">#&lt;/a>
&lt;/h2>&lt;p>A file at &lt;code>.claude/commands/&amp;lt;name&amp;gt;.md&lt;/code>. Contents are a Markdown prompt. Filename becomes the command. After creating the command, you need to restart Claude Code (one of the few places it isn&amp;rsquo;t hot-reloaded).&lt;/p></description></item><item><title>LLM Workflows and Application Architecture: Enterprise Implementation Guide</title><link>https://www.chenk.top/en/standalone/llm-workflows-architecture/</link><pubDate>Thu, 31 Jul 2025 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/standalone/llm-workflows-architecture/</guid><description>&lt;p>Most LLM tutorials end where the interesting work begins. They show you how to call a chat completion endpoint, attach a vector store, and wrap the whole thing in a Streamlit demo. None of that is wrong, but none of it is what breaks at 3 a.m. when 10,000 users hit your service at once and every other answer is a hallucination.&lt;/p>
&lt;p>This article is about everything that comes after the demo. It is opinionated on purpose: production LLM systems are mostly plain distributed systems with one non-deterministic component bolted on, and most of the engineering effort goes into containing that non-determinism. We will work through seven dimensions — application architecture, workflow patterns, the RAG-vs-fine-tune decision, deployment topology, cost, observability, and enterprise integration — keeping each one short, concrete, and grounded in the levers that actually move the needle.&lt;/p></description></item></channel></rss>