Book a 30-minute call →
KYOKOlabs
Cheat sheet · v1 · Oct 2026
[ Claude Code for agencies ]

Claude Code Cheat Sheet for Agencies

The Claude Code cheat sheet from our agency builds: setting it up inside your repos, a CLAUDE.md that holds each client’s code standards, the commands worth knowing in week one, and how to go from a client brief to a working prototype. This page is a two-minute summary; the pages after it go into detail and include files you can copy.

01 · The one-screen cheat sheet

Installation, sign-in and the commands to learn first

# macOS, Linux, WSL (Windows: see the setup docs)
curl -fsSL https://claude.ai/install.sh | bash
# in a client repo; first run signs you in
cd client-repo && claude
> /init

Sign in with a business seat for client code: Team Standard seats include Claude Code, and under commercial terms Anthropic doesn’t train on your code or prompts.

Shift+Tab cycles how much it does without asking:

Manual→Accept edits→Plan→Auto
Start and plan
/initDrafts a CLAUDE.md from the repo. Then edit it (03).
/planPlan mode: reads and proposes, changes nothing. Start every real task here.
Manage context
/clearFresh conversation, CLAUDE.md kept. Use it between tasks.
/compactSummarises to free room. Add what to keep: /compact keep the API decisions.
/contextShows what’s filling the window: files, tools, MCP, memory.
/rewindOr Esc Esc. Rolls code and chat back to a checkpoint. Shell changes aren’t tracked, so git is still your undo.
In a prompt
@pathPulls a file or folder in: @briefs/spring.md.
!Runs a shell command and shows Claude the output: !npm test.
Configure
/memoryOpens the CLAUDE.md files in play, to fix a rule on the spot.
/permissionsAllow, ask and deny rules. Commit the shared ones (02).
/mcpConnected servers (GitHub, your tracker, Figma) and their sign-in.
/hooksWhat runs automatically on every edit or command (08).
Pick up and track
/resumeBack into yesterday’s session with its context.
/usageSession cost and where you are against plan limits.
/diffEverything changed in the working tree, before you commit.
Week two
/code-reviewReviews the current diff or a PR for bugs. /review is now an alias.
/security-reviewChecks the branch for security issues before merge.
claude -pHeadless: one prompt, no chat, for scripts and CI (07).
Start withRun /init in one client repo, then spend twenty minutes cutting and correcting what it wrote. That file does more for quality than any prompt.
Kyoko Labs · Claude Code cheat sheet1 / 8
02 · Repository setup

Six steps to set up Claude Code in each client repository

  1. 01

    Use business seats for client code

    Team Standard seats include Claude Code; Premium seats carry about five times the usage, so give those to the one or two people who live in it. Under commercial terms Anthropic doesn’t train on code or prompts unless you opt in.

  2. 02

    Pick a surface per person, not per team

    Terminal, the VS Code or JetBrains extension, or the desktop app for parallel sessions. They all read the same CLAUDE.md and settings, so the standards travel.

  3. 03

    Keep one repo per client

    Standards, permissions, connectors and history never mix between clients. In a monorepo, give each client folder its own CLAUDE.md.

  4. 04

    Run /init, then edit the result

    It writes what it can infer. Cut what’s obvious from the code, add what isn’t: the client, the quality bar, the never-touch list. Every line loads into every session, so keep it short.

  5. 05

    Commit .claude/settings.json

    Allow the boring commands, ask before a push or a new dependency, deny reads of secrets, and every developer inherits the rules. A Read deny doesn’t stop a cat in the shell; the hook in A2 does.

  6. 06

    Add MCP for GitHub, the tracker and Figma

    Put them in a committed .mcp.json with tokens read from environment variables, never pasted in. Write one line per server on what it can change: GitHub can open PRs and comment, your tracker can move tickets.

.mcp.jsoncommitted; each person sets GITHUB_PAT in their own shell
{ "mcpServers": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/",
  "headers": { "Authorization": "Bearer ${GITHUB_PAT}" } } } }
Start withYour busiest client repo: /init, the settings file from A2 and GitHub over MCP. One afternoon.
03 · CLAUDE.md for client code standards

Where each layer of instructions lives and what goes in it

