Claude Code Tips: A Short Course From a Real Repo
Six short Claude Code lessons built on a real repository: CLAUDE.md, permissions, skills, hooks, subagents and saving tokens, checked against the docs.
By Matthews WongReviewed on Checked against Claude Code v2.1.296
Key takeaway
Claude Code is Anthropic's agentic coding tool for the terminal. These six lessons show how one real repository steers it: a CLAUDE.md that sets the rules, permissions that remove friction, skills that teach house style, hooks that check every edit, subagents that work in parallel without collisions, and habits that keep context small.
Free, no sign-up, no certificate. Built from the setup that runs this website.
Start the courseWhat you will be able to do
- Write a CLAUDE.md and settings that steer Claude Code without slowing you down.
- Teach project rules once with skills, and enforce them automatically with hooks.
- Run subagents in parallel safely, and keep context and token use under control.
Who it is for
Developers who already use Claude Code for small tasks and want it to follow their project's rules on bigger ones.
Before you start
- Claude Code installed and signed in, and a git repository to practise in.
- Basic terminal and JSON familiarity.
Claude Code tips
- CLAUDE.md File Example: Global, Project and Local LayersA real CLAUDE.md file example: the managed, user, project and local layers, how they load, @imports, and what belongs in a skill or a hook instead.10 min
- Claude Code settings.json Example: Allow, Ask and Deny RulesA real Claude Code settings.json example: which settings file wins, how allow, ask and deny rules match, why deny wins, and how to keep .env out of reach.12 min
- Claude Code Skills Examples: Write One That Actually TriggersClaude Code skills examples from a real repo: SKILL.md frontmatter, why the description decides triggering, what loads when, and skills vs CLAUDE.md.10 min
- Claude Code Hooks Examples: Guardrails That Always RunClaude Code hooks examples from a real repo: events, matchers, the JSON on stdin, exit codes and JSON output, and when a hook should block or only advise.12 min
- Claude Code Subagents Examples: When to Delegate a TaskClaude Code subagents examples from a real repo: what a subagent sees, the name, description and tools fields, when to delegate, and safe parallel fan-out.12 min
- Claude Code Tips to Save Tokens: Context, Compaction, ScopeClaude Code tips to save tokens: read /context, compact or clear at the right time, scope reads, load skills on demand and keep exploration in subagents.11 min