The Claude Bible
Home / Real world playbooks
Level: Expert · 10 lessons

Real world playbooks

Multi-step project patterns that combine everything.

Open the interactive course212 lessons, quizzes, exercises, 3 languages, free.

Playbook: SEO and GEO automation

SEO (Search Engine Optimization) is the practice of making web pages rank higher in Google and Bing results. GEO (Generative Engine Optimization) is the newer discipline of making your content visible inside AI-generated answers from ChatGPT, Perplexity, Claude, and similar tools. Both require auditing what is broken, fixing it, and signaling to crawlers that the fix exists. Claude Code and the Anthropic API automate each of these steps at scale.

A typical automated SEO pipeline has four phases:

  1. Audit: crawl your site, extract meta tags, headings, alt text, structured data (JSON-LD), and page-speed scores. Claude reads the raw HTML and produces a prioritized issue list.
  2. On-page injection: Claude Code edits source files directly, inserting corrected title tags, meta description attributes, alt attributes on images, and schema.org JSON-LD blocks.
  3. Indexing signals: a small Node.js script calls the IndexNow API (supported by Bing and Yandex) to push updated URLs immediately, and calls the Google Search Console API to request re-crawl.
  4. AI visibility (GEO): add an llms.txt file at your root so AI crawlers can read a structured summary of your site, and add speakable JSON-LD blocks so voice and AI assistants quote your content preferentially.

Claude Code is ideal for the injection phase because it reads, edits, and verifies files in one session without copy-paste. The Anthropic Batch API (50 percent cheaper, independent rate limit) handles bulk generation when you need hundreds of meta descriptions or page summaries in one run.

Key points
  • SEO audit then inject, never guess-and-patch blind
  • IndexNow pushes URLs to Bing instantly after a deploy
  • llms.txt and speakable JSON-LD are the GEO entry points
  • Batch API for bulk meta generation at half the cost

Playbook: a content pipeline

A content pipeline is a repeatable sequence of steps that takes a raw idea and turns it into a published piece. Claude can act as the engine at every stage: briefing, drafting, voice-matching, reviewing, and preparing for publication. Running these as distinct, focused prompts produces better output than one giant "write me an article" request.

The five stages follow a clear order:

  1. Brief: define the topic, audience, word count, and goal in one prompt. Ask Claude to return a structured outline for your approval before writing anything.
  2. Draft: send the approved outline plus any source material. Claude writes the full draft in one pass.
  3. Voice: paste two or three samples of your existing writing and ask Claude to rewrite the draft to match your tone, sentence length, and vocabulary.
  4. Review: run a separate prompt asking Claude to act as an editor. It checks for logic gaps, repetition, weak openings, and unsupported claims.
  5. Publish: generate the final deliverable, whether that is clean HTML, a Markdown file, or a formatted email, ready to paste into your CMS (content management system) or send directly.

Keeping each stage in its own prompt gives you a checkpoint to approve or adjust before moving on. It also lets you swap Claude models: use claude-opus-4-8 for the brief and voice stages where judgment matters, and claude-sonnet-4-6 for the bulk drafting to keep costs low.

Key points
  • Split the pipeline into five named stages so each prompt has one job
  • Always get an outline approved before asking Claude to draft
  • Use voice-matching as a dedicated step, not an afterthought
  • The review stage is a separate editor role, not a rewrite request

Playbook: synthetic datasets