LayerWhere it livesShared?What goes in it
Agency-wide~/.claude/CLAUDE.md per person, or a managed policy file IT pushes to every machineManaged: yesThe non-negotiables: no secrets, branch and PR rules, how you write commits.
Per client./CLAUDE.md at the repo rootCommittedThe client’s standards. Template in A1.
PersonalCLAUDE.local.mdGitignoredYour local URLs, sandbox accounts, how you like to work.
Path rules.claude/rules/*.md with paths:CommittedRules that only load for part of the code, such as blocks or tests.
.claude/rules/blocks.md
---
paths:
  - "src/blocks/**/*.{js,jsx,php}"
---
Every block has a block.json, an editor preview
and a save() that matches the front end exactly.
Add a line when Claude makes the same mistake twice. Move procedures into skills (07). Anything that must never happen belongs in a hook (08). Pull long docs in with an import: @docs/brand.md.
Kyoko Labs · Claude Code cheat sheet2 / 8
04 · Worked example: brief to prototype

Seven prompts that take a client brief to a preview link

A spring-campaign landing page, on a repo already set up as in 02 and 03. The prompts are the ones we use; swap in your paths. Most of the quality is decided in the first two steps.

  1. 01

    Plan from the brief

    Switch to plan mode (Shift+Tab or /plan) so nothing changes yet.

    planRead @briefs/spring-campaign.md and our CLAUDE.md. Ask me up to 5 questions about anything the brief leaves open. Then propose a page map and a component list, reusing what’s already in src/components. No code yet.
  2. 02

    Revise and approve the plan

    Correct it in plain words, then accept it to leave plan mode.

    planDrop the testimonial carousel; the client has no approved quotes. The form posts to their HubSpot, not our API. Update the plan and list anything you’re assuming.
  3. 03

    Build on a branch

    Small commits make /rewind and review easy.

    buildCreate branch proto/spring-campaign. Build the plan one section at a time and commit after each with a one-line message. Use real copy from the brief, never lorem ipsum.
  4. 04

    Run it locally

    buildStart the dev server in the background and give me the URL. Then run lint, types and tests, and fix anything this branch broke.
  5. 05

    Run a reviewer subagent

    A subagent reads the diff with fresh context and CLAUDE.md as the standard (sample in A3).

    reviewUse the reviewer subagent on this branch: accessibility at our target, brand tokens, browser targets and the never-touch list. Fix what it finds, and list anything you chose not to fix and why.
  6. 06

    Open a PR with a preview link

    Your host builds the preview (Vercel, Netlify, WP Engine, Pantheon); Claude opens the PR.

    shipPush the branch and open a draft PR titled “Prototype: spring campaign”, with what’s real, what’s placeholder and how to check it. Don’t merge.
  7. 07

    Write the handover doc

    A skill, so every handover reads the same (A3).

    skill/client-handover client dev team
Start withA brief you already delivered by hand. Run the seven steps against it and compare the hours and the result.
Checks before sharing a preview
  • Placeholder is marked on the page itself, not just in the PR.
  • The preview is noindexed and analytics are off, so test traffic stays out of their reports.
  • Forms post somewhere real and you’ve sent a test submission through.
  • A person clicked every link at phone and desktop width. The reviewer subagent doesn’t replace that.
Kyoko Labs · Claude Code cheat sheet3 / 8
05 · WordPress projects

Local setup, suitable jobs and a CLAUDE.md section for WordPress

The setup

  • Work locally in LocalWP or wp-env, with the theme and custom plugins in git. Push through staging; Claude never gets production credentials.
  • Database work runs on a copy. WP-CLI bulk edits go against a local export, with --dry-run first.

Suitable jobs

  • Block and child themes, and moving styles into theme.json.
  • Custom blocks from a design, with block.json and an editor preview.
  • Plugin code you own: custom post types, REST endpoints, integrations.
  • WP-CLI scripts for bulk content changes, redirects from a migration sheet, and audits.
CLAUDE.mdWordPress section
## WordPress
- Local only: `npx wp-env start`, site at
  http://localhost:8888. Never connect to production.
- Theme: block theme in wp-content/themes/[client].
  Styles go in theme.json first, CSS last.
- Blocks: src/blocks/[name], built with
  @wordpress/scripts (`npm run build`).
- Follow WordPress Coding Standards; run
  `composer run phpcs` before every commit.
