Become a Top 10% Claude Code User
A comprehensive, hands-on training program for knowledge workers who want to master Claude Code for real business impact -- no coding background required.
9 Progressive Modules
From foundations to advanced agent teams, with quizzes and hands-on exercises throughout.
Business-First Examples
Every module includes real-world examples: dashboards, data analysis, reports, automation, and more.
Expert Insights
Learn from Boris Cherny (Claude Code creator), Nate B. Jones, and other top practitioners.
Track Your Progress
Mark sections complete, take quizzes, and earn your certificate of completion.
Version History
| Version | Date | Changes |
|---|---|---|
| v2.1 | 2026-03-07 | Fact-check & R code review. Fixed: hook event count (19→16), outdated Opus 4.5 model reference, Nate Jones cost figure ($0.15→$0.10) and clarified case study attribution, replaced unverified /agents command with /config, removed unverified Ctrl+\ and Ctrl+S shortcuts, corrected # shortcut description, softened unverifiable 30-50% cost claim. R code: added missing library(scales) import, removed unused metric_col parameter. |
| v2.0 | 2026-03-07 | Rebranded from supply-chain-specific to general knowledge worker audience. Replaced all domain-specific examples with broadly applicable business scenarios. Updated exercises, R code samples, dashboard examples, and certificate text. Added version history. |
| v1.2 | 2026-03-07 | Content audit: added dedicated teaching sections for "Compounding Engineering" and the "2-Correction Rule" to ensure all quiz topics are covered in preceding material. |
| v1.1 | 2026-03-07 | Fixed layout rendering bug (CSS grid + fixed sidebar double-offset). Sidebar now uses position:fixed with margin-left on main content. |
| v1.0 | 2026-03-07 | Initial release. 9 modules covering Claude Code fundamentals through advanced features. Interactive quizzes, progress tracking, expert profiles, 30 actionable tips, final assessment, and printable certificate. |
Foundations Refresher
Quick refresher on everything Claude Code can do, all the environments it runs in, and the key commands and shortcuts you should know cold.
What Claude Code Can Do
Claude Code is not just a code autocompleter. It's a full-featured agentic coding assistant that reads your entire codebase, runs terminal commands, searches across files, creates commits, opens PRs, and iterates on its own work. Think of it as a senior developer that works alongside you in the terminal.
Key capabilities at a glance:
- Read & edit files across your entire project simultaneously
- Run terminal commands -- build, test, deploy, analyze data
- Search code with grep and glob patterns for instant navigation
- Create git commits and PRs with descriptive messages
- Self-verify by running tests, comparing screenshots, checking outputs
- Work in parallel via multiple sessions, subagents, and agent teams
- Connect to external tools through MCP (databases, APIs, Slack, Jira)
- Build entire applications from natural language descriptions
Claude Code can build interactive dashboards, analyze CSV/Excel data, automate scripts, generate reports, and create entire applications -- all from conversational prompts. You don't need to be a developer to use it effectively.
Execution Environments
Claude Code runs everywhere. Choose the environment that fits your workflow:
| Environment | Best For | Key Feature |
|---|---|---|
| Terminal CLI | Full power, scripting, automation | Complete feature set, pipes, background tasks |
| VS Code Extension | Editing with inline diffs | Side-by-side diff review, multiple conversations |
| JetBrains IDEs | IntelliJ/PyCharm/WebStorm users | Interactive diff viewing, IDE integration |
| Desktop App | Visual diff review, multi-session | Standalone app, multiple parallel sessions |
| Web (claude.ai/code) | Remote work, long-running tasks | Cloud execution, no local setup needed |
| Mobile | Quick checks, voice prompts | Monitor & steer sessions on the go |
You can start a task locally and continue on the web with /teleport, or run 5+ sessions in parallel on claude.ai/code while keeping your terminal focused on implementation.
Slash Commands Reference
These are the commands you type directly in the Claude Code input. Master these to navigate faster:
| Command | What It Does | When to Use |
|---|---|---|
/help | Show documentation and help | When you need guidance |
/clear | Reset conversation context | Between unrelated tasks |
/compact | Compress conversation history | Context getting large (70%+) |
/rewind | Undo changes and restore state | Claude went wrong direction |
/init | Initialize CLAUDE.md for project | New project setup |
/memory | View/edit CLAUDE.md and auto memory | Review project instructions |
/cost | Show token usage and costs | Monitor spending |
/doctor | Diagnose configuration issues | Something isn't working |
/permissions | Configure tool access | Pre-approve common commands |
/model | Switch AI model | Change between Opus/Sonnet/Haiku |
/status | Show session information | Check current state |
/mcp | Manage MCP server connections | Connect databases, APIs, tools |
/hooks | Manage automation hooks | Set up auto-formatting, guards |
/vim | Toggle vim keybindings | Vim users |
/sandbox | Enable OS-level isolation | Running untrusted code safely |
/config | Open settings interface | Adjust permissions, model, preferences |
/rename | Name your session | Organizing multiple sessions |
/context | View context window usage | Monitoring token consumption |
/simplify | Review and refactor changed code | After implementation, cleanup pass |
/batch | Large-scale parallel changes | Migrations, bulk refactoring |
Keyboard Shortcuts
Speed up your workflow with these essential shortcuts:
| Shortcut | Action |
|---|---|
Escape | Stop Claude mid-response |
Shift+Tab | Cycle permission modes |
Ctrl+C | Cancel current operation |
Ctrl+D | Exit Claude Code |
Ctrl+R | Open history search |
Ctrl+T | Toggle task list |
Ctrl+B | Background current task |
Ctrl+G | Open in external editor |
Ctrl+V / Alt+V | Paste image |
Cmd+P | Open model picker |
Cmd+T | Toggle extended thinking |
@ | Reference a file |
# | Quick memory note |
! | Run a bash command inline |
Customize all keybindings by editing ~/.claude/keybindings.json. You can even create chord shortcuts (e.g., Ctrl+K Ctrl+S).
Knowledge Check
Which command should you use between unrelated tasks to prevent context pollution?
/clear resets the conversation context entirely, giving you a fresh start. /compact compresses but keeps context. /rewind undoes the last action.Knowledge Check
What keyboard shortcut stops Claude mid-response if it's going in the wrong direction?
Escape stops Claude mid-response. Ctrl+C cancels the current operation entirely, while Ctrl+D exits Claude Code.Mastering CLAUDE.md & Memory
Configure Claude Code to understand your project, your team's conventions, and your personal preferences through the CLAUDE.md hierarchy and auto memory system.
The CLAUDE.md Hierarchy
CLAUDE.md files are persistent instructions that Claude Code reads at the start of every session. They work like a "briefing document" for your AI assistant. Multiple levels exist, and they cascade from highest to lowest priority:
Each level has a purpose:
- Managed Policy -- Enterprise-level rules enforced by IT (e.g.,
/Library/Application Support/ClaudeCode/CLAUDE.mdon macOS) - Project CLAUDE.md -- Checked into git, shared with your team. Contains build commands, coding standards, and project-specific instructions.
- User CLAUDE.md -- Your personal preferences that apply across all projects. Style preferences, preferred tools, etc.
- Local CLAUDE.local.md -- Personal overrides for a specific project. Not version controlled.
- .claude/rules/ -- Modular rules that activate only for matching file paths.
What to Put in CLAUDE.md
Keep your CLAUDE.md under 200 lines. It loads into context every session, so every line costs tokens. Focus on things Claude can't guess:
- Build/test commands --
Rscript run_tests.R,npm run build - Coding conventions that differ from defaults -- "Use tidyverse style, pipe with |>"
- Repository etiquette -- branch naming, PR conventions, commit message format
- Architectural decisions -- "We use data.table for performance-critical operations"
- Common gotchas -- "The forecast column is actually demand, not projections"
# Business Analytics Project
## Build & Test
- Run analysis: `Rscript src/main.R` or `python src/main.py`
- Run tests: `Rscript -e "testthat::test_dir('tests')"`
- Generate report: `quarto render reports/monthly.qmd`
## Conventions
- Use tidyverse style for R (snake_case, |> pipe)
- All dates in ISO 8601 format (YYYY-MM-DD)
- CSV files go in data/raw/, processed data in data/clean/
- Visualizations: ggplot2 with our custom theme (R/theme_company.R)
## Architecture
- data/ -- raw and processed data files
- R/ -- reusable functions and utilities
- src/ -- main analysis scripts
- reports/ -- Quarto reports
- tests/ -- testthat test files
## Important
- Never commit files in data/raw/ (may contain sensitive client data)
- The "revenue" column is in USD cents, not dollars
- Always validate results against source data in data/clean/actuals.csv
Compounding Engineering: A Best Practice from Boris Cherny
Boris Cherny, the creator of Claude Code, calls his team's approach to CLAUDE.md "Compounding Engineering". The idea: your team's institutional knowledge should grow with every PR. His team updates their CLAUDE.md multiple times per week by tagging PR review findings with @.claude. A GitHub Action then adds those learnings directly to the project's CLAUDE.md.
Over time, CLAUDE.md becomes a living document that captures every mistake, every convention, and every architectural decision. Each session, Claude starts smarter because of everything the team has learned before. This compounding effect is what separates teams that get steadily better results from those that keep fighting the same issues.
Start your own Compounding Engineering practice: after every significant PR or debugging session, add one learning to your CLAUDE.md. Even solo developers benefit -- your future self will thank you.
Modular Rules with .claude/rules/
For path-specific instructions, create files in .claude/rules/ with frontmatter that specifies which file paths they apply to:
---
paths:
- "R/**/*.R"
- "src/**/*.R"
---
# R Code Rules
- Use tidyverse conventions (snake_case, |> pipe operator)
- All functions must have roxygen2 documentation
- Use stopifnot() for input validation
- Prefer purrr::map() over base lapply()
---
paths:
- "reports/**/*.qmd"
- "reports/**/*.Rmd"
---
# Report Rules
- Use professional tone, no jargon
- Include executive summary at top
- All charts must have titles, axis labels, and source notes
- Tables must be formatted with kableExtra
Rules files load only when Claude is working on matching paths, keeping context lean and relevant.
Auto Memory System
Claude Code automatically accumulates learnings across sessions. These are stored at ~/.claude/projects/<project>/memory/ as plain Markdown files.
- MEMORY.md -- First 200 lines load every session. Keep it concise.
- Topic files (e.g.,
debugging.md,patterns.md) -- Loaded on demand when relevant. - Manage with
/memorycommand -- view, edit, or clear memories. - Toggle with
autoMemoryEnabledsetting.
What gets remembered automatically:
- Build commands that work (and ones that don't)
- Debugging insights you teach Claude
- Code patterns and preferences confirmed across sessions
- File locations Claude frequently needs
Auto memory can accumulate stale entries. Periodically review with /memory and clean out anything outdated. If Claude keeps making the same mistake, check whether a wrong memory is causing it.
Import Syntax and Organization
Use @path/to/file in your CLAUDE.md to include content from other files. This lets you keep the main CLAUDE.md lean while referencing detailed documentation:
# Project Instructions
@.claude/rules/r-conventions.md
@.claude/rules/data-pipeline.md
@docs/architecture-overview.md
Organization strategy:
- Main CLAUDE.md: <200 lines -- high-level overview and critical rules
- Move detailed instructions to
.claude/rules/or skill files - Use @imports for reference material that doesn't change often
- Keep frequently-changing instructions in the main file
Exercise: Draft Your CLAUDE.md
Hands-On Exercise
Write a CLAUDE.md for a data analytics project in your domain. Include:
- Build/test commands for an R project
- Data conventions (file locations, date formats, column naming)
- At least 3 coding conventions specific to your workflow
- One "gotcha" that Claude needs to know about
- An architecture overview of your project structure
Hint: Start with claude /init to auto-generate a starting point, then customize it with your domain knowledge.
Knowledge Check
What is the recommended maximum length for a project CLAUDE.md file?
Knowledge Check
Where should you put path-specific instructions that only apply to R files?
paths: globs. Rules only load when Claude works on matching files, keeping context lean.Knowledge Check
What does Boris Cherny call the practice of continuously adding PR review learnings to CLAUDE.md?
Prompt Engineering for Claude Code
Master the art of communicating with Claude Code: be specific, provide context, course-correct, and chain complex tasks together.
Being Specific: The #1 Skill
Vague prompts produce vague results. Specific prompts produce specific, correct results. Here's the difference:
"Fix the data loading code"
"In R/load_data.R, the read_csv() call on line 23 fails when the supplier CSV has empty date columns. Add na = c('', 'NA', 'N/A') to handle missing dates, and add a validation check that stops with a clear error if required columns (supplier_id, lead_time, quantity) are missing."
What makes a prompt specific:
- File paths -- Tell Claude exactly where to look:
@R/forecast.R - Constraints -- "Use only tidyverse functions", "Keep under 50 lines"
- Verification criteria -- "The test in tests/test_forecast.R should pass"
- Expected behavior -- "Should return a tibble with columns: date, forecast, lower_95, upper_95"
A well-structured prompt has three parts: Context (what exists), Objective (what you want), and Constraints (boundaries and verification). This structure reduces back-and-forth by 50%.
The Explore → Plan → Implement → Commit Workflow
This is Anthropic's recommended 4-phase workflow for complex tasks. It's how Boris Cherny's team writes production code:
Explore
Use Plan Mode (Shift+Tab) to read files without changes
Plan
Ask Claude for a detailed implementation plan, iterate until satisfied
Implement
Switch to auto-accept mode, Claude executes the plan
Commit
Review changes, create PR with descriptive message
# Phase 1: Explore (Plan Mode)
# Press Shift+Tab to enter Plan Mode
# "Read the files in R/forecast/ and explain the current forecasting approach"
# Phase 2: Plan
# "Create a detailed plan to add ARIMA forecasting alongside the existing
# exponential smoothing. Show me what files to create and modify."
# Phase 3: Implement (switch to auto-accept)
# Press Shift+Tab to switch to acceptEdits mode
# "Implement the plan. Run the tests after each major change."
# Phase 4: Commit
# "Create a commit with a descriptive message explaining the ARIMA addition"
For a quarterly business review, Phase 1 lets you explore existing data and reports, Phase 2 helps design the analysis approach, Phase 3 builds the dashboards and visualizations, and Phase 4 commits everything for your team.
Providing Rich Context
Claude Code can ingest context from multiple sources. The more relevant context you provide, the better the output:
| Method | Syntax | Best For |
|---|---|---|
| File references | @path/to/file.R | Point Claude to specific files |
| Images | Ctrl+V to paste | Screenshots of dashboards, error dialogs |
| URLs | Paste URL directly | Documentation, API references |
| Piped data | cat data.csv | claude | Small datasets for analysis |
| Shell output | ! prefix in prompt | Dynamic context from commands |
# Pipe data for analysis
cat data/clean/inventory_levels.csv | claude "Analyze this inventory data. \
Find items below safety stock and suggest reorder quantities."
# Reference multiple files
# In the Claude Code prompt:
# "Using @R/forecast.R and @R/inventory.R, create a combined
# demand-forecast-to-reorder-point pipeline"
# Use shell output as context
# "The output of !Rscript -e 'sessionInfo()' shows my R setup.
# Install any missing packages needed for time series analysis."
Course-Correcting
When Claude goes in the wrong direction, you have three escalating options:
| Action | When to Use | What Happens |
|---|---|---|
| Escape | Claude is mid-response, going wrong | Stops generation, you can redirect |
| /rewind | Claude made changes you don't want | Undoes file changes and restores conversation state |
| /clear | After 2+ failed corrections | Full context reset, start fresh with better prompt |
The 2-Correction Rule
This is one of the most important habits to develop: if you've corrected Claude twice and it's still not producing the right result, stop correcting and use /clear. Write a completely fresh prompt from scratch with all the context included upfront.
Why does this work? When you keep correcting within the same conversation, the accumulated wrong context -- failed attempts, misunderstandings, dead-end approaches -- pollutes the context window. Claude tries to reconcile all of it, which often makes things worse. A clean prompt with clear instructions will almost always outperform a long chain of corrections.
Think of it like giving directions: if someone has already taken two wrong turns, it's often faster to say "go back to the start and take Main Street" than to try to navigate from wherever they ended up.
This applies to all Claude Code interactions, not just coding. If you're generating a report and the second revision still isn't right, /clear and write a more specific prompt rather than continuing to tweak.
Prompt Chaining: Decomposing Complex Tasks
Don't ask Claude to do everything at once. Break complex tasks into a chain of focused prompts:
# Chain 1: Data Understanding
"Read data/raw/purchase_orders.csv and describe the schema,
data quality issues, and date range."
# Chain 2: Data Cleaning
"Based on your analysis, write an R script that cleans this data:
handle missing values, standardize date formats, remove duplicates."
# Chain 3: Analysis
"Using the cleaned data, calculate: average lead time by supplier,
on-time delivery rate, and order fill rate."
# Chain 4: Visualization
"Create a ggplot2 dashboard with 4 charts showing these KPIs.
Use our custom theme from @R/theme_report.R"
# Chain 5: Report
"Generate a Quarto report combining the analysis and visualizations
with executive summary and recommendations."
Each step builds on the previous output, and Claude can verify each step before moving on. If step 3 goes wrong, you only need to redo steps 3-5, not start over.
Context Window Management
Your context window is the fundamental constraint. As it fills, Claude's performance degrades. Manage it aggressively:
- /clear between unrelated tasks -- the most important habit
- /compact proactively at ~70% context usage -- don't wait for auto-compaction
- Subagents for exploration -- "Use a subagent to investigate how the authentication module works." The subagent uses its own context window and returns a summary.
- Custom /statusline to display context usage so you always know where you stand
# Check context usage
/context
# Compact when getting large
/compact
# Delegate research to keep main context clean
"Use an Explore subagent to find all files that read from the
inventory database and summarize the patterns used."
Context management is what separates good Claude Code users from great ones. Top users treat /clear like saving a file -- they do it constantly, between every distinct task.
Exercise: Rewrite Bad Prompts
Hands-On Exercise
Rewrite each bad prompt into a great one using the techniques from this module:
Bad Prompt 1: "Make a chart of our sales data"
Bad Prompt 2: "The forecast is wrong, fix it"
Bad Prompt 3: "Set up the project"
Hint: For each, include: file paths, specific columns/data, expected output format, constraints, and verification criteria.
Knowledge Check
What are the four phases of Anthropic's recommended workflow?
Knowledge Check
What should you do after correcting Claude twice with no improvement?
/clear and start fresh. Accumulated wrong context degrades Claude's performance. A well-crafted fresh prompt will outperform continued corrections.Knowledge Check
Why should you delegate exploration to subagents?
Knowledge Check
What three parts should every well-structured prompt include?
Business Workflows
Use Claude Code for dashboards, data analysis, reporting, forecasting, and everyday business tasks -- no coding background needed.
Creating HTML Dashboards
One of Claude Code's most powerful business applications is generating self-contained interactive HTML dashboards. No server needed -- just a single file that opens in any browser.
# Example Dashboard Prompt
Create a self-contained HTML dashboard for business KPIs.
Use Chart.js (CDN) for visualizations.
Data source: @data/clean/monthly_metrics.csv
Include these sections:
1. Header with date range and key metrics (revenue, margin, customer count)
2. Line chart: Monthly revenue trend (last 12 months)
3. Bar chart: Revenue by region or department (top 10)
4. Gauge chart: Current quarterly target progress vs goal
5. Table: Key accounts with status indicators and action items
Design: Professional, dark sidebar navigation, responsive layout.
Color scheme: Blue/slate corporate theme.
Include filters for date range and department.
Save as dashboards/business-kpi.html
Claude Code will create a complete, working dashboard in a single file. The key pattern: describe what you want to see, provide the data, specify the output format.
Before creating a dashboard, decide the main decision it should support. "Which region needs more investment?" or "Where are we losing margin?" Frame your charts around that decision.
Data Analysis on CSV/Excel Files
Claude Code can directly analyze your data files. For CSV files, pipe them or reference them with @:
# Quick analysis with piped data
cat data/raw/sales_data.csv | claude "Analyze this sales data. \
Show me: top 5 products by revenue, average deal size by region, \
and identify any transactions with unusual amounts (>3 std dev from mean)."
# In-session reference
# "Read @data/raw/customer_data.csv and create a summary report:
# - Total customers by segment (enterprise/mid-market/SMB)
# - Average lifetime value by acquisition channel
# - Churn rate by cohort
# - Save the analysis as an R script in R/customer_analysis.R"
For Excel files, Claude Code can use R's readxl package or Python's openpyxl to read multi-sheet workbooks.
Report Generation & Content Creation
Automate recurring reports by teaching Claude Code your report format once:
# Report Generation Prompt
Generate the weekly business performance report using:
- Data: @data/clean/weekly_metrics.csv
- Template: @reports/templates/weekly_template.qmd
- Previous report: @reports/2026-W09.html (for comparison)
Structure:
1. Executive Summary (3-4 bullet points, highlight changes from last week)
2. KPI Dashboard (revenue, conversion rate, margin, customer satisfaction)
3. Team Performance (top/bottom 5 teams by goal attainment)
4. Risk Alerts (metrics trending below target, accounts at risk of churn)
5. Recommendations (2-3 actionable items)
Tone: Professional, data-driven, concise. Audience: VP / Department Head.
Render to reports/2026-W10.html
Forecasting Models
Claude Code can build and run forecasting models for revenue projections, headcount planning, budget forecasting, and trend analysis:
# Forecasting Prompt
Using @data/clean/monthly_revenue.csv (columns: date, segment, revenue):
1. For each segment, fit three models: ETS, ARIMA, and Prophet
2. Use last 3 months as holdout for validation
3. Select best model per segment by MAPE
4. Generate 12-month forecasts with 80% and 95% prediction intervals
5. Create a summary table: segment, best_model, MAPE, next_quarter_forecast
6. Visualize top segments with forecast bands
7. Flag any segments where all models have MAPE > 30% (needs manual review)
Save R script to R/revenue_forecast.R
Save forecasts to data/output/forecasts_12month.csv
Always include prediction intervals in forecasts -- point forecasts alone don't support good decisions. The width of the interval tells leadership how much uncertainty exists and helps size contingency budgets.
Risk Analysis
Build risk assessment tools with Claude Code for business risk management:
# Risk Analysis Prompt
Create a business risk analysis tool in R:
1. Risk Matrix: Plot likelihood vs impact for risks in @data/risk_register.csv
- Color code by risk category (financial, operational, market, regulatory)
- Label high-risk items (likelihood * impact > 15)
2. Monte Carlo Simulation: For our revenue model in @data/clean/revenue_drivers.csv
- Simulate 10,000 scenarios varying key assumptions (+/- 20%)
- Calculate probability of missing quarterly target
- Show P10, P50, P90 revenue outcomes
3. Concentration Analysis: Using @data/client_revenue.csv
- Identify revenue concentration risk (top 10 clients as % of total)
- Calculate revenue at risk if any top-5 client churns
Output: Interactive HTML report with all three analyses.
Save to reports/risk_analysis.html
Working with Data Pipelines
Claude Code excels at building ETL (Extract, Transform, Load) pipelines for business data:
# Build a data pipeline
# "Create an R script that:
# 1. Reads all CSV files from data/raw/monthly_exports/
# 2. Standardizes column names (snake_case)
# 3. Converts all dates to ISO 8601
# 4. Validates: no negative amounts, no future dates
# 5. Deduplicates by transaction_id
# 6. Joins with @data/reference/departments.csv for department names
# 7. Writes cleaned output to data/clean/transactions_combined.csv
# 8. Logs summary stats: rows processed, rows rejected, date range
# Save as R/etl_transactions.R"
Give Claude Code a verification step: "After building the pipeline, run it on the test data in data/test/ and compare output row counts with the expected values in data/test/expected_counts.csv." This catches errors before production.
Exercise: Create a Business Dashboard Prompt
Hands-On Exercise
Write a complete prompt that would generate a KPI dashboard for your team or organization. Include:
- The specific decision the dashboard supports
- At least 4 KPI metrics with targets
- 3+ chart types (line, bar, gauge, table, etc.)
- Filters (date range, location, product category)
- Data source reference and output location
- Design specifications (colors, layout, responsive)
Hint: Start with "What decision does my audience need to make?" and work backwards to the data and charts that support it.
Knowledge Check
What's the key pattern for getting Claude Code to create effective dashboards?
Knowledge Check
Why should business forecasts always include prediction intervals?
Knowledge Check
What should you include in a data pipeline prompt to catch errors before production?
R Programming with Claude Code
Leverage Claude Code for R-based data analytics: tidyverse, ggplot2, forecasting, optimization, and report automation.
Setting Up Claude Code for R
Configure your CLAUDE.md with R-specific instructions so Claude writes idiomatic R code from the start:
# R Project Configuration (for CLAUDE.md)
## R Environment
- R version: 4.4+ with Rscript at /usr/local/bin/Rscript
- Package manager: renv (run renv::restore() if packages missing)
- Run scripts: Rscript src/main.R
- Run tests: Rscript -e "testthat::test_dir('tests')"
## R Conventions
- Use tidyverse style: snake_case, |> pipe (not %>%)
- Prefer tibble over data.frame
- Use readr::read_csv() not base read.csv()
- Visualization: ggplot2 with theme_minimal() as base
- Dates: lubridate for all date manipulation
- Strings: stringr for all string operations
## Package Preferences
- Data manipulation: dplyr, tidyr, purrr
- Time series: forecast, tsibble, fable
- Optimization: lpSolve, ompr
- Reporting: quarto, kableExtra for tables
- Interactive: plotly for dashboards, DT for tables
Specify |> vs %>% in your CLAUDE.md. Claude defaults to the base pipe |> in modern R, but if your team uses magrittr's %>%, state it explicitly.
Business Calculations & Optimization in R
Claude Code can build calculation engines and optimization models for resource allocation, budgeting, and scenario analysis:
# ROI and Break-Even Analysis with Claude Code
# Prompt: "Write R functions for ROI calculation and break-even analysis"
library(tidyverse)
calculate_roi <- function(investment, returns_monthly, months, discount_rate = 0.08) {
# Simple ROI
total_return <- sum(returns_monthly[1:min(months, length(returns_monthly))])
simple_roi <- (total_return - investment) / investment
# Net Present Value
monthly_rate <- discount_rate / 12
npv <- -investment + sum(returns_monthly / (1 + monthly_rate)^seq_along(returns_monthly))
# Payback period (months)
cumulative <- cumsum(returns_monthly)
payback <- which(cumulative >= investment)[1]
tibble(simple_roi = simple_roi, npv = npv, payback_months = payback)
}
# Scenario comparison
compare_scenarios <- function(scenarios_df, weight_col = NULL) {
# Weighted scoring model for decision analysis
if (is.null(weight_col)) {
scenarios_df |> mutate(score = rowMeans(across(where(is.numeric))))
} else {
scenarios_df |> mutate(
weighted_score = rowSums(across(where(is.numeric)) * .data[[weight_col]])
)
}
}
Data Transformation with dplyr/tidyr
Claude Code writes fluent tidyverse pipelines. Give it your data structure and desired output:
# Prompt: "Transform sales data into a team performance scorecard"
library(tidyverse)
library(lubridate)
library(scales)
team_scorecard <- read_csv("data/clean/sales_activity.csv") |>
filter(activity_date >= today() - months(6)) |>
group_by(team_id, team_name) |>
summarise(
total_deals = n(),
total_revenue = sum(deal_value),
avg_deal_size = mean(deal_value, na.rm = TRUE),
win_rate = mean(status == "won", na.rm = TRUE),
avg_cycle_days = mean(days_to_close, na.rm = TRUE),
customer_sat = mean(csat_score, na.rm = TRUE),
.groups = "drop"
) |>
mutate(
composite_score = 0.3 * win_rate + 0.3 * rescale(customer_sat) +
0.2 * rescale(total_revenue) + 0.2 * (1 - rescale(avg_cycle_days)),
rank = min_rank(desc(composite_score)),
tier = case_when(
composite_score >= 0.9 ~ "Gold",
composite_score >= 0.7 ~ "Silver",
TRUE ~ "Bronze"
)
) |>
arrange(rank)
When asking Claude to build scorecards, specify the weights for your composite score. Every organization prioritizes differently -- some value revenue over customer satisfaction, others the reverse.
Forecasting & Statistical Analysis
# Prompt: "Build a multi-model forecast comparison for our revenue segments"
library(tidyverse)
library(tsibble)
library(fable)
library(fabletools)
revenue_ts <- read_csv("data/clean/monthly_revenue.csv") |>
mutate(month = yearmonth(date)) |>
group_by(segment, month) |>
summarise(revenue = sum(revenue), .groups = "drop") |>
as_tsibble(key = segment, index = month)
# Fit multiple models
models_fit <- revenue_ts |>
filter(month <= yearmonth("2025-09")) |> # training set
model(
ets = ETS(revenue),
arima = ARIMA(revenue),
snaive = SNAIVE(revenue) # seasonal naive baseline
)
# Forecast and evaluate
fc <- models_fit |>
forecast(h = "6 months")
accuracy_tbl <- models_fit |>
forecast(new_data = revenue_ts |> filter(month > yearmonth("2025-09"))) |>
accuracy(revenue_ts) |>
select(segment, .model, MAPE, RMSE) |>
arrange(segment, MAPE)
# Select best model per segment
best_models <- accuracy_tbl |>
group_by(segment) |>
slice_min(MAPE, n = 1)
Visualization: ggplot2 Business Charts
# Prompt: "Create a business theme and key visualizations"
library(ggplot2)
library(scales)
theme_business <- function(base_size = 12) {
theme_minimal(base_size = base_size) +
theme(
plot.title = element_text(face = "bold", size = rel(1.2)),
plot.subtitle = element_text(color = "grey50"),
panel.grid.minor = element_blank(),
panel.grid.major.x = element_blank(),
legend.position = "bottom",
strip.text = element_text(face = "bold")
)
}
# Performance heatmap by team and month
team_performance <- ggplot(team_data, aes(x = month, y = reorder(team, -avg_score))) +
geom_tile(aes(fill = goal_attainment), color = "white", linewidth = 0.5) +
scale_fill_gradient2(
low = "#EF4444", mid = "#F59E0B", high = "#10B981",
midpoint = 1.0,
name = "Goal Attainment"
) +
labs(title = "Team Performance by Month", x = "Month", y = NULL) +
theme_business()
# Revenue trend with target line
revenue_trend <- ggplot(monthly_metrics, aes(x = month, y = revenue)) +
geom_line(linewidth = 1, color = "#4F46E5") +
geom_point(size = 2, color = "#4F46E5") +
geom_hline(yintercept = quarterly_target / 3, linetype = "dashed", color = "#EF4444") +
annotate("text", x = max(monthly_metrics$month), y = quarterly_target / 3 * 1.02,
label = "Monthly Target", hjust = 1, color = "#EF4444", size = 3) +
scale_y_continuous(labels = dollar_format()) +
labs(title = "Monthly Revenue", y = "Revenue") +
theme_business()
R Markdown/Quarto Report Automation
# Prompt for Claude Code:
"Create a Quarto report template for our monthly business review.
File: reports/monthly_review.qmd
YAML header:
- Title: 'Monthly Business Review'
- Format: html with table of contents, code folding
- Parameters: month (default: current month), department (default: 'all')
Sections:
1. Executive Summary (auto-generated key metrics vs targets)
2. Revenue & Pipeline (actuals vs forecast, pipeline health)
3. Operational Metrics (productivity, throughput, cycle time)
4. Team Performance (goal attainment, headcount, engagement)
5. Cost Analysis (budget vs actual, cost per unit trends)
6. Action Items (auto-flagged items needing attention)
Each section should:
- Pull data from data/clean/ directory
- Include at least one ggplot2 visualization
- Show key numbers in callout boxes
- Compare current month vs previous month and vs target"
Use Quarto parameters (params$month) so the same report renders for any month. Then automate with: quarto render reports/monthly_review.qmd -P month:2026-02
Exercise: Build a Business Analytics Script
Hands-On Exercise
Write a prompt for Claude Code that generates a complete R analytics script. Your prompt should:
- Reference a specific CSV data source with column descriptions
- Include data cleaning steps (missing values, date parsing, validation)
- Calculate at least 3 business KPIs relevant to your domain
- Create at least 2 ggplot2 visualizations
- Export results to both CSV (for further analysis) and HTML (for sharing)
- Include a verification step (e.g., "row count should match input after cleaning")
Knowledge Check
What should you specify in CLAUDE.md about R pipe operators?
|> in modern R. If your team uses magrittr's %>%, state it explicitly in CLAUDE.md. Consistency across a codebase matters.Knowledge Check
When building a performance scorecard with Claude Code, what should you always specify?
Knowledge Check
What's the advantage of using Quarto parameters in recurring business reports?
quarto render -P month:2026-03.Advanced Features Mastery
Deep dive into permissions, MCP servers, hooks, skills, subagents, agent teams, and worktrees.
Permission Modes
Control how much autonomy Claude Code has. Cycle between modes with Shift+Tab:
| Mode | Behavior | Best For |
|---|---|---|
| default | Prompts for each action | Learning, sensitive projects |
| acceptEdits | Auto-accepts file edits, prompts for bash | Active coding with oversight |
| dontAsk | Auto-denies prompts (only pre-approved tools work) | Long-running unattended tasks |
| bypassPermissions | Skips all permission checks | Trusted environments only |
| plan | Read-only exploration, no changes | Exploring before implementing |
Pre-approve common safe commands with /permissions:
{
"permissions": {
"allow": [
"Bash(Rscript *)",
"Bash(quarto render *)",
"Bash(git status)",
"Bash(git diff *)",
"Bash(npm run test)",
"Read",
"Edit"
],
"deny": [
"Bash(rm -rf *)",
"Bash(git push --force *)"
]
}
}
Pre-approve safe commands via /permissions rather than using --dangerously-skip-permissions. Use wildcard patterns like "Bash(Rscript *)" for flexibility.
MCP Servers: Connecting External Tools
Model Context Protocol (MCP) lets Claude Code interact with databases, APIs, Slack, GitHub, Jira, and hundreds more:
# Add an HTTP MCP server (recommended)
claude mcp add --transport http notion https://mcp.notion.com/mcp
# Add a local stdio MCP server
claude mcp add --transport stdio airtable \
--env AIRTABLE_API_KEY=YOUR_KEY \
-- npx -y airtable-mcp-server
# Add PostgreSQL for business database queries
claude mcp add --transport stdio postgres \
-- npx -y @anthropic-ai/mcp-postgres \
"postgresql://user:pass@localhost:5432/business_data"
# List active servers
claude mcp list
# Verify connections
/mcp
Business MCP use cases:
- Database -- Query CRM data, financial records, operational metrics directly
- Slack -- Search team channels, post automated reports and alerts
- GitHub/Jira -- Create issues, track project tasks, automate workflows
- Google Sheets -- Read from shared planning spreadsheets and budgets
Too many MCP servers eat context. Disconnect unused servers and use MCP Tool Search (auto-enables when tools exceed 10% of context) to dynamically load tools on demand.
Hooks System
Hooks run custom commands at specific points in Claude Code's lifecycle. There are 16 hook events and 4 hook types:
| Event | When It Fires |
|---|---|
SessionStart | Session begins or resumes |
UserPromptSubmit | Before Claude processes your prompt |
PreToolUse | Before a tool executes (can block it) |
PostToolUse | After a successful tool call |
PostToolUseFailure | After a tool call fails |
PermissionRequest | Permission dialog appears |
Stop | Claude finishes responding |
Notification | Claude needs your attention |
ConfigChange | Configuration file changes |
SubagentStart | A subagent is spawned |
SubagentStop | A subagent finishes |
TeammateIdle | Agent team member goes idle |
TaskCompleted | A task is marked complete |
PreCompact | Before context compaction |
SessionEnd | Session closes |
InstructionsLoaded | CLAUDE.md and rules finish loading |
Hook types: command (shell command), prompt (single LLM call), agent (multi-turn subagent), HTTP (POST to endpoint).
{
"hooks": {
"PostToolUse": [{
"matcher": "Edit|Write",
"hooks": [{
"type": "command",
"command": "Rscript -e 'styler::style_file(\"$TOOL_INPUT_FILE_PATH\")'"
}]
}],
"Notification": [{
"hooks": [{
"type": "command",
"command": "osascript -e 'display notification \"Claude needs input\" with title \"Claude Code\"'"
}]
}]
}
}
Skills System
Skills are reusable, composable prompts you can invoke with a slash command. Create them in .claude/skills/ or ~/.claude/skills/:
# File: .claude/skills/sc-dashboard/SKILL.md
---
name: biz-dashboard
description: Creates a business KPI dashboard from CSV data
allowed-tools: Read, Write, Bash
argument-hint: <path-to-csv>
---
Create a self-contained HTML dashboard from the data at $ARGUMENTS.
Steps:
1. Read and analyze the CSV structure
2. Identify numeric columns suitable for KPIs
3. Create an interactive HTML dashboard with Chart.js
4. Include: summary cards, trend charts, comparison tables
5. Apply professional dark-sidebar theme
6. Save as dashboards/$(basename $ARGUMENTS .csv)-dashboard.html
Then invoke with: /biz-dashboard data/clean/quarterly_data.csv
Key frontmatter options: name, description, allowed-tools, model, context: fork (run in subagent), agent (which subagent), hooks (lifecycle hooks).
Subagents
Subagents are isolated Claude instances that run within your session with separate context windows:
- Explore -- Fast, read-only. For searching code, finding patterns. Uses cheaper model.
- Plan -- Research agent for designing implementation strategies.
- General-purpose -- Full capabilities for complex multi-step work.
Create custom subagents in .claude/agents/:
# File: .claude/agents/data-validator.md
---
name: data-validator
description: Validates business data files for quality issues
tools: Read, Bash, Glob, Grep
model: sonnet
maxTurns: 10
---
You are a data quality validator for business data.
When given a file path, check for:
- Missing values in required columns
- Date format consistency
- Negative quantities or prices
- Duplicate records
- Values outside expected ranges
Report findings as a structured summary.
Agent Teams (Experimental)
Multiple Claude Code instances working together with shared task lists and direct messaging:
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
When to use teams:
- Research with competing hypotheses (3 agents explore different forecasting approaches)
- Parallel code review (security agent, performance agent, test coverage agent)
- Cross-layer development (data pipeline agent + visualization agent + reporting agent)
Best practices: 3-5 teammates optimal. 5-6 tasks per teammate. Avoid multiple teammates editing the same file.
Worktrees for Parallel Work
Run isolated Claude Code sessions using git worktrees:
# Start Claude in an isolated worktree
claude -w feature-arima-forecast
# This creates a separate copy of your repo
# Changes in the worktree don't affect your main branch
# Perfect for experiments, parallel features, or risky refactors
Boris runs 5 parallel sessions using separate git worktrees, with color-coded terminal tabs. Each session focuses on one task with its own clean context window.
Exercise: Configure an Advanced Feature
Hands-On Exercise
Choose one of these to configure for your analytics project:
- MCP Server: Connect a PostgreSQL or SQLite database with your business data
- Hook: Create a PostToolUse hook that auto-formats R files with styler after edits
- Skill: Create a /biz-report skill that generates a Quarto business report
- Custom Agent: Create a data-validator agent that checks CSV files for quality issues
Knowledge Check
Which permission mode should you use for long-running unattended tasks?
dontAsk auto-denies unapproved prompts while allowing pre-approved tools to run. Combined with pre-approved permissions, it's the safe way to run unattended. Never use bypassPermissions unattended.Knowledge Check
What happens when too many MCP servers are connected?
Knowledge Check
What is the optimal number of teammates in an agent team?
Knowledge Check
Why are subagents valuable for context management?
Expert Profiles & Techniques
Learn from the best: Boris Cherny (Claude Code creator), Nate B. Jones, and other power users. Plus 30 actionable tips to track and adopt.
Boris Cherny -- Creator of Claude Code
Key Techniques
- 5 parallel sessions -- Runs 5 local instances + 5-10 web sessions on claude.ai/code simultaneously, with color-coded terminal tabs per task
- Plan Mode first -- Starts complex PRs in Plan Mode (Shift+Tab), iterates on plans, then switches to auto-accept for implementation
- Compounding Engineering -- Team updates CLAUDE.md multiple times per week with learnings from PR reviews using @.claude tags
- Opus with thinking -- Uses the latest Opus model with thinking mode for everything: "It's the best coding model I've ever used. Less steering + better tool use = faster overall"
- Verification as #1 priority -- Always gives Claude a way to verify: tests for code, browser checks for UI, simulators for logic
- Voice dictation -- Uses macOS dictation (fn x2) for more detailed, natural prompts
- Pre-approved permissions -- Uses /permissions with wildcard patterns rather than --dangerously-skip-permissions
- PostToolUse hooks -- Auto-formatting after code generation catches edge cases
- Custom status line -- Shows model, directory, context usage, and cost at a glance
- Challenge prompts -- "Grill me on these changes and don't make a PR until I pass your test"
Nate B. Jones -- Claude Code for Non-Coders
Key Techniques
- Business-first framing -- Positions Claude Code as a general-purpose AI agent, not just a coding tool
- Marketing automation -- Built complete marketing systems (writing analysis, content generation, scheduling) in hours for ~$0.10/week operational cost
- Cross-functional workflows -- Uses Claude Code for legal, marketing, research, HR, finance, and product management tasks
- Recruitment automation -- Paste interview transcripts, get structured analysis with Notion cards and next steps -- no coding needed
- ROI focus -- Documents concrete case studies: companies reporting 23% SQL rate boost (Syncari), $1.2M pipeline recovery, and 65% faster support response times using Claude Code workflows
- Early adopter advantage -- Emphasizes the competitive window before these workflows become common
Common Patterns Among Top 10% Users
After studying dozens of power users, these patterns emerge consistently:
- Context hygiene -- They use /clear between every distinct task. No exceptions.
- Verification-first -- Every prompt includes how to verify the output (tests, expected values, comparisons).
- Parallelism -- They run multiple sessions, use subagents for research, and delegate aggressively.
- Living CLAUDE.md -- Their project instructions evolve continuously, capturing team learnings.
- Structured prompts -- Context + Objective + Constraints, every time.
- Model awareness -- They choose Opus for complex reasoning, Sonnet for general work, Haiku for fast exploration.
- Permission optimization -- Pre-approved safe patterns reduce interruptions without sacrificing safety.
- Prompt decomposition -- Complex tasks are always broken into chains of focused prompts.
Top 30 Actionable Tips
Track which tips you already use and which you plan to adopt:
You already use 0/30 tips. You plan to adopt 0 more.
Cost Optimization & Troubleshooting
Keep costs under control, diagnose issues fast, and troubleshoot common problems.
Token Usage & Cost Tracking
Use /cost to see your current session's token usage and estimated cost. Track spending patterns to optimize your workflow:
# Check current session cost
/cost
# Run with verbose output to see token counts
claude --verbose
# Check context utilization
/context
Where tokens go:
- System prompt -- CLAUDE.md, rules, MCP tool definitions (loaded every turn)
- Conversation history -- Every message grows the context
- Tool results -- File contents, command outputs, search results
- Extended thinking -- Can consume 3-4x more tokens when enabled
Cost-Saving Strategies
These strategies are ordered by impact -- start from the top:
- Use /clear aggressively -- Fresh context between tasks. The biggest single cost saver.
- Choose the right model -- Haiku for Explore subagents (fast, cheap), Sonnet for general work, Opus only for complex reasoning.
- Use subagents for exploration -- They work in isolated context and return only a summary. Your main context stays small.
- Run /compact at 70% context -- Proactive compaction is cheaper than hitting the limit.
- Move instructions from CLAUDE.md to skills -- Skills load on-demand. CLAUDE.md loads every turn.
- Disconnect unused MCP servers -- Tool definitions consume context every turn.
- Use extended thinking only when needed -- It's powerful but expensive. Toggle with Cmd+T.
- Offload to hooks -- Auto-formatting, validation, and simple transforms via hooks are free (no LLM call).
Track your weekly Claude Code cost and context usage. Many users find that aggressive /clear usage and subagent delegation significantly reduce costs while improving output quality.
Diagnostic Commands
| Command | What It Checks |
|---|---|
/doctor | Full diagnostic: config, permissions, MCP, environment |
/status | Current session info: model, mode, session ID |
/memory | View CLAUDE.md and auto memory contents |
/mcp | Verify MCP server connections and tools |
/hooks | Review active hooks and their configurations |
/config | View and edit settings and preferences |
/context | Check context window utilization |
/cost | Token usage and estimated cost |
claude --debug | Full debug output for troubleshooting |
Common Issues & Solutions
- Check with
/memorythat the file is actually loaded - Make instructions more specific and actionable (not "write good code" but "use snake_case for all variables")
- Verify file is under 200 lines -- longer files get partially ignored
- Check for contradictions between different CLAUDE.md levels
- Use
/clearmore often between tasks - Delegate exploration to subagents instead of doing it in main context
- Run
/compactproactively at 70% - Move verbose instructions from CLAUDE.md to skills or .claude/rules/
- Disconnect unused MCP servers
- Run
/mcpto verify server status - Check that required environment variables are set (API keys, credentials)
- For stdio servers, verify the command runs manually:
npx -y server-name - For HTTP servers, verify the URL is accessible
- Run
/doctorfor comprehensive diagnostics
- Matchers are case-sensitive:
"Edit|Write"not"edit|write" - Verify hook appears in
/hooksoutput - Check that the hook script is executable (
chmod +x) - Test the hook command manually in terminal
- Check settings file syntax (valid JSON in .claude/settings.json)
- Check auto memory (
/memory) for incorrect stored learnings - Add a specific rule to CLAUDE.md: "NEVER do X, ALWAYS do Y instead"
- Use
/clearand start fresh -- accumulated wrong context causes loops - Provide a concrete counter-example in your prompt
- If persistent across sessions, update CLAUDE.md with the correction
- Pre-approve common commands:
/permissionsthen add patterns like"Bash(Rscript *)" - Use
acceptEditsmode for active coding sessions - Check
.claude/settings.jsonfor overly restrictive deny rules - Use wildcards for flexibility:
"Bash(git *)"approves all git commands
Knowledge Check
What is the single biggest cost-saving strategy in Claude Code?
Knowledge Check
What should you do first when Claude keeps repeating the same mistake across sessions?
/memory first, then update or remove the wrong entry. Also add a specific correction to CLAUDE.md.Putting It All Together
End-to-end project walkthrough, real-world use cases, final assessment, and your certificate of completion.
End-to-End: Business Analytics Dashboard Project
Here's a complete walkthrough applying everything from this training to build a business dashboard from scratch:
Setup
CLAUDE.md + permissions + project structure
Explore
Understand data in Plan Mode
Pipeline
Clean and transform data with R
Analyze
Calculate KPIs and forecasts
Visualize
Build interactive dashboard
Deploy
Generate report and commit
# Step 1: Setup (one-time)
claude /init
# Edit the generated CLAUDE.md with conventions, data locations, KPI definitions
# Step 2: Explore (Plan Mode -- Shift+Tab)
# "Read the CSV files in data/raw/ and describe schemas, date ranges,
# data quality issues. Recommend a cleaning strategy."
# Step 3: Pipeline (/clear first!)
/clear
# "Create R/etl_pipeline.R that cleans and joins the raw data files.
# Validate: no nulls in required columns, dates are valid, amounts > 0.
# Output to data/clean/business_master.csv"
# Step 4: Analyze (/clear first!)
/clear
# "Using @data/clean/business_master.csv, create R/calculate_kpis.R:
# - Revenue and margin by segment (last 6 months)
# - Customer retention rate by cohort
# - Revenue forecast (ETS) for top segments, 12-month horizon
# - Goal attainment by team
# Run the script and verify outputs."
# Step 5: Visualize (/clear first!)
/clear
# "Create a self-contained HTML dashboard from @data/output/kpi_summary.csv
# and @data/output/forecasts.csv. Include: KPI cards, trend charts,
# team scorecard table, forecast charts with prediction intervals.
# Professional theme, responsive. Save as dashboards/biz-dashboard.html"
# Step 6: Deploy
/clear
# "Create a commit with all new files. Message should describe the
# business analytics pipeline and dashboard."
Notice the pattern: /clear before every major step. Each step is a focused prompt with file references, verification criteria, and specific output expectations. This is how top 10% users work.
5 Real-World Business Use Cases
Problem: Monthly business reviews take 2 days to compile from multiple data sources.
Solution: Create a /biz-report skill that reads from your database (MCP), calculates revenue/margin/engagement metrics, generates ggplot2 charts, and renders a Quarto report. Run monthly with one command.
Result: 2 days reduced to 15 minutes. Reports are more consistent and include trend analysis.
Problem: Campaign ROI is calculated manually in spreadsheets with inconsistent methodology.
Solution: Use Claude Code to build an R pipeline that ingests campaign data from multiple channels, calculates attribution, compares CAC across channels, and forecasts optimal budget allocation using historical performance.
Result: Identified that 30% of budget was in underperforming channels. Reallocation improved overall CAC by 22%.
Problem: No early warning system for at-risk customer accounts.
Solution: Build an interactive HTML dashboard showing churn risk scores by account. Include engagement trends, usage patterns, and recommended retention actions. Updates weekly from automated data pipeline.
Result: Identified 45 at-risk accounts representing $3.2M ARR. Proactive outreach saved 78% of flagged accounts.
Problem: Finance team spends hours reconciling budget vs actual across departments.
Solution: Claude Code builds a variance analysis tool that reads budget and actual data, calculates variances by department and category, flags items exceeding 10% threshold, and generates drill-down reports.
Result: Monthly close process shortened by 3 days. Variance explanations auto-generated for 80% of line items.
Problem: No data-driven view of attrition risk, headcount planning, or compensation benchmarking.
Solution: Use Claude Code to analyze HRIS data: attrition by department and tenure, compensation band analysis, diversity metrics, and headcount forecasting. Build a Pareto analysis showing where 80% of attrition comes from 20% of causes.
Result: Identified key attrition drivers. Targeted retention programs reduced voluntary turnover by 18%.
Your Personal Claude Code Setup Checklist
Setup Checklist
Use this checklist to configure your environment for knowledge work:
- Create project CLAUDE.md with R conventions and data pipeline instructions
- Add .claude/rules/ for path-specific R and report rules
- Configure /permissions to pre-approve Rscript, quarto, and git commands
- Set up /statusline to show context usage and cost
- Create at least one custom skill (e.g., /biz-dashboard or /biz-report)
- Connect relevant MCP servers (database, Slack, or GitHub)
- Create a data-validator custom agent in .claude/agents/
- Set up Notification hook for macOS alerts
- Set up PostToolUse hook for R code auto-formatting
- Check .claude/settings.json into git for team sharing
Practice Exercises
Exercise 1: Build a Complete Analytics Pipeline
Using Claude Code, build an end-to-end analytics pipeline:
- Create a CLAUDE.md for an R-based analytics project
- Write an ETL script that cleans and validates CSV data
- Calculate 5 business KPIs from the cleaned data
- Create a ggplot2 visualization for each KPI
- Render a Quarto report with executive summary and charts
Exercise 2: Configure Advanced Features
Set up your Claude Code environment with:
- A custom skill that generates business dashboards from any CSV
- A PostToolUse hook for R file auto-formatting with styler
- A data-validator custom agent
- Pre-approved permission patterns for your R workflow
Exercise 3: Multi-Model Revenue Forecasting
Use prompt chaining to build a revenue forecasting system:
- Chain 1: Explore data quality and seasonality patterns
- Chain 2: Build and compare 3 forecasting models (ETS, ARIMA, Prophet)
- Chain 3: Select best model per segment and generate 12-month forecasts
- Chain 4: Calculate P10/P50/P90 scenarios for budget planning
- Chain 5: Create an interactive dashboard with forecast visualizations
Final Assessment
Answer all 10 questions to complete your training. Score 80% or higher to earn your certificate.
Question 1 of 10
What is the recommended maximum length for a project CLAUDE.md?
Question 2 of 10
What does Boris Cherny say is the single most important thing you can do to improve Claude Code's output quality?
Question 3 of 10
What are the four phases of the recommended Claude Code workflow?
Question 4 of 10
How do subagents help with context management?
Question 5 of 10
What should you do after correcting Claude twice with no improvement?
Question 6 of 10
What permission mode is safest for long-running unattended tasks?
Question 7 of 10
Where should path-specific instructions (e.g., "R files must use tidyverse style") be stored?
Question 8 of 10
What three parts should every well-structured prompt include?
Question 9 of 10
What is the optimal number of teammates in an agent team?
Question 10 of 10
What is the single biggest cost-saving strategy in Claude Code?