<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Faiz Khairi</title>
    <description>The latest articles on DEV Community by Faiz Khairi (@faizkhairi).</description>
    <link>https://dev.to/faizkhairi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3996189%2Fe55d7117-013b-45b0-9340-7d874e72a247.jpg</url>
      <title>DEV Community: Faiz Khairi</title>
      <link>https://dev.to/faizkhairi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/faizkhairi"/>
    <language>en</language>
    <item>
      <title>How I Built a Production Claude Code Setup (and Open-Sourced It)</title>
      <dc:creator>Faiz Khairi</dc:creator>
      <pubDate>Mon, 22 Jun 2026 07:06:51 +0000</pubDate>
      <link>https://dev.to/faizkhairi/how-i-built-a-production-claude-code-setup-and-open-sourced-it-1be4</link>
      <guid>https://dev.to/faizkhairi/how-i-built-a-production-claude-code-setup-and-open-sourced-it-1be4</guid>
      <description>&lt;p&gt;I have been using Claude Code seriously for months. And I kept hitting the same frustrations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Session context vanishes. You pick up the next day and Claude has forgotten everything.&lt;/li&gt;
&lt;li&gt;Config lives on one machine. Move to another and you rebuild from scratch.&lt;/li&gt;
&lt;li&gt;Hooks get written, then lost. No single place to keep them.&lt;/li&gt;
&lt;li&gt;Claude starts coding before you finish explaining the problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I built a reference architecture that fixes these. Then I open-sourced it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is It?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/faizkhairi/claude-code-blueprint" rel="noopener noreferrer"&gt;Claude Code Blueprint&lt;/a&gt; is a library of ready-to-copy files: CLAUDE.md, hooks, agents, skills, and rules. You copy what you need into your own project. Nothing more.&lt;/p&gt;

&lt;p&gt;It is not a framework. It is not a wrapper. It is configuration files that change how Claude Code behaves.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12 agents * 17 skills * 12 hooks * 6 rules&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;60 seconds to start:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ash&lt;br&gt;
curl -o CLAUDE.md https://raw.githubusercontent.com/faizkhairi/claude-code-blueprint/main/CLAUDE.md&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Three Rules That Matter Most
&lt;/h2&gt;

&lt;p&gt;The CLAUDE.md ships with three behavioral rules that prevent the most common AI coding mistakes:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Diagnose-First
&lt;/h3&gt;

&lt;p&gt;Before writing any fix, Claude must run four checks: git state, error source, existing suppression, minimum viable diagnosis. This stops the most common waste -- building an elaborate fix for a problem that was already solved in a previous commit.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Plan-First
&lt;/h3&gt;

&lt;p&gt;Any change touching more than one file goes through plan mode. No exceptions. Claude proposes, you approve, then it executes. This prevents the pattern where Claude charges into a 15-file refactor and produces something you did not ask for.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Verify-After-Complete
&lt;/h3&gt;

&lt;p&gt;After finishing any task, Claude runs a verification pass appropriate to the work type. API endpoint? It curls the live URL. Config change? It confirms the value was actually picked up. File edit? It re-reads the changed block. This alone catches a significant proportion of errors before you do.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Memory System
&lt;/h2&gt;

&lt;p&gt;This was the hardest part to get right. Claude Code has no native persistent memory between sessions. The blueprint solves this with a file-based memory system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Per-session context&lt;/strong&gt;: saved at session end, loaded at session start&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User memories&lt;/strong&gt;: role, preferences, things to avoid&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project memories&lt;/strong&gt;: ongoing work, decisions, deadlines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feedback memories&lt;/strong&gt;: corrections from past sessions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every session starts with a load-session hook that reads these files. Every session ends with a save-session hook that writes them. The result: Claude picks up where it left off, even days later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agents: Sonnet for Grunt Work, Opus for Reasoning
&lt;/h2&gt;

&lt;p&gt;One of the things I learned the hard way: running everything on the expensive model wastes quota on mechanical work.&lt;/p&gt;

&lt;p&gt;The blueprint ships with 12 agents, each pinned to the right model tier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Opus&lt;/strong&gt; for reasoning, planning, architecture review&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sonnet&lt;/strong&gt; for mechanical work: writing tests, generating docs, running grep sweeps, refactoring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main Claude Code session (Opus) orchestrates. Sonnet subagents do the bulk work. Your expensive quota goes to the decisions that need it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Skills: Repeatable Workflows
&lt;/h2&gt;

&lt;p&gt;Skills are slash commands that invoke multi-step workflows. The blueprint ships 17:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Skill&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;eview-full&lt;/td&gt;
&lt;td&gt;Full PR review across security, logic, tests, style&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;deploy-check&lt;/td&gt;
&lt;td&gt;Pre-deploy checklist for your stack&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;est-check&lt;/td&gt;
&lt;td&gt;Run tests, check coverage, flag gaps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sprint-plan&lt;/td&gt;
&lt;td&gt;Turn a backlog into a sprint with estimates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;load-session&lt;/td&gt;
&lt;td&gt;Restore context from memory at session start&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;save-session&lt;/td&gt;
&lt;td&gt;Write session state to memory at session end&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;self-review&lt;/td&gt;
&lt;td&gt;Review your own diff before pushing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Hooks: Zero Token Cost
&lt;/h2&gt;

&lt;p&gt;Hooks run outside Claude's context window. They cost zero tokens. They are the highest-leverage place to add guardrails.&lt;/p&gt;

&lt;p&gt;The blueprint ships 12:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;pre-commit-secret-scan&lt;/strong&gt;: blocks commits with hardcoded credentials&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;protect-config&lt;/strong&gt;: blocks edits to CLAUDE.md and hook files without confirmation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cost-tracker&lt;/strong&gt;: tracks token spend per session&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;session-checkpoint&lt;/strong&gt;: saves state every N minutes automatically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;block-git-push&lt;/strong&gt;: enforces push policy (feature branches only, no direct main)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Who Is It For?
&lt;/h2&gt;

&lt;p&gt;Any developer using Claude Code who wants more reliable, consistent behavior. The blueprint is framework-agnostic -- it configures Claude's behavior, not your code.&lt;/p&gt;

&lt;p&gt;There are four presets if you want a guided start:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ash&lt;br&gt;
./setup.sh --preset=minimal    # CLAUDE.md + 3 core hooks&lt;br&gt;
./setup.sh --preset=standard   # + agents + skills&lt;br&gt;
./setup.sh --preset=full       # everything&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Translations
&lt;/h2&gt;

&lt;p&gt;The README and setup docs are available in Japanese, Korean, and Chinese. The community contributed these.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get It
&lt;/h2&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/faizkhairi/claude-code-blueprint" rel="noopener noreferrer"&gt;github.com/faizkhairi/claude-code-blueprint&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MIT licensed. Copy what you need. Leave the rest.&lt;/p&gt;

&lt;p&gt;If it is useful, a star helps others find it.&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