- Escape on output (esc_html, esc_attr, esc_url),
  sanitize on input, a nonce on every form.
- WP-CLI: `--dry-run` first, on a local copy.
- Never edit: WordPress core, third-party plugins,
  wp-config.php.
Start withOne custom block from your next design file, built locally with the snippet above in CLAUDE.md.
06 · Tasks for non-engineers

Prompts for data, scripts and copy changes, reviewed by a developer

Clean a messy exportFiles
“Merge the GA4 and Meta Ads CSVs in exports/ by date and campaign. Normalise column names, flag rows that don’t match, and save clean.csv plus a note of every change.”
A small report generatorScript
“Write a script that turns the time-tracking export in data/ into hours per client for last month. Show me how to run it again next month.”
Bulk copy editsRepo · PR
“Apply the copy changes in @copy-edits.md across the site, one commit per page, then open a PR for [developer] to approve. Change nothing else.”
Sitemap auditScript
“Fetch [site]/sitemap.xml and check every URL: status, title, meta description, H1 and broken internal links. Save audit.csv, worst first.”
Landing-page variantsBranches
“Make three variants of the spring page on separate branches, one per headline in @headlines.md. Keep layout and tracking identical.”
Code or Cowork?
Cowork for documents, the inbox and the browser. Code for files, scripts and repos. The Cowork field guide covers the other half.
Kyoko Labs · Claude Code cheat sheet4 / 8
07 · Sharing the setup across the team

How to share one Claude Code setup across every client repository

client-repo/
CLAUDE.md               client standards (A1)
.mcp.json               GitHub, tracker, Figma
.claude/
  settings.json         permissions + hooks (A2)
  rules/                path-scoped rules
  skills/
    new-landing-page/SKILL.md
    qa-pass/SKILL.md
    client-handover/SKILL.md      (A3)
  agents/
    reviewer.md                   (A3)
    a11y-auditor.md
  hooks/
    protect-env.sh                (A2)
    block-push-main.sh            (A2)
  • Skills are your slash commands. A folder with a SKILL.md; anyone runs it as /qa-pass. Custom commands have been merged into skills, so start here.
  • Subagents for second opinions. A reviewer and an accessibility auditor, each with its own context and only read tools, so the review isn’t marking its own homework.
  • Hooks for the rules that can’t slip: format after every edit, block .env edits, block pushes to main.
  • Package it as a plugin. Move the skills, agents and hooks into one private plugin repo, then point every client repo at it (below). Fix a skill once and every repo gets the fix.
  • Headless in CI. claude -p runs one prompt with no chat; the GitHub Action (anthropics/claude-code-action@v1, set up with /install-github-app) reviews PRs when someone mentions @claude.
.claude/settings.jsonoffer the agency plugin
{
  "extraKnownMarketplaces": {
    "agency": {
      "source": { "source": "github",
                  "repo": "your-agency/claude-kit" }
    }
  },
  "enabledPlugins": { "client-kit@agency": true }
}
ci.sha nightly check, no chat
claude -p "Run the qa-pass skill on main and
  write the findings to qa-report.md" \
  --allowedTools "Read,Grep,Glob,Write,Bash(npm run *)" \
  --output-format json | jq -r '.result'
Start withWhatever someone on the team explained to Claude three times last week. Save it as a skill in one repo, then move it to the plugin once a second repo wants it.
08 · Guardrails for client code

Settings and habits that protect client code

“Claude treats CLAUDE.md files as context, not enforced configuration.”Claude Code docs, Memory
  • No production credentials anywhere Claude runs. Deny rules on secrets, plus the hook in A2 for the shell.
  • Branch, PR and a named reviewer for everything. The hook blocks pushes to main even in auto mode.
  • Read the client contract and NDA for AI clauses before their code goes in.
  • Business seats, so client code isn’t used for training by default.
  • Ask first until a workflow earns trust. Auto mode, the terminal default on Team and Enterprise, cuts prompts but isn’t a safety guarantee. Never skip permissions on a client repo outside a sandbox.
  • Watch /usage weekly per person, so a runaway loop shows up before the invoice does.
  • Run /security-review before merging anything that touches auth, payments or personal data.
Kyoko Labs · Claude Code cheat sheet5 / 8
09 · When to build an agent

When a workflow is ready to become an agent, and whether to buy or build

