{"id":1252,"date":"2026-03-02T20:13:26","date_gmt":"2026-03-02T20:13:26","guid":{"rendered":"https:\/\/inphronesys.com\/?p=1252"},"modified":"2026-03-02T20:13:26","modified_gmt":"2026-03-02T20:13:26","slug":"mastering-claude-code-from-first-launch-to-250-prs-a-month","status":"publish","type":"post","link":"https:\/\/inphronesys.com\/?p=1252","title":{"rendered":"Mastering Claude Code: From First Launch to 250 PRs a Month"},"content":{"rendered":"<h2>One Developer, 250+ Pull Requests, One Month<\/h2>\n<p>Boris Cherny merges over 250 pull requests per month. Not with a team of 20. Not by writing sloppy code. He does it from a single terminal running Claude Code \u2014 Anthropic&#8217;s AI coding agent that lives in your command line.<\/p>\n<p>That number sounds absurd until you see how he works: five terminal sessions running in parallel, each with Claude Code tackling a different task in an isolated git worktree. Five more web sessions handle research and code review simultaneously. Each session gets its own 200,000-token context window \u2014 roughly 150,000 words of working memory. While one session refactors an authentication module, another writes tests, a third builds a dashboard, and two more handle code reviews. The compound effect is staggering.<\/p>\n<p>But here&#8217;s what makes this relevant to <em>you<\/em>: Boris isn&#8217;t writing most of that code by hand. He&#8217;s directing an AI agent with well-crafted prompts, verifying the output, and shipping. The same workflow that lets him merge 250+ PRs a month can help a supply chain analyst automate their weekly demand reports, build interactive dashboards, or debug R scripts that would otherwise take days to untangle.<\/p>\n<p>Claude Code is the tool that finally makes supply chain data science accessible \u2014 even if you&#8217;ve never written a line of code. And if you <em>have<\/em> written code, it can compress hours of repetitive data work into minutes of conversation.<\/p>\n<p>This guide organizes everything you need \u2014 from installation to advanced parallel workflows \u2014 into three difficulty levels. Start where you&#8217;re comfortable, and level up when you&#8217;re ready.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/inphronesys.com\/wp-content\/uploads\/2026\/03\/cc_difficulty_levels-2.png\" alt=\"Three difficulty levels of Claude Code mastery\" \/><\/p>\n<h2>Beginner Level \u2014 Your First Week with Claude Code<\/h2>\n<h3>What Claude Code Actually Is (and Isn&#8217;t)<\/h3>\n<p>Let&#8217;s clear up a common confusion. Claude Code is <strong>not<\/strong> a chatbot in your browser. It&#8217;s not ChatGPT with a different logo. It&#8217;s a full agentic AI that runs inside your terminal \u2014 the same terminal where you run <code>git<\/code>, <code>python<\/code>, or <code>Rscript<\/code>. It can read your files, write code, run commands, search your codebase, and execute multi-step tasks autonomously.<\/p>\n<p>Think of it as hiring a very fast, very patient junior developer who never sleeps and has read every Stack Overflow answer ever written. You give it instructions in plain English, it reads your code, proposes changes, and \u2014 with your permission \u2014 makes them.<\/p>\n<p>The key differences from browser-based AI:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">Feature<\/th>\n<th style=\"text-align:left\">Claude.ai (Browser)<\/th>\n<th style=\"text-align:left\">Claude Code (Terminal)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\">Reads your local files<\/td>\n<td style=\"text-align:left\">No<\/td>\n<td style=\"text-align:left\">Yes<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">Edits your code directly<\/td>\n<td style=\"text-align:left\">No<\/td>\n<td style=\"text-align:left\">Yes<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">Runs shell commands<\/td>\n<td style=\"text-align:left\">No<\/td>\n<td style=\"text-align:left\">Yes<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">Manages git workflows<\/td>\n<td style=\"text-align:left\">No<\/td>\n<td style=\"text-align:left\">Yes<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">Context window<\/td>\n<td style=\"text-align:left\">200k tokens<\/td>\n<td style=\"text-align:left\">200k tokens<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">Best for<\/td>\n<td style=\"text-align:left\">Research, writing, chat<\/td>\n<td style=\"text-align:left\">Coding, automation, analysis<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Installation: 60 Seconds to Your First Session<\/h3>\n<p>Open your terminal and run:<\/p>\n<pre><code class=\"language-bash\">curl -fsSL https:\/\/claude.ai\/install.sh | bash\n<\/code><\/pre>\n<p>That&#8217;s it. One line. No Docker, no virtual environments, no configuration files. On macOS you can also use <code>brew install --cask claude-code<\/code>. Then launch Claude Code by typing:<\/p>\n<pre><code class=\"language-bash\">claude\n<\/code><\/pre>\n<p>You&#8217;ll authenticate with your Anthropic account on first launch, and you&#8217;re in. A blinking cursor awaits your first instruction.<\/p>\n<h3>Your First Five Commands<\/h3>\n<p>Don&#8217;t overthink this. Start simple:<\/p>\n<p><strong>1. Ask a question:<\/strong><\/p>\n<pre><code>What files are in the current directory?\n<\/code><\/pre>\n<p>Claude Code will list your files. It&#8217;s the world&#8217;s most overqualified <code>ls<\/code> command, but it&#8217;ll also <em>explain<\/em> what it finds.<\/p>\n<p><strong>2. Read and explain a file:<\/strong><\/p>\n<pre><code>Read the file data\/procurement_q1.csv and tell me what it contains\n<\/code><\/pre>\n<p>This is where it gets useful fast. Claude Code doesn&#8217;t just dump the contents \u2014 it analyzes the structure, identifies column types, flags potential data quality issues, and suggests what analyses you could run.<\/p>\n<p><strong>3. Get help:<\/strong><\/p>\n<pre><code>\/help\n<\/code><\/pre>\n<p>Lists all available slash commands. Bookmark this mentally \u2014 you&#8217;ll use <code>\/help<\/code> more than you think for the first few days.<\/p>\n<p><strong>4. Clear the conversation:<\/strong><\/p>\n<pre><code>\/clear\n<\/code><\/pre>\n<p>Starts fresh. Use this when you&#8217;re switching topics or when Claude Code seems confused. It&#8217;s the equivalent of closing and reopening a browser tab.<\/p>\n<p><strong>5. Ask for something useful:<\/strong><\/p>\n<pre><code>Write an R script that reads procurement_q1.csv, calculates spend by supplier, and creates a Pareto chart\n<\/code><\/pre>\n<p>This is the moment when things click. Claude Code will write the R script, explain what it does, and \u2014 if you allow it \u2014 save the file and even run it. What used to take an hour of Googling and Stack Overflow copy-pasting now takes 30 seconds.<\/p>\n<h3>Terminal Setup: Small Config, Big Difference<\/h3>\n<p>Claude Code works in any terminal, but a quick setup makes the experience dramatically better.<\/p>\n<p><strong>The Shift+Enter problem:<\/strong> In most terminals, pressing Enter sends your message immediately. That&#8217;s fine for one-liners, but when you want to write multi-line prompts (and you will), you need Shift+Enter for newlines. iTerm2, WezTerm, Ghostty, and Kitty support this natively. For other terminals:<\/p>\n<pre><code>\/terminal-setup\n<\/code><\/pre>\n<p>This configures your terminal to handle multi-line input properly.<\/p>\n<p><strong>Enable notifications<\/strong> so you know when a long-running task finishes. In iTerm2: Settings &gt; Profiles &gt; Terminal &gt; Notification Center Alerts, then filter by &quot;escape sequence.&quot; Now you can switch to another tab while Claude Code works, and it&#8217;ll ping you when it&#8217;s done.<\/p>\n<h3>The Supply Chain Quick Win<\/h3>\n<p>Here&#8217;s a concrete scenario. You have a messy Excel export of purchase orders \u2014 inconsistent date formats, supplier names with typos, missing unit prices. Normally this is a 2-hour cleanup job. With Claude Code:<\/p>\n<pre><code>Read data\/PO_export_march.xlsx and clean it up:\n- Standardize date columns to YYYY-MM-DD\n- Fuzzy-match supplier names and consolidate duplicates\n- Flag rows with missing unit prices\n- Save as cleaned_PO_march.csv\n<\/code><\/pre>\n<p>Claude Code will write a Python or R script to do exactly this, explain each transformation, and execute it. Your 2-hour cleanup job becomes a 5-minute conversation \u2014 most of which is reviewing the output.<\/p>\n<h2>Intermediate Level \u2014 Becoming Productive<\/h2>\n<p>This is where you stop using Claude Code as a fancy autocomplete and start using it as an actual workflow partner. The productivity difference between Beginner and Intermediate is easily 3-5x.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/inphronesys.com\/wp-content\/uploads\/2026\/03\/cc_workflow_diagram-2.png\" alt=\"The Explore-Plan-Build-Commit workflow\" \/><\/p>\n<h3>The Golden Workflow: Explore, Plan, Build, Commit<\/h3>\n<p>Every effective Claude Code session follows this four-step cycle. It&#8217;s simple enough to memorize and powerful enough to handle any task.<\/p>\n<p><strong>Step 1 \u2014 Explore.<\/strong> Before Claude Code writes a single line, it needs to understand the landscape. Ask it to read relevant files, understand the codebase structure, and identify patterns. Good exploration prompts:<\/p>\n<pre><code>Read the files in src\/inventory\/ and explain the architecture\n<\/code><\/pre>\n<pre><code>What forecasting methods are currently implemented in this project?\n<\/code><\/pre>\n<p><strong>Step 2 \u2014 Plan.<\/strong> Press <strong>Shift+Tab twice<\/strong> to enter Plan Mode. (One press activates Auto-Accept mode \u2014 the opposite of what you want here.) In Plan Mode, Claude Code proposes an implementation plan but doesn&#8217;t execute anything. You review, adjust, and approve before a single file is touched. This is critical for non-trivial tasks \u2014 it prevents Claude Code from charging off in the wrong direction.<\/p>\n<p>In Plan Mode, Claude Code will:<\/p>\n<ul>\n<li>Identify which files need to change<\/li>\n<li>Describe each change before making it<\/li>\n<li>Flag potential risks or trade-offs<\/li>\n<li>Wait for your approval<\/li>\n<\/ul>\n<p>Press Shift+Tab twice again to iterate on the plan. When you&#8217;re satisfied, approve it, and Claude Code executes the entire plan in one shot.<\/p>\n<p><strong>Step 3 \u2014 Build.<\/strong> Claude Code makes the changes. If you&#8217;ve set up verification (more on that below), it automatically runs tests after each change to catch regressions immediately.<\/p>\n<p><strong>Step 4 \u2014 Commit.<\/strong> Claude Code can create git commits with meaningful messages, push branches, and even open pull requests. The entire cycle \u2014 explore, plan, build, commit \u2014 can happen in a single session.<\/p>\n<h3>Your First CLAUDE.md: The Project Brain<\/h3>\n<p>This is the single most important intermediate skill. A <code>CLAUDE.md<\/code> file at the root of your project is a persistent instruction file that Claude Code reads at the start of every session. It&#8217;s your project&#8217;s brain \u2014 the institutional knowledge that makes Claude Code productive from the first prompt instead of requiring 10 minutes of context-setting.<\/p>\n<p>Here&#8217;s what a good CLAUDE.md looks like for a supply chain analytics project:<\/p>\n<pre><code class=\"language-markdown\"># CLAUDE.md\n\n## Project\nSupply chain demand forecasting using R. Data in data\/, scripts in src\/, outputs in reports\/.\n\n## Commands\n- Run tests: Rscript tests\/run_all.R\n- Generate report: Rscript src\/weekly_report.R\n- Lint R code: lintr::lint_dir(&quot;src\/&quot;)\n\n## Conventions\n- Use tidyverse style (pipes, tibbles, snake_case)\n- All date columns: YYYY-MM-DD format\n- ggplot theme: theme_minimal() with base_size = 13\n- Save plots at 800x500px, white background\n\n## IMPORTANT\n- Never overwrite raw data files in data\/raw\/\n- Always validate forecasts against the holdout set before reporting accuracy\n<\/code><\/pre>\n<p>Key principles for CLAUDE.md:<\/p>\n<ul>\n<li><strong>Keep it short.<\/strong> Under 200 lines. Claude Code reads this every session \u2014 bloated instructions waste context.<\/li>\n<li><strong>Be specific.<\/strong> &quot;Use tidyverse style&quot; is better than &quot;Follow R best practices.&quot;<\/li>\n<li><strong>Include commands.<\/strong> Claude Code can run your tests, linters, and builds if you tell it how.<\/li>\n<li><strong>Use IMPORTANT for critical rules.<\/strong> Claude Code pays extra attention to lines marked this way.<\/li>\n<\/ul>\n<p>Run <code>\/init<\/code> to have Claude Code generate a starter CLAUDE.md by analyzing your project. Then refine it yourself.<\/p>\n<h3>Context Management: The 200k Skill<\/h3>\n<p>Claude Code has a 200,000-token context window \u2014 enormous, but not infinite. Long sessions accumulate context, and eventually the window fills up. When that happens, performance degrades: Claude Code loses track of earlier decisions, repeats itself, or forgets file contents.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/inphronesys.com\/wp-content\/uploads\/2026\/03\/cc_context_management-2.png\" alt=\"Context window management strategies\" \/><\/p>\n<p>Two essential tools:<\/p>\n<p><strong><code>\/compact<\/code><\/strong> \u2014 Compresses the conversation history, keeping key decisions and outcomes while discarding the verbose middle. Use this proactively when you notice the conversation getting long, <em>before<\/em> performance degrades. It&#8217;s like taking concise meeting notes and starting from the summary.<\/p>\n<p><strong><code>\/clear<\/code><\/strong> \u2014 Nuclear option. Wipes the entire context and starts fresh. Use this when switching to a completely different task, or when <code>\/compact<\/code> isn&#8217;t enough.<\/p>\n<p>The intermediate trick: <strong>one task, one session.<\/strong> Don&#8217;t ask Claude Code to refactor your forecasting module, then debug an unrelated data loader, then write documentation \u2014 all in one session. Each topic accumulates context, and by the third task you&#8217;re deep in the window with conflicting contexts. Start a new session for each distinct task.<\/p>\n<h3>The @-Reference Power Move<\/h3>\n<p>Instead of describing files, reference them directly:<\/p>\n<pre><code>Look at @src\/forecast.R and @src\/inventory.R \u2014 refactor the shared helper functions into a new @src\/utils.R\n<\/code><\/pre>\n<p>The <code>@<\/code> syntax tells Claude Code exactly which files you mean. No ambiguity, no wasted context searching for the right files. You can also reference URLs:<\/p>\n<pre><code>Implement the algorithm described at @https:\/\/otexts.com\/fpp3\/ets.html\n<\/code><\/pre>\n<h3>Verification Loops: Trust but Verify<\/h3>\n<p>This is Boris Cherny&#8217;s number one tip, and he says it delivers &quot;2-3x the quality of the final result.&quot; The idea is simple: tell Claude Code to verify its own work.<\/p>\n<pre><code>After making changes, run Rscript tests\/run_all.R and fix any failures\n<\/code><\/pre>\n<pre><code>Implement the new forecasting method, then prove to me it works by running it on the test dataset and showing the MAPE\n<\/code><\/pre>\n<p>Even more powerful: challenge Claude Code to find flaws in its own work:<\/p>\n<pre><code>Grill me on these changes. What could go wrong? What edge cases did we miss?\n<\/code><\/pre>\n<p>This adversarial verification catches bugs that a simple &quot;write the code&quot; prompt would miss. The code isn&#8217;t just generated \u2014 it&#8217;s stress-tested before you ever review it.<\/p>\n<h3>Piping Data Directly<\/h3>\n<p>For quick analysis, pipe data straight into Claude Code from the command line:<\/p>\n<pre><code class=\"language-bash\">cat data\/demand_forecast.csv | claude &quot;Analyze this demand data. Identify seasonality, trend, and any anomalies. Suggest the best forecasting method.&quot;\n<\/code><\/pre>\n<pre><code class=\"language-bash\">Rscript src\/model_comparison.R 2&gt;&amp;1 | claude &quot;These are the results of 5 forecasting models. Which one should we deploy and why?&quot;\n<\/code><\/pre>\n<p>This turns Claude Code into a command-line analyst that takes raw data or output and returns structured insights. Combined with cron jobs or scheduled scripts, you can build automated analysis pipelines.<\/p>\n<h3>Session Management: Pick Up Where You Left Off<\/h3>\n<p>Two flags that change everything:<\/p>\n<ul>\n<li><strong><code>--continue<\/code><\/strong> \u2014 Resumes the most recent session. You closed the terminal, went to lunch, and came back? <code>claude --continue<\/code> picks up exactly where you left off.<\/li>\n<li><strong><code>--resume<\/code><\/strong> \u2014 Shows a list of recent sessions and lets you choose which to resume.<\/li>\n<\/ul>\n<p>Also useful: <code>\/rename &quot;Demand Forecasting Refactor&quot;<\/code> gives your session a meaningful name so you can find it later.<\/p>\n<h2>Advanced Level \u2014 10x Productivity<\/h2>\n<p>Fair warning: this section gets more technical. The Beginner and Intermediate levels are useful for anyone \u2014 supply chain analyst, operations manager, or occasional scripter. The Advanced level assumes you&#8217;re comfortable with git, terminal workflows, and JSON configuration files. If that&#8217;s not you yet, bookmark this section and come back when Intermediate feels easy.<\/p>\n<p>This is where Boris&#8217;s 250-PRs-per-month workflow lives. The techniques here compound on everything from Beginner and Intermediate. Individually, each one adds 20-30% efficiency. Together, they multiply.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/inphronesys.com\/wp-content\/uploads\/2026\/03\/cc_productivity_curve-2.png\" alt=\"Productivity gains across mastery levels\" \/><\/p>\n<h3>Parallel Sessions with Git Worktrees<\/h3>\n<p>This is Boris&#8217;s secret weapon. Instead of working on one task at a time, he runs 5+ Claude Code sessions simultaneously, each in its own git worktree \u2014 an isolated copy of the repository with its own branch.<\/p>\n<pre><code class=\"language-bash\"># Create a worktree for each task\ngit worktree add ..\/forecast-refactor -b feature\/forecast-refactor\ngit worktree add ..\/dashboard-update -b feature\/dashboard-update\ngit worktree add ..\/data-pipeline -b feature\/data-pipeline\n<\/code><\/pre>\n<p>Now open a terminal in each worktree and launch <code>claude<\/code>. Each session has its own 200k-token context window, its own branch, and its own working directory. They can&#8217;t interfere with each other. While one session refactors your forecasting code, another builds a dashboard, and a third restructures your data pipeline.<\/p>\n<p>Running five parallel sessions won&#8217;t give you a clean 15x multiplier \u2014 review overhead and merge resolution are real \u2014 but the throughput gains are dramatic enough that Boris Cherny ships 250+ PRs a month.<\/p>\n<p>The key insight: <strong>your bottleneck shifts from writing code to reviewing code.<\/strong> You become a technical director \u2014 setting direction, reviewing output, and merging results \u2014 rather than an individual contributor hunched over a keyboard.<\/p>\n<h3>Custom Subagents: Your AI Team<\/h3>\n<p>Subagents are Claude Code sessions that run inside your main session. Each gets its own isolated 200k-token context window, works autonomously, and returns only a summary to the parent session. Think of them as specialist consultants you bring in for specific tasks.<\/p>\n<p>Define custom subagents in <code>.claude\/agents\/<\/code>:<\/p>\n<pre><code class=\"language-markdown\"># .claude\/agents\/forecast-validator.md\n\nYou are a supply chain forecast validation specialist.\n\n## Your Mission\nValidate demand forecasts by:\n1. Running backtests against holdout data\n2. Computing accuracy metrics (MAPE, RMSE, bias)\n3. Checking for common errors (data leakage, overfitting, seasonal misalignment)\n4. Comparing against naive benchmarks\n\n## Rules\n- Always compute accuracy on the HOLDOUT set, never the training set\n- Flag any forecast with MAPE &gt; 30% for manual review\n- Include a confidence interval assessment\n<\/code><\/pre>\n<p>Now you can invoke this specialist any time:<\/p>\n<pre><code>Use the forecast-validator agent to check the new ETS model in src\/forecast_ets.R\n<\/code><\/pre>\n<p>The subagent reads the code, runs the validation, and reports back with findings. Your main context window stays clean.<\/p>\n<p>Boris&#8217;s personal subagent toolkit includes a code-simplifier (reduces complexity), a build-validator (ensures everything compiles), a verify-app (runs end-to-end tests), and a code-architect (reviews design patterns). Each one eliminates a category of bugs without cluttering the main session.<\/p>\n<h3>Skills and Slash Commands: One-Key Workflows<\/h3>\n<p>Skills are reusable prompts stored in <code>.claude\/skills\/<\/code> that you invoke with slash commands. They turn multi-step workflows into one-liners.<\/p>\n<p>Create <code>.claude\/skills\/weekly-forecast.md<\/code>:<\/p>\n<pre><code class=\"language-markdown\">---\nname: weekly-forecast\ndescription: Generate this week's demand forecast report\n---\n\n1. Read the latest demand data from data\/demand_latest.csv\n2. Run the ETS forecast model in src\/forecast_ets.R\n3. Compare against the moving average baseline\n4. Generate the accuracy comparison table\n5. Create the executive summary chart\n6. Save the report as reports\/forecast_YYYY-MM-DD.html\n<\/code><\/pre>\n<p>Now every Monday morning:<\/p>\n<pre><code>\/weekly-forecast\n<\/code><\/pre>\n<p>One command. Full report. No manual steps, no forgotten procedures. Your weekly reporting workflow becomes as simple as pressing Enter.<\/p>\n<h3>Hooks: Automated Quality Gates<\/h3>\n<p>Hooks are shell commands that run automatically at specific points in Claude Code&#8217;s workflow. They&#8217;re deterministic \u2014 they fire every time, without Claude Code having to remember.<\/p>\n<p>Common use cases:<\/p>\n<ul>\n<li><strong>Auto-format code<\/strong> after every edit (no more style inconsistencies)<\/li>\n<li><strong>Run linting<\/strong> before every commit<\/li>\n<li><strong>Execute tests<\/strong> after every file modification<\/li>\n<\/ul>\n<p>Boris uses a PostToolUse hook that auto-formats code after any edit:<\/p>\n<pre><code class=\"language-json\">{\n  &quot;hooks&quot;: {\n    &quot;PostToolUse&quot;: [\n      {\n        &quot;matcher&quot;: &quot;Edit|Write&quot;,\n        &quot;hooks&quot;: [\n          {\n            &quot;type&quot;: &quot;command&quot;,\n            &quot;command&quot;: &quot;Rscript -e 'styler::style_file(\\&quot;$CLAUDE_FILE\\&quot;)' || true&quot;\n          }\n        ]\n      }\n    ]\n  }\n}\n<\/code><\/pre>\n<p>Every time Claude Code writes or edits a file, it automatically gets formatted. No manual step, no forgotten formatting, no messy diffs in code review.<\/p>\n<h3>MCP Servers: Claude Code Meets Your Stack<\/h3>\n<p>Model Context Protocol (MCP) servers connect Claude Code to external tools \u2014 Slack, databases, monitoring systems, and more. Configure them in <code>.mcp.json<\/code>:<\/p>\n<pre><code class=\"language-json\">{\n  &quot;mcpServers&quot;: {\n    &quot;postgres&quot;: {\n      &quot;command&quot;: &quot;mcp-server-postgres&quot;,\n      &quot;args&quot;: [&quot;postgresql:\/\/user:pass@localhost\/supply_chain_db&quot;]\n    },\n    &quot;slack&quot;: {\n      &quot;command&quot;: &quot;mcp-server-slack&quot;,\n      &quot;env&quot;: { &quot;SLACK_TOKEN&quot;: &quot;xoxb-...&quot; }\n    }\n  }\n}\n<\/code><\/pre>\n<p>Now Claude Code can query your database directly:<\/p>\n<pre><code>Query the supply_chain_db for all purchase orders from Q1 where the supplier lead time exceeded the contracted SLA. Summarize the results and post a report to the #procurement-alerts Slack channel.\n<\/code><\/pre>\n<p>One prompt. Database query. Analysis. Slack notification. What used to be a multi-tool, multi-tab, multi-hour process is now a single sentence.<\/p>\n<h3>Non-Interactive Mode: CI\/CD Pipelines<\/h3>\n<p>Claude Code doesn&#8217;t require a human at the keyboard. The <code>-p<\/code> flag runs it non-interactively:<\/p>\n<pre><code class=\"language-bash\">claude -p &quot;Read src\/forecast.R and add input validation for the date parameters. Run the tests afterward.&quot; --output-format json\n<\/code><\/pre>\n<p>This opens up automation possibilities that go far beyond interactive coding:<\/p>\n<ul>\n<li><strong>Nightly data validation:<\/strong> Cron job that pipes new data into Claude Code, asks it to check for anomalies, and emails a report<\/li>\n<li><strong>Pre-commit review:<\/strong> Git hook that sends changed files to Claude Code for a quick review before committing<\/li>\n<li><strong>Fan-out migrations:<\/strong> When you need to update 50 configuration files with the same pattern, use a script that launches a Claude Code instance for each one in parallel<\/li>\n<\/ul>\n<pre><code class=\"language-bash\"># Fan-out: update all forecast config files in parallel\nfor config in configs\/forecast_*.yaml; do\n  claude -p &quot;Update $config to use the new API endpoint format&quot; &amp;\ndone\nwait\n<\/code><\/pre>\n<h3>Permissions and Sandboxing: Safe Automation<\/h3>\n<p>When running Claude Code with more autonomy, security matters. Two critical tools:<\/p>\n<p><strong><code>\/permissions<\/code><\/strong> \u2014 Opens a viewer that shows which tools Claude Code is allowed to use without asking. You can review and manage permissions interactively. To pre-configure allowlists, add them to <code>.claude\/settings.json<\/code>:<\/p>\n<pre><code class=\"language-json\">{\n  &quot;permissions&quot;: {\n    &quot;allowedTools&quot;: [\n      &quot;Bash(git add:*)&quot;,\n      &quot;Bash(git commit:*)&quot;,\n      &quot;Bash(git push:*)&quot;,\n      &quot;Bash(Rscript:*)&quot;\n    ]\n  }\n}\n<\/code><\/pre>\n<p>This lets Claude Code run <code>git<\/code> and <code>Rscript<\/code> commands without prompting you each time \u2014 while still blocking everything else.<\/p>\n<p><strong><code>\/sandbox<\/code><\/strong> \u2014 Enables OS-level sandboxing that prevents Claude Code from accessing files or network resources outside the project directory. This is essential for CI\/CD pipelines where Claude Code runs unattended.<\/p>\n<p>Boris specifically recommends <code>\/permissions<\/code> over the <code>--dangerously-skip-permissions<\/code> flag. The allowlist approach gives you speed without sacrificing safety.<\/p>\n<h2>Where It Breaks: Honest Limitations<\/h2>\n<p>No tool review is complete without discussing where it falls short. Claude Code is powerful, but it has real limitations:<\/p>\n<p><strong>The kitchen sink trap.<\/strong> The most common failure mode is cramming too many unrelated tasks into one session. Each topic eats context, and by the fifth task the AI is juggling too many threads. The fix: one task per session, use <code>\/compact<\/code> proactively, and start new sessions early rather than late.<\/p>\n<p><strong>The trust-then-verify gap.<\/strong> Claude Code generates confident-sounding code that is <em>usually<\/em> correct \u2014 but &quot;usually&quot; isn&#8217;t always. Without verification loops (tests, manual review, backtests), bugs slip through. The fix: always include verification in your prompts.<\/p>\n<p><strong>The over-specified CLAUDE.md.<\/strong> A 500-line CLAUDE.md with every edge case documented sounds thorough. In practice, it wastes context tokens and confuses priorities. The fix: keep CLAUDE.md under 200 lines, use IMPORTANT sparingly, and prune ruthlessly.<\/p>\n<p><strong>Infinite exploration.<\/strong> Claude Code can spend its entire context window exploring your codebase without ever making a change. The fix: set clear boundaries. &quot;Read only these 3 files&quot; is better than &quot;Understand the entire project.&quot;<\/p>\n<p><strong>Complex multi-file refactors.<\/strong> While Claude Code handles individual file changes brilliantly, large-scale refactors across dozens of files can produce inconsistent results. The fix: break large refactors into smaller, testable chunks and use parallel worktrees.<\/p>\n<h2>The Supply Chain Professional&#8217;s Playbook<\/h2>\n<p>Everything above applies to any developer. But here&#8217;s why this tool is particularly transformative for supply chain and operations management \u2014 a field drowning in data but chronically short on data engineering talent.<\/p>\n<p><strong>MRP parameter auditing at scale.<\/strong> Export your item master from SAP, Oracle, or Business Central. Pipe the CSV into Claude Code and ask: <em>&quot;Flag every item where the safety stock covers less than 1x the lead time demand, and every item where the reorder point hasn&#8217;t been updated in over 12 months.&quot;<\/em> What used to require a consultant engagement and weeks of analysis becomes a 15-minute conversation with actionable output \u2014 a prioritized list of parameter misalignments ranked by inventory cost impact.<\/p>\n<p><strong>Demand sensing from unstructured signals.<\/strong> Connect Claude Code to your Slack workspace via MCP, and ask it to scan procurement and sales channels for mentions of supply disruptions, customer complaints, or unusual order patterns. It can synthesize those signals into a daily briefing that your planning team reviews every morning \u2014 a lightweight demand sensing layer that costs nothing but an MCP configuration.<\/p>\n<p><strong>Supplier performance dashboards from raw ERP data.<\/strong> Describe the KPIs you need \u2014 on-time delivery rate, quality rejection rate, lead time variability by supplier \u2014 and Claude Code builds the full analytics pipeline: data extraction query, R transformation script, ggplot visualizations, and a self-contained HTML dashboard. The <a href=\"Dashboards\/2026-03-02_Mastering_Claude_Code_Guide_dashboard.html\">interactive dashboard for this post<\/a> was built exactly this way.<\/p>\n<p><strong>S&amp;OP report automation.<\/strong> Monthly sales and operations planning reports follow the same structure every cycle \u2014 demand vs. forecast accuracy, inventory turns by product family, capacity utilization, and exception flags. Package the entire report generation as a Claude Code skill: one slash command pulls the data, runs the analysis, generates the charts, and saves the executive summary. Your team spends time <em>interpreting<\/em> the report instead of <em>building<\/em> it.<\/p>\n<p><strong>Shared team conventions via CLAUDE.md.<\/strong> Your supply chain analytics team has conventions \u2014 date formats, standard KPI definitions, approved data sources, naming rules for planning parameters. Encode these in a shared <code>CLAUDE.md<\/code> checked into your team&#8217;s repository. Every team member&#8217;s Claude Code session automatically follows the same rules, producing consistent output regardless of who runs the analysis.<\/p>\n<h2>Interactive Dashboard<\/h2>\n<p>Explore the full command reference yourself \u2014 search commands, filter by difficulty level, and build your own quick-reference cards.<\/p>\n<div class=\"dashboard-link\" style=\"margin:2em 0; padding:1.5em; background:#f8f9fa; border-left:4px solid #0073aa; border-radius:4px;\">\n<p style=\"margin:0 0 0.5em 0; font-size:1.1em;\"><strong>Interactive Dashboard<\/strong><\/p>\n<p style=\"margin:0 0 1em 0;\">Explore the data yourself \u2014 adjust parameters and see the results update in real time.<\/p>\n<p><a href=\"https:\/\/inphronesys.com\/wp-content\/uploads\/2026\/03\/2026-03-02_Mastering_Claude_Code_Guide_dashboard-2.html\" target=\"_blank\" style=\"display:inline-block; padding:0.6em 1.2em; background:#0073aa; color:#fff; text-decoration:none; border-radius:4px; font-weight:bold;\">Open Interactive Dashboard &rarr;<\/a><\/div>\n<h2>Your Next Steps<\/h2>\n<p>You don&#8217;t need to absorb all of this at once. The learning curve is real, but every level delivers immediate value. Here&#8217;s your week-by-week plan:<\/p>\n<ol>\n<li>\n<p><strong>This afternoon: Install and explore.<\/strong> Run <code>curl -fsSL https:\/\/claude.ai\/install.sh | bash<\/code>, launch it in a project directory, and ask it to explain a file you&#8217;re working with. Get comfortable with the conversational interface. Use <code>\/help<\/code> when you&#8217;re stuck.<\/p>\n<\/li>\n<li>\n<p><strong>This week: Write your CLAUDE.md.<\/strong> This is the single highest-leverage action for intermediate productivity. Document your project commands, conventions, and critical rules in a <code>CLAUDE.md<\/code> file at your project root. Run <code>\/init<\/code> for a starter template, then customize it.<\/p>\n<\/li>\n<li>\n<p><strong>Next week: Master Plan Mode.<\/strong> Practice the Explore-Plan-Build-Commit cycle with Shift+Tab twice on a real task. Start with something low-risk \u2014 a code cleanup, a new utility function, a test suite. Notice how plan-then-execute produces better results than stream-of-consciousness prompting.<\/p>\n<\/li>\n<li>\n<p><strong>Week three: Build your first skill.<\/strong> Take a repetitive workflow (weekly report, data validation, forecast update) and package it as a skill in <code>.claude\/skills\/<\/code>. The time investment is 10 minutes. The time saved per execution is 30+ minutes, forever.<\/p>\n<\/li>\n<li>\n<p><strong>Week four: Go parallel.<\/strong> Create your first git worktree, run two Claude Code sessions simultaneously, and experience the multiplicative productivity gain firsthand. Once you feel the speed of parallel sessions, you&#8217;ll never go back to single-threaded work.<\/p>\n<\/li>\n<\/ol>\n<details>\n<summary><strong>Show R Code<\/strong><\/summary>\n<pre><code class=\"language-r\"># =============================================================================\n# Supply Chain Quick-Start: Demand Analysis with Claude Code\n# =============================================================================\n# This is the kind of analysis you can ask Claude Code to generate\n# in under 60 seconds. Try it yourself:\n#\n#   &quot;Read my demand data and create a Pareto chart of spend by supplier,\n#    a demand trend with forecast, and an ABC classification summary.&quot;\n#\n# Required: ggplot2, dplyr, scales\n# =============================================================================\n\nlibrary(ggplot2)\nlibrary(dplyr)\nlibrary(scales)\n\nset.seed(42)\n\n# --- Custom theme (Claude Code would generate this from your CLAUDE.md) ---\ntheme_scm &lt;- theme_minimal(base_size = 13) +\n  theme(\n    plot.title = element_text(face = &quot;bold&quot;, size = 14),\n    plot.subtitle = element_text(color = &quot;grey40&quot;, size = 11),\n    panel.grid.minor = element_blank(),\n    legend.position = &quot;bottom&quot;\n  )\n\n# --- Color palette ---\ncol_a &lt;- &quot;#e74c3c&quot;   # A-class (high value)\ncol_b &lt;- &quot;#e67e22&quot;   # B-class (medium)\ncol_c &lt;- &quot;#27ae60&quot;   # C-class (low value)\ncol_primary &lt;- &quot;#2980b9&quot;\n\n# =============================================================================\n# SAMPLE DATA \u2014 Replace with your own!\n# =============================================================================\n# 12 months of weekly demand for a distribution center\n# In practice, you'd load this from CSV:\n#   demand &lt;- read.csv(&quot;data\/demand_weekly.csv&quot;)\n\nweeks &lt;- seq(as.Date(&quot;2025-01-06&quot;), as.Date(&quot;2025-12-29&quot;), by = &quot;week&quot;)\nn_weeks &lt;- length(weeks)\n\ndemand &lt;- data.frame(\n  week = weeks,\n  demand = round(\n    500 +                                    # base demand\n    seq(0, 80, length.out = n_weeks) +       # upward trend\n    60 * sin(2 * pi * (1:n_weeks) \/ 52) +    # annual seasonality\n    rnorm(n_weeks, 0, 30),                   # random noise\n    0\n  )\n)\n\n# Supplier spend data (typical procurement export)\nsuppliers &lt;- data.frame(\n  supplier = paste0(&quot;Supplier_&quot;, LETTERS[1:15]),\n  annual_spend = c(\n    450000, 320000, 280000, 180000, 120000,\n    95000, 72000, 55000, 38000, 25000,\n    18000, 12000, 8000, 5000, 3000\n  )\n)\n\n# =============================================================================\n# CHART 1: Supplier Pareto Analysis (ABC Classification)\n# =============================================================================\n\npareto &lt;- suppliers %&gt;%\n  arrange(desc(annual_spend)) %&gt;%\n  mutate(\n    cumulative_spend = cumsum(annual_spend),\n    cumulative_pct = cumulative_spend \/ sum(annual_spend) * 100,\n    abc_class = case_when(\n      cumulative_pct &lt;= 80 ~ &quot;A&quot;,\n      cumulative_pct &lt;= 95 ~ &quot;B&quot;,\n      TRUE ~ &quot;C&quot;\n    ),\n    supplier = factor(supplier, levels = supplier)\n  )\n\nggplot(pareto, aes(x = supplier, y = annual_spend \/ 1000)) +\n  geom_col(aes(fill = abc_class), width = 0.7) +\n  geom_line(\n    aes(y = cumulative_pct * max(annual_spend) \/ 100000, group = 1),\n    color = &quot;grey30&quot;, linewidth = 0.8\n  ) +\n  geom_point(\n    aes(y = cumulative_pct * max(annual_spend) \/ 100000),\n    color = &quot;grey30&quot;, size = 2\n  ) +\n  geom_hline(\n    yintercept = 80 * max(pareto$annual_spend) \/ 100000,\n    linetype = &quot;dashed&quot;, color = col_a, alpha = 0.5\n  ) +\n  annotate(&quot;text&quot;,\n    x = 14, y = 80 * max(pareto$annual_spend) \/ 100000 + 15,\n    label = &quot;80% threshold&quot;, color = col_a, size = 3, fontface = &quot;italic&quot;\n  ) +\n  scale_fill_manual(\n    values = c(&quot;A&quot; = col_a, &quot;B&quot; = col_b, &quot;C&quot; = col_c),\n    name = &quot;ABC Class&quot;\n  ) +\n  scale_y_continuous(\n    labels = dollar_format(prefix = &quot;$&quot;, suffix = &quot;k&quot;),\n    sec.axis = sec_axis(~ . * 100000 \/ max(pareto$annual_spend),\n                        name = &quot;Cumulative %&quot;,\n                        labels = function(x) paste0(round(x), &quot;%&quot;))\n  ) +\n  labs(\n    title = &quot;Supplier Spend Pareto Analysis&quot;,\n    subtitle = &quot;ABC classification \u2014 4 suppliers account for 80% of total spend&quot;,\n    x = NULL, y = &quot;Annual Spend&quot;\n  ) +\n  theme_scm +\n  theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 10))\n\n# ggsave(&quot;Images\/pareto_analysis.png&quot;, width = 8, height = 5,\n#        dpi = 100, bg = &quot;white&quot;)\n\n# =============================================================================\n# CHART 2: Demand Trend with Simple Moving Average Forecast\n# =============================================================================\n\n# 4-week moving average\ndemand &lt;- demand %&gt;%\n  mutate(\n    ma_4 = zoo::rollmean(demand, k = 4, fill = NA, align = &quot;right&quot;)\n  )\n\n# Simple forecast: extend the moving average 8 weeks ahead\nlast_ma &lt;- tail(na.omit(demand$ma_4), 1)\nlast_trend &lt;- mean(diff(tail(na.omit(demand$ma_4), 8)))\n\nforecast_weeks &lt;- seq(max(demand$week) + 7, by = &quot;week&quot;, length.out = 8)\nforecast_df &lt;- data.frame(\n  week = forecast_weeks,\n  forecast = last_ma + last_trend * (1:8),\n  lower = last_ma + last_trend * (1:8) - 1.96 * sd(demand$demand - demand$ma_4,\n                                                      na.rm = TRUE),\n  upper = last_ma + last_trend * (1:8) + 1.96 * sd(demand$demand - demand$ma_4,\n                                                      na.rm = TRUE)\n)\n\nggplot() +\n  # Forecast confidence interval\n  geom_ribbon(\n    data = forecast_df,\n    aes(x = week, ymin = lower, ymax = upper),\n    fill = col_primary, alpha = 0.15\n  ) +\n  # Actual demand\n  geom_line(\n    data = demand,\n    aes(x = week, y = demand),\n    color = &quot;grey60&quot;, linewidth = 0.5\n  ) +\n  geom_point(\n    data = demand,\n    aes(x = week, y = demand),\n    color = &quot;grey60&quot;, size = 1\n  ) +\n  # Moving average\n  geom_line(\n    data = demand,\n    aes(x = week, y = ma_4),\n    color = col_primary, linewidth = 1\n  ) +\n  # Forecast line\n  geom_line(\n    data = forecast_df,\n    aes(x = week, y = forecast),\n    color = col_a, linewidth = 1, linetype = &quot;dashed&quot;\n  ) +\n  scale_y_continuous(labels = comma_format()) +\n  labs(\n    title = &quot;Weekly Demand: Trend + 8-Week Forecast&quot;,\n    subtitle = &quot;Blue = 4-week moving average | Red dashed = forecast with 95% CI&quot;,\n    x = NULL, y = &quot;Units Demanded&quot;\n  ) +\n  theme_scm\n\n# ggsave(&quot;Images\/demand_forecast.png&quot;, width = 8, height = 5,\n#        dpi = 100, bg = &quot;white&quot;)\n\n# =============================================================================\n# SUMMARY TABLE: ABC Classification Results\n# =============================================================================\n\nabc_summary &lt;- pareto %&gt;%\n  group_by(abc_class) %&gt;%\n  summarise(\n    n_suppliers = n(),\n    total_spend = sum(annual_spend),\n    pct_of_spend = sum(annual_spend) \/ sum(suppliers$annual_spend) * 100,\n    .groups = &quot;drop&quot;\n  ) %&gt;%\n  mutate(\n    pct_of_suppliers = n_suppliers \/ nrow(suppliers) * 100,\n    recommendation = case_when(\n      abc_class == &quot;A&quot; ~ &quot;Strategic partnerships, quarterly reviews&quot;,\n      abc_class == &quot;B&quot; ~ &quot;Regular monitoring, annual contracts&quot;,\n      abc_class == &quot;C&quot; ~ &quot;Simplify ordering, consider consolidation&quot;\n    )\n  )\n\ncat(&quot;\\n=== ABC Classification Summary ===\\n&quot;)\nprint(abc_summary)\n\n# =============================================================================\n# APPLY TO YOUR OWN DATA\n# =============================================================================\n# Replace the sample data above with your own:\n#\n# demand &lt;- read.csv(&quot;your_demand_data.csv&quot;)       # columns: week, demand\n# suppliers &lt;- read.csv(&quot;your_supplier_spend.csv&quot;)  # columns: supplier, annual_spend\n#\n# Or ask Claude Code:\n#   &quot;Read data\/procurement_q1.csv and run this ABC analysis on it.\n#    Adjust the column names to match my data.&quot;\n#\n# Claude Code will adapt the script to your specific file format,\n# column names, and business rules \u2014 no manual editing needed.\n# =============================================================================\n<\/code><\/pre>\n<\/details>\n<h2>References<\/h2>\n<ol>\n<li>\n<p>Cherny, B. (2025). &quot;The Boris Way: Claude Code Best Practices.&quot; <em>Grit AI Studio Guides<\/em>. guides.gritai.studio.<\/p>\n<\/li>\n<li>\n<p>Cherny, B. (2025). &quot;How Boris Uses Claude Code.&quot; howborisusesclaudecode.com.<\/p>\n<\/li>\n<li>\n<p>Anthropic. (2025). &quot;Claude Code Documentation.&quot; code.claude.com.<\/p>\n<\/li>\n<li>\n<p>Anthropic. (2025). &quot;Claude Code: Best Practices for Agentic Coding.&quot; anthropic.com\/engineering\/claude-code-best-practices.<\/p>\n<\/li>\n<li>\n<p>McConnell, S. (2004). <em>Code Complete: A Practical Handbook of Software Construction<\/em>. 2nd ed. Microsoft Press.<\/p>\n<\/li>\n<li>\n<p>Forsgren, N., Humble, J., &amp; Kim, G. (2018). <em>Accelerate: The Science of Lean Software and DevOps<\/em>. IT Revolution Press.<\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Boris Cherny merges 250+ PRs a month with Claude Code. Here&#8217;s every trick \u2014 from your first \/clear to running 10 parallel sessions \u2014 organized by difficulty level.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[139,187],"tags":[194,189,195,188,193,190,192,191],"class_list":["post-1252","post","type-post","status-publish","format-standard","hentry","category-artificial-intelligence","category-data-science-tools","tag-agentic-coding","tag-ai-coding","tag-boris-cherny","tag-claude-code","tag-claude-md","tag-developer-tools","tag-supply-chain-automation","tag-terminal-ai"],"_links":{"self":[{"href":"https:\/\/inphronesys.com\/index.php?rest_route=\/wp\/v2\/posts\/1252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/inphronesys.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inphronesys.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inphronesys.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/inphronesys.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1252"}],"version-history":[{"count":1,"href":"https:\/\/inphronesys.com\/index.php?rest_route=\/wp\/v2\/posts\/1252\/revisions"}],"predecessor-version":[{"id":1253,"href":"https:\/\/inphronesys.com\/index.php?rest_route=\/wp\/v2\/posts\/1252\/revisions\/1253"}],"wp:attachment":[{"href":"https:\/\/inphronesys.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inphronesys.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inphronesys.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}