little cups of claude

tips and techniques for Claude and Claude Code

Cups tagged “Claude Code CLI”

#8: Permission Modes 🎚️

Today we'll look at permission modes in Claude Code, which set how much Claude can do in a session before it stops to ask us. Where permission rules handle individual tools, a mode sets the baseline for the whole session. Picking the right one for the job saves a lot of prompts, or adds a few where we want them. Let's...

Read cup #8: Permission Modes

#7: Permission Rules 🚦

Today we'll look at permission rules in Claude Code, the settings that decide which tools run without asking, which always ask, and which never run at all. Clicking "Yes" on the same npm test prompt for the fifth time gets old fast. A few lines in a settings file fix that, and they can block the things we never want...

Read cup #7: Permission Rules

Today we'll look at subagents in Claude Code: helpers that take on a side task in their own context window and hand back only a summary. When Claude has to dig through search results, logs, or a pile of files we won't look at again, a subagent does that work somewhere else. Our main conversation stays clean, and we...

Read cup #6: Custom Subagents

#5: Auto Memory 🧠

Today we'll look at how Claude Code remembers things between sessions with auto memory, and how it fits next to the CLAUDE.md files we write ourselves. The split is simple. We write CLAUDE.md to give Claude instructions. Claude writes auto memory to keep notes for itself. Auto memory is on by default in local...

Read cup #5: Auto Memory

Today we'll look at running Claude Code without the interactive UI, which turns it into a building block for scripts, CI, and cron jobs. The -p flag (short for --print) is the key. It sends one prompt, lets Claude work, prints the result, and exits. The same engine powers the Agent SDK, so anything we learn here...

Read cup #4: Headless Mode

Today we'll check out how to build our own slash commands in Claude Code using skills. Custom slash commands started out as single Markdown files in a commands folder. They've since been merged into skills. Both still work, and both show up in the same / menu, but skills can do quite a bit more. Let's get started....

Read cup #3: Custom Slash Commands

#2: Hook Basics 🪝

Today we'll look at one of the best ways to make Claude Code behave the same way every time: hooks. Hooks run our own code at key moments in a Claude Code session. Instead of hoping Claude remembers to format a file or skip a protected directory, we make it happen automatically, on every matching event. Let's dive in....

Read cup #2: Hook Basics

Today we'll take a look at one of the most useful files in any Claude Code project: CLAUDE.md. A CLAUDE.md file gives Claude Code instructions about our project that stick around between sessions. Claude Code loads it into context at the start of every session, so we stop repeating the same preferences over and over....

Read cup #1: CLAUDE.md Basics