Claude Code — an AI agent (a program that reads context and decides what to do on its own) that reads and edits code from your terminal — naturally raises the question "what else can I actually do with this?" This article is a directory-style hub that organizes the hands-on example articles already published on usingclaude.com. It invents nothing new; it groups the existing, verified guides into six buckets — headless automation, hooks, workflow control, commands, real-world workflows, and MCP — and surfaces each guide's core command up front. Five minutes is enough to get the full map.
🟢 Model references match the current lineup · model notice · Fable subscription
Fable 5 and 5.1 subscription (updated September 7, 2026): Claude Fable 5.1, released September 1, 2026, is the current Fable model and Fable 5 is now legacy. Plan terms are the same for both — Max and Team Premium plans include Fable at up to 50% of the weekly usage limit; Pro and Team Standard use usage credits (
What can you do with this hub
Skimming this hub gives you a map of what's actually possible with Claude Code — automation, rules, MCP integrations — in about five minutes. Every entry links to a full guide already published on usingclaude.com; this page itself is just an index that pulls out each guide's core command. If you haven't installed Claude Code yet, start with the Claude Code install guide to set up a CLI (command-line interface — controlling a program by typing commands instead of clicking) environment first.
Quick term glossary
- Headless — running with no interactive screen: one command in, the result out
- Hooks — user-defined rules that run automatically at specific points in a session
- Subagent — a specialized AI with its own context, dedicated to one specific task
- MCP (Model Context Protocol) — a standard for connecting AI to external tools and data
- CI (Continuous Integration) — a pipeline that automatically builds and tests code changes
Automating scripts and CI with headless mode
The fastest way into Claude Code automation is headless mode (claude -p), which runs with no interactive screen. The two guides below cover calling Claude from a script or CI pipeline, and letting @claude mentions on GitHub PRs and issues trigger automated work.
| Example | Core command | What it does |
|---|---|---|
| Headless mode automation | claude -p "prompt", --output-format json, -c | Prints a response and exits with no interactive session — used for scripts and server automation |
| GitHub integration | /install-github-app, @claude mention | An @claude mention on a PR or issue triggers automated analysis and fixes via GitHub Actions |
This flow chains headless execution, a hook, PR creation, and GitHub integration into one example. Each step comes straight from the two guides above and the hooks section below — you don't need to build the whole chain at once, and can adopt just the steps you need.
Automating rules with hooks
A hook is a user-defined rule that runs automatically at a specific point in a session, enforcing guardrails like auto-formatting, blocking dangerous commands, or gating tests without anyone having to remember to do it manually. Hooks are made of three parts — event, matcher, and action — configured interactively with /hooks or persisted in .claude/settings.json (project) or ~/.claude/settings.json (global).
| Event | When it fires | Typical use |
|---|---|---|
PreToolUse | Right before a tool runs | Block a dangerous command (exit code 2 stops the tool call) |
PostToolUse | After a tool finishes | Auto-format, run tests |
Stop | When the session stops | Cleanup, logging |
SessionStart / SessionEnd | Session start/end | Environment setup and teardown |
For matcher syntax (filters like "Edit|Write" or "Bash") and the four handler types (command, prompt, agent, http), see the full Claude Code hooks guide.
Subagents, Plan mode, and Advisor — controlling the workflow
To break up a large task safely, you can combine three tools: subagents to isolate side work, Plan mode to review a plan before any edit happens, and Advisor to call in a stronger model only at the moment you're stuck.
| Example | Core command | What it does |
|---|---|---|
| Subagents | /agents | Create a specialized AI dedicated to one task, keeping bulk output like test logs out of the main conversation |
| Plan mode | Shift+Tab or claude --permission-mode plan | Draft a plan before any file edit, then proceed only after approval |
| Advisor | /advisor | Let a fast model consult a stronger model when it gets stuck |
Learning slash commands and shortcuts fast
If you use Claude Code daily, learning the / slash commands and a handful of keyboard shortcuts noticeably speeds up your work. Save a frequently used prompt as a markdown file in .claude/commands/ and its filename becomes a custom command.
| Type | Representative examples | What it does |
|---|---|---|
| Built-in slash commands | /clear, /compact, /model, /init | Reset the conversation, compact context, pick a model, generate CLAUDE.md |
| Session shortcuts | Esc, Shift+Tab, Ctrl+L, ↑ | Interrupt work, cycle permission mode, redraw the screen, recall the previous input |
| Creating a custom command | .claude/commands/name.md | The saved filename becomes the /name command |
See the full lists in the slash commands guide and the shortcuts cheat sheet.
Five real-world workflows — from exploring code to opening a PR
Day-to-day development work with Claude Code breaks down into five workflows: exploring code, debugging, refactoring, writing tests, and creating a PR. The shared principle across all five is to read and plan before making a change.
| Workflow | Core command/feature | What it does |
|---|---|---|
| Explore code | @file-path | Read-only look at unfamiliar code or where a feature lives |
| Debug | Ask with the error message attached | Trace the root cause and fix it in the same request |
| Refactor | Ask for incremental steps | Move legacy patterns to modern ones step by step |
| Write tests | @file plus style guidance | Generate tests that match existing style and cover edge cases |
| Create a PR | gh pr create, --from-pr <number> | Turn changes into a PR and resume a previous PR session |
For concrete prompt examples and tips on compacting context with /compact, see Claude Code use cases.
Connecting external tools with MCP
MCP (Model Context Protocol) is a standard for connecting AI to external tools and data, often compared to "a USB-C port for AI." Attaching an MCP server to Claude Code lets you work directly with systems like GitHub, Slack, Notion, or a database from inside the conversation. MCP isn't part of the examples category, but it's the area most often combined with automation and headless work in practice, so this hub includes its flagship guides too.
| Example | Core command | What it does |
|---|---|---|
| What is MCP? | — | Explains the concept and why a standard protocol matters |
| Connecting an MCP server | claude mcp add --transport http name URL, claude mcp list | Add, list, and remove MCP servers at local, project, or user scope |
| Recommended MCP servers | — | A curated list of servers by use case — GitHub, Slack, Notion, PostgreSQL, and more |
Detailed setup guides for individual servers — GitHub, Slack, Notion, PostgreSQL, Playwright, Filesystem, Figma, and more — live in the MCP category.
Frequently asked questions
Q. Where should I start with Claude Code examples?
Start with headless mode and slash commands. Try non-interactive automation with claude -p first, get comfortable with basics like /clear and /compact, then branch out into hooks, subagents, and MCP.
Q. What's the difference between hooks and subagents?
A hook is a deterministic action that runs automatically at a set point according to a fixed rule, while a subagent is a specialized AI that takes on a delegated task and makes its own judgment calls in an independent context.
Q. What do I need to use GitHub Actions automation?
Run /install-github-app to install the GitHub app, then add ANTHROPIC_API_KEY as a repository secret. Never put the key value directly in code or a document — keep it only as a GitHub Secret.
Q. Does this hub cover MCP too?
Yes. MCP lives in its own category, but since it's so often paired with automation and headless work, this hub includes three flagship guides. Server-specific setup guides are in the MCP category for more depth.
This hub adds no new examples — it re-maps the existing hands-on guides by type. Follow any link in the tables above for the full commands and configuration files.
Related articles
- Claude Code Use Cases: Explore, Debug, Refactor, Test, and PR Workflows
- Claude Code GitHub Integration — Automate PRs and Reviews with @claude
- Claude Code Slash Commands — Built-in Commands and Custom Ones
- Claude Code Subagents — Specialized AI to Isolate Side Work
- Claude Code Hooks — Rules That Run Automatically Every Time