# Overclaud Learn > Practical guides to Claude Code (Anthropic's CLI): skills, hooks, memory and agent workflows, by Taner Hassan. Overclaud also sells a ready-made Claude Code harness ($69 one-time). ## Guides - [Claude Code hooks: guardrails that run every single time](https://overclaud.dev/learn/claude-code-hooks/): Hooks are shell commands that Claude Code runs at set points, such as before or after a tool call. They're configured in settings.json, receive the event as JSON on stdin, and exiting with code 2 blocks the action and tells Claude why. Unlike instructions in CLAUDE.md, they run every time. - [Claude Code skills: what they are and how to write your first one](https://overclaud.dev/learn/claude-code-skills/): A skill is a folder containing a SKILL.md file. Claude Code reads every skill's short description on each turn and loads the full instructions only when a task matches, or when you run it yourself as /skill-name. Put personal skills in ~/.claude/skills/ and project skills in .claude/skills/. - [Give Claude Code a memory that lasts between sessions](https://overclaud.dev/learn/claude-code-memory/): Claude Code starts each session fresh, apart from what it loads from memory files. CLAUDE.md files (user, project and local) are read at the start of every session, can import other files with @path, and can be split into path-scoped rules. Auto memory adds notes Claude writes itself, indexed in a MEMORY.md file. ## Cheat sheet ### Hooks Commands Claude Code runs at fixed moments. Configured under "hooks" in settings.json. Source: https://code.claude.com/docs/en/hooks Events you'll use most: - `SessionStart`: A session starts or resumes - `UserPromptSubmit`: You send a prompt, before Claude reads it - `PreToolUse`: Before a tool runs. Can block it or change its input - `PostToolUse`: After a tool succeeds - `PostToolUseFailure`: After a tool fails - `PermissionRequest`: A tool needs a permission decision - `Notification`: Claude Code sends a notification - `Stop`: Claude finishes responding - `SubagentStop`: A subagent finishes - `PreCompact`: Before the conversation is compacted - `InstructionsLoaded`: A CLAUDE.md or rules file is loaded - `SessionEnd`: The session ends Exit codes: - `0`: Carry on. Valid JSON on stdout is read as instructions - `2`: Block the action. stderr is sent back as the reason - `Any other`: Non-blocking error. The action continues with a notice Where hooks live: - `~/.claude/settings.json`: You, every project - `.claude/settings.json`: The project, shared in git - `.claude/settings.local.json`: You, this project only ### Memory Files Claude Code loads at the start of every session, broadest first. Source: https://code.claude.com/docs/en/memory Memory files: - `~/.claude/CLAUDE.md`: Your preferences in every project - `./CLAUDE.md or ./.claude/CLAUDE.md`: The project, shared with the team - `./CLAUDE.local.md`: Private notes for this project - `/CLAUDE.md`: Loads when Claude works in that folder - `.claude/rules/*.md`: Split rules; add paths: to scope them to files - `~/.claude/projects//memory/MEMORY.md`: Auto memory index: first 200 lines load each session Syntax: - `@path/to/file.md`: Imports another file, up to 4 levels deep - ``@path` in backticks`: Mentions a path without importing it - `paths: src/**/*.ts`: In a rule's frontmatter: only load for matching files ### Skills A folder with a SKILL.md. Descriptions load every turn; the body loads when used. Source: https://code.claude.com/docs/en/skills Where skills live: - `~/.claude/skills//SKILL.md`: You, every project - `.claude/skills//SKILL.md`: Everyone in this repository - `/skills//SKILL.md`: Run as /plugin-name:skill-name Frontmatter: - `description`: What it does and when to use it. Claude matches on this - `name`: Optional. Defaults to the folder name - `when_to_use`: Optional extra trigger guidance - `disable-model-invocation`: true: only you can start it, with /name - `allowed-tools`: Tools it may use without asking, while it runs - `arguments`: Named arguments for use in the body - `paths`: Globs that limit when it can activate Inside a skill: - `$ARGUMENTS`: Everything typed after /name - `$0, $1 …`: Positional arguments - `${CLAUDE_SKILL_DIR}`: The skill's own folder, for bundled files - `!`command``: Runs a shell command first and inserts its output ### Commands Built-in slash commands worth knowing by heart. Source: https://code.claude.com/docs Slash commands: - `/init`: Writes a starting CLAUDE.md from your code - `/memory`: Opens memory files; turns auto memory on or off - `/context`: Shows what's loaded into context, including memory files - `/compact`: Summarises the conversation to free up context - `/clear`: Starts a fresh conversation - `/`: Runs a skill by hand, with optional arguments