A synthetic dataset is training or evaluation data generated by a model rather than collected from humans. When you need thousands of question-and-answer pairs, writing them by hand is impractical. The Batch API (Anthropic's asynchronous bulk request endpoint) lets you submit up to 10,000 requests in one call, processes them within 24 hours, and charges you 50% less than the standard API. For most dataset jobs the wall-clock time is under 10 minutes.

The core pattern is: build a list of prompt objects, send them as a batch, poll for completion, then download and validate the results. Each request in the batch gets its own custom_id (a string you choose) so you can match every response back to its source record.

Key decisions before you start:

The output is a JSONL file (JSON Lines: one JSON object per line), which is the standard input format for fine-tuning pipelines such as Hugging Face Trainer or Llama fine-tune scripts.

Key points
  • Batch API: bulk async endpoint, 50% cheaper, independent rate limit
  • custom_id ties each request to its source row
  • Validate JSONL output before using it for fine-tuning
  • Model choice (Opus/Sonnet/Haiku) trades quality against cost and speed

Playbook: research with web tools

When Claude Code runs with web tools enabled, it can fan out (run multiple searches at the same time) instead of searching one query at a time. This dramatically cuts wall-clock time on research tasks that need a dozen sources.

The research loop has four stages:

  1. Plan queries: decompose the question into 3-6 distinct sub-questions before fetching anything.
  2. Fan out searches: launch all queries in parallel so results arrive together.
  3. Fetch and verify: retrieve the top URLs, cross-check claims across at least two independent sources, and flag conflicts.
  4. Synthesize with citations: write the answer, linking every factual claim to a numbered source so the reader can audit it.

Adversarial verification means actively trying to disprove what you just found. Before accepting a claim, ask: does any other source contradict this? Is the source current? Is it primary (original study, official docs) or secondary (a blog summarising someone else)? Prefer primary sources and note publication dates.

When you write the final synthesis, every sentence that asserts a fact should end with a bracketed citation like [1], and your source list should include the URL and access date. This makes the report auditable and protects you if a source changes later.

Key points
  • Fan out: run multiple searches in parallel rather than sequentially
  • Adversarial verification: actively try to disprove each claim before accepting it
  • Primary vs secondary sources: prefer original studies and official docs
  • Bracketed citations: link every factual claim to a numbered source

Playbook: build a knowledge base

A knowledge base is a structured collection of documents, notes, or records that an AI agent can search and cite. The four operations that matter are: ingest (get content in), dedupe (remove duplicates), link (connect related items), and recall (retrieve the right chunk at the right time).

Claude Code is the entry point for all four. Point it at a folder and it can read every file, summarise each one, write structured output (JSON, Markdown), and cross-reference topics. The key is giving Claude a consistent schema up front so every ingested item has the same fields: id, source, summary, tags, and links.

Deduplication means spotting content that is semantically the same even when the wording differs. Ask Claude to compare summaries and flag items whose meaning overlaps above a threshold (say, 80 percent). Linking means finding items that reference the same concept and writing explicit [[wikilink]] or JSON cross-references between them.

For recall, the simplest durable pattern is a plain-text index file (often called INDEX.md) that Claude updates after every ingest run. At recall time, Claude reads the index first, then fetches only the specific files it needs. This keeps token usage low and answers precise. The full pipeline looks like this:

Key points
  • Ingest, dedupe, link, recall are the four KB operations
  • A shared schema (id, source, summary, tags, links) makes every step reliable
  • A lightweight INDEX.md keeps recall fast and token-cheap
  • Semantic deduplication flags near-duplicate content even when wording differs

Playbook: mobile app dev

Building a mobile app with Expo (a framework that wraps React Native so you can run your app on iOS and Android from one codebase) pairs naturally with Claude Code. You describe a screen or feature in plain language, Claude Code generates the component, and Expo Go (the preview app you install on your phone) reflects the change in seconds via hot reload.

The core loop is: open Claude Code in your project root, ask for a feature, review the diff, run npx expo start to stream a QR code, and scan it with Expo Go. No build pipeline to wait for during development.

When you are ready to distribute, Expo offers two paths:

Claude Code can scaffold the eas.json config, write your navigation stack, add API calls, and fix TypeScript errors, all in the same session.

One important rule: after any npx expo install command that adds a native dependency, restart the Metro bundler (the local dev server Expo uses) with the --clear flag, otherwise the app may show a blank screen. Ask Claude Code to remind you of this in its own instructions.

Key points
  • Expo Go for instant phone preview via QR code
  • EAS Build produces real binaries in the cloud
  • restart Metro with --clear after native installs
  • Claude Code handles scaffold, nav, API, and TS fixes in one session

Playbook: multi-language deliverables

A multi-language deliverable is any asset (web page, email, dataset, legal notice) that must exist in two or more languages and stay consistent: same facts, same tone, same structure, no divergence over time. The risk is drift: one language gets updated, the others do not.

The professional approach is single-source translation: one authoritative source file is the only place humans write and approve content. Every language version is derived from it, never edited independently. Claude treats this as a pipeline with three stages.

In Claude Code (the CLI and IDE coding agent), you can automate this pipeline with a small script that reads the source file, calls the Anthropic API once per language, writes each output to a versioned file, and logs a diff summary. The Anthropic Batch API lets you send all translation requests in one HTTP call at a 50 percent discount and roughly five minutes of wall-clock time for a hundred requests, which makes large multi-language datasets practical and cheap.

Key points
  • Single-source: one locked source drives all translations
  • Batch API cuts cost 50% and parallelizes all language calls
  • Consistency check: compare numbers and key terms across outputs
  • Versioned output files prevent silent drift over time

Playbook: a shareable HTML deliverable

The simplest deliverable you can share by email or messaging app is a single self-contained HTML file: one file, no server, no dependencies, opens in any browser with a double-click. The key principle is inline everything, meaning CSS goes inside a <style> tag, JavaScript goes inside a <script> tag, and images are embedded as Base64 data URIs (a text encoding of binary data). Nothing is loaded from the network.

When you ask Claude to produce such a file, the most reliable pattern is to give it an explicit constraint list so it cannot accidentally add an external reference. Common mistakes to forbid: href pointing to a CDN, src pointing to an external URL, and any import statement that fetches at runtime.

Before you send the file, validate it offline: disconnect from the internet (or disable Wi-Fi), open the file in your browser, and interact with every feature. If anything is blank or broken, the cause is almost always a missing inline resource.

Key points
  • Single file, no external dependencies
  • Inline CSS, JS, and images as Base64
  • Validate offline before sharing
  • Avoid CDN links and runtime imports

Playbook: a personal automation stack

A personal automation stack combines three layers: scheduled tasks (run a Claude Code agent on a cron schedule), hooks (trigger actions before or after specific Claude Code events), and a second brain (a structured knowledge store such as an Obsidian vault that Claude can read and update). Together they turn Claude into a persistent assistant that works even when you are not at the keyboard.

Scheduled tasks use your OS task scheduler (Windows Task Scheduler, cron on Linux/macOS) to call claude in headless mode (that means no interactive terminal, fully automated). The flag --print makes Claude write its answer to stdout and exit immediately, which is ideal for scripts. Combine it with -p "your prompt" and redirect output to a log file or pipe it to another tool.

Hooks are shell commands registered in .claude/settings.json under the hooks key. Claude Code fires them at defined lifecycle points: PreToolUse, PostToolUse, Stop, and Notification. A Stop hook, for example, can automatically sync a memory file to your vault every time a session ends, so you never lose context between sessions.

Key points
  • Use --print and -p for headless, scriptable Claude Code calls
  • Hooks in settings.json automate actions at session lifecycle points
  • A second brain vault cuts context-reload cost by storing distilled memory
  • Combine all three layers for a stack that works while you sleep

Playbook: turn a chore into a skill

Every workflow has repetitive tasks: running the same audit, generating the same report, applying the same review checklist. The first time you do it, you improvise. The second time, you paste from history. The third time, you should have a skill. A skill is a reusable instruction file that Claude Code loads on demand via a slash command, so you stop solving the same problem twice.

The trigger for capturing a skill is simple: notice when you reach for a previous conversation to copy a prompt you already wrote. That moment is a signal. The chore has earned a name.

A skill file lives in ~/.claude/skills/<skill-name>/SKILL.md for global reuse, or in .claude/skills/<skill-name>/SKILL.md inside a project for project-only use. Claude Code exposes it as /skill-name in the chat bar. The file is plain Markdown: a description at the top, then the exact instructions you want Claude to follow every time.

To build a good skill, extract the invariant parts (the steps that never change) and leave placeholders for the parts that vary per run. Common patterns include:

Key points
  • Repetition is a signal: the third time is skill time
  • Skill files live in ~/.claude/skills/<name>/SKILL.md
  • Separate invariant steps from per-run variables
  • Call skills with a slash command, e.g. /my-skill
Work with me

Master Claude, Claude Code and LLMs, from your first prompt to multi-agent orchestration.

Like this course? I built it end to end. Need a web app, mobile app, AI automation or SEO/GEO? Let us talk.

Contact me on LinkedInSee a site I built