Skills make a job repeatable when a person starts it. An agent holds the role: it watches for the trigger, does the job through your tools and comes back to a person where judgment counts. Client onboarding and the lead pipeline are where most agencies feel it first.

It’s ready when it runs every week, its inputs and outputs are clear, and a skill for it has run cleanly for a month.

Buy or build?

  • Buy when a product already does the job the way your clients need it, and your edge isn’t in how it’s done.
  • Build when the job runs through your own tools, data and standards, which is exactly where off-the-shelf tools stop.
  • Wait when you can’t yet say what “done well” looks like. Write the skill first.
A1 · The client CLAUDE.md template
CLAUDE.mdfill the [brackets], delete what doesn’t apply
# [Client] · [project]

## Client and project
- [Client]: [what they do]. Contact: [name, role].
- Building: [what], live at [URL], staging at [URL].
- Account lead [name] · tech lead [name].

## Stack
- [Framework and version, e.g. Next.js 16 or a WordPress block theme]
- Node [22], [pnpm]. Ask before adding a dependency.

## Commands
- Install `[pnpm install]` · Dev `[pnpm dev]` · Build `[pnpm build]`
- Lint `[pnpm lint]` · Types `[pnpm typecheck]` · Test `[pnpm test]`

## Conventions
- [Components in src/components, one per file, named exports]
- [Styles: design tokens only, no hard-coded colours or spacing]
- Copy the pattern in the nearest similar file before inventing one.

## Brand
- Tokens: @docs/brand-tokens.md (as text, not the PDF)
- Placeholder copy in the client's voice, [three words]. Never lorem ipsum.

## Quality bar
- Browsers: [last 2 versions of Chrome, Safari, Firefox, Edge; iOS 17+]
- Accessibility: WCAG 2.1 AA. [Ontario client with 50+ staff: AODA applies.]
- Performance: [LCP under 2.5s on mobile for key pages]

## Deploy
- Branch, PR, preview, [named reviewer] approves, merge; [host] deploys main.
- Never push to main. Never deploy from a laptop.

## Never touch
- .env*, secrets/, [infra/], [legacy/ (the client's team owns it)]
- [Generated files, vendor code, third-party plugins]
- Production data or credentials, ever.

## Definition of done
- Lint, types and tests pass; new logic has a test.
- Checked at 375px and 1440px; meets the accessibility target.
- PR says what changed, what's placeholder and how to check it.

## Handover notes
- [What the client's team needs: CMS fields, editor guide, env var names]
- Run /client-handover before any handover.
Kyoko Labs · Claude Code cheat sheet6 / 8
A2 · settings.json starter, with the guard hooks

Deny rules stop Claude’s file tools; the hooks catch the same things in the shell and block them in every permission mode. Hooks need jq, and test them on a scratch repo before you rely on them.

.claude/settings.json
{
  "permissions": {
    "allow": [
      "Bash(npm run lint)", "Bash(npm run test *)", "Bash(npm run build)",
      "Bash(git status)", "Bash(git diff *)", "Bash(git log *)",
      "Bash(git switch -c *)", "Bash(git add *)", "Bash(git commit *)"
    ],
    "ask": ["Bash(git push *)", "Bash(npm install *)", "Bash(composer require *)"],
    "deny": [
      "Read(./.env)", "Read(./.env.*)", "Read(./secrets/**)",
      "Edit(./.env)", "Edit(./.env.*)", "Edit(./secrets/**)",
      "Bash(git push --force *)", "Bash(rm -rf *)"
    ]
  },
  "hooks": {
    "PostToolUse": [
      { "matcher": "Edit|Write",
        "hooks": [{ "type": "command",
          "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write --ignore-unknown" }] }
    ],
    "PreToolUse": [
      { "matcher": "Edit|Write|Bash",
        "hooks": [{ "type": "command",
          "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/protect-env.sh" }] },
      { "matcher": "Bash",
        "hooks": [{ "type": "command",
          "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-push-main.sh" }] }
    ]
  }
}
.claude/hooks/protect-env.sh
#!/usr/bin/env bash
# Exit 2 blocks the tool call; stderr goes back to Claude.
INPUT=$(cat)
TARGET=$(echo "$INPUT" | jq -r \
  '.tool_input.file_path // .tool_input.command // empty')
if echo "$TARGET" | grep -Eq '(^|[/[:space:]])\.env(\.|$|[[:space:]])|secrets/'; then
  echo "Blocked: .env and secrets/ are off limits." >&2
  exit 2
fi
exit 0
.claude/hooks/block-push-main.sh
#!/usr/bin/env bash
INPUT=$(cat)
CMD=$(echo "$INPUT" | jq -r '.tool_input.command // empty')
CWD=$(echo "$INPUT" | jq -r '.cwd')
echo "$CMD" | grep -Eq 'git( -C [^ ]+)? push' || exit 0
BRANCH=$(git -C "$CWD" rev-parse --abbrev-ref HEAD 2>/dev/null)
if [ "$BRANCH" = "main" ] || \
   echo "$CMD" | grep -Eq '[[:space:]:](main|master)([[:space:]]|$)'; then
  echo "Blocked: open a PR instead of pushing to main." >&2
  exit 2
fi
exit 0

Make both scripts executable: chmod +x .claude/hooks/*.sh. The env hook also catches shell commands that mention .env, so expect it to stop a cat .env as well as an edit.

Kyoko Labs · Claude Code cheat sheet7 / 8
A3 · Three skills and a reviewer
skills/client-handover/SKILL.md
---
name: client-handover
description: Write HANDOVER.md for a client build.
  Use when a prototype or project is ready to hand
  to the client's team or another developer.
argument-hint: [audience, e.g. client dev team]
disable-model-invocation: true
---
Write HANDOVER.md at the repo root for $ARGUMENTS.

1. Read CLAUDE.md, the README, the open PR and
   `git log --oneline main..HEAD`.
2. Run the build and the tests. If either fails,
   stop and tell me. Never hand over a broken build.
3. Write these sections in plain English, and
   invent nothing:
   - What was built: pages, components and
     integrations, with paths.
   - How to run it: install, dev, build, deploy.
     Env vars by name only, never values.
   - Decisions and why: anything a new developer
     would otherwise undo.
   - What's placeholder: copy, images, data and
     credentials still to swap.
   - Known issues and open questions, with owners.
   - Accessibility and browser checks done, and
     what wasn't checked.
4. Check every item under "Handover notes" in
   CLAUDE.md is covered.
5. Show me the draft. Don't commit until I approve.
skills/qa-pass/SKILL.md
---
name: qa-pass
description: QA the current branch against this
  client's CLAUDE.md before it goes to review.
---
Run the reviewer and a11y-auditor subagents on
this branch in parallel, with CLAUDE.md as the
standard. Then run lint, types and tests.
Fix what's clearly wrong. List the rest as a
checklist in the PR description.
skills/new-landing-page/SKILL.md
---
name: new-landing-page
description: Plan and build a landing page from a
  client brief.
argument-hint: [path to the brief]
disable-model-invocation: true
---
1. Read $ARGUMENTS and CLAUDE.md. Ask me up to 5
   questions about gaps. Wait for answers.
2. Propose a page map and components, reusing
   src/components. Wait for my approval.
3. Branch proto/[slug]. Build one section at a
   time, committing each.
4. Run the qa-pass skill, then open a draft PR.
agents/reviewer.md
---
name: reviewer
description: Reviews a branch against this client's
  CLAUDE.md. Use after a build, before a PR.
tools: Read, Grep, Glob, Bash
model: sonnet
---
Read CLAUDE.md first; it is the standard. Review
the diff against main for the never-touch list,
conventions, brand tokens, the accessibility and
browser targets, tests for new logic, and any
leaked secret or env value. Report each finding
as file:line, what's wrong, why it matters and
a suggested fix. Don't edit files.

SourcesClaude Code docs: setup, commands, interactive mode, memory, permissions, permission modes, checkpointing, hooks, skills, subagents, plugins for teams, MCP, headless, GitHub Actions, data usage · Claude Help Center, What is the Team plan? · Commands as of Claude Code v2.1, October 2026.

[ Kyoko Labs · Your team, running on AI ]

Book a free 30-minute call

Thirty minutes, free. Bring a client brief and we’ll map how it goes from brief to prototype in Claude Code, and what to set up first across your team. If it’s not a fit, you’ll still leave with the plan.

Kyoko Labs · Claude Code cheat sheet8 / 8