Claude Code 7 Customization Methods: CLAUDE.md, Skills, Hooks, Subagents Guide

Published on: 2026-06-28

Claude Code 7 Customization Methods: CLAUDE.md, Skills, Hooks, Subagents Guide

📖 Glossary

AI Box (also known as Agent Computer / Agent PC), is a dedicated local hardware device that runs AI Agents. Pre-installed with an AI agent management system, plug-and-play, running 24/7. Users can remotely command AI to work via Discord, Slack, Telegram, WhatsApp, and more.

Abstract: Claude Code offers seven customization mechanisms — CLAUDE.md, rules, skills, subagents, hooks, output styles, and append system prompt. Each serves different scenarios based on loading timing, context cost, and execution permission. Choosing the wrong method wastes tokens or produces poor results. This article helps you get it right.


Claude Code is a general-purpose AI coding assistant, but "general" isn't always an advantage. If you write Python, you might want it to default to pytest over unittest. If you write Go, you might want it to follow your error handling conventions. This is where customization matters.

Anthropic has structured Claude Code's customizability into seven layers. Knowing which layer to use when is what separates efficient from wasteful Claude Code usage.

The Seven Mechanisms at a Glance

Mechanism Load Timing Context Cost Best For
CLAUDE.md Project start Medium Project-level conventions
rules Per message Small Current task preferences
Skills On-demand Large Reusable expert knowledge
Subagents On-demand Dynamic Independent subtasks
Hooks Event-triggered Minimal Workflow automation
Output Styles On-demand Small Output format control
Append System Prompt Session start Large Global system directives

Article Image

CLAUDE.md: Project-Level Memory

Claude Code automatically reads the CLAUDE.md file in the project root. This is the most basic and important customization method.

What goes in it? Tech stack, code conventions, architecture decisions, key file descriptions. Think of it as a project manual that Claude reads every time it starts.

Good CLAUDE.md files are specific: "All APIs live under /api/v2" "Database operations use Repository pattern" "Test files must be named xxx_test.go". The more specific, the better.

Context cost is medium — CLAUDE.md loads every session. Too long burns tokens, too short provides little value.

Rules: Conversation-Level Instructions

Rules were added in May 2026. Use the /rules slash command to add them. They only last for the current conversation session.

Best for temporary constraints: "Don't touch test files during this refactoring" "Only analyze files in src/" "Write comments in Chinese". The difference from CLAUDE.md — CLAUDE.md is persistent project policy, Rules are one-off task constraints.

Skills: Reusable Expert Knowledge

Skills are packaged expert knowledge modules. A Skill can contain instructions, examples, common commands, and error-fix patterns. You can download community Skills or write your own.

Once installed in a project, Skills activate on demand via slash commands. Install a "React Performance Optimization" Skill, type /react-perf, and the capability is injected instantly. Zero context cost when not in use.

Context overhead is large but only when activated. This is Skills' advantage over CLAUDE.md.

Article Image

Subagents: Getting Helpers

Subagents are Claude Code's internal agent delegation mechanism. When a task spans multiple domains, the main Claude can dispatch sub-agents to handle different modules in parallel.

For a web app — Subagent 1 writes API layer, Subagent 2 writes frontend components, Subagent 3 writes tests and docs. The main agent orchestrates and resolves conflicts. Each sub-agent has its own context window, preserving the main agent's focus.

Best for complex projects with large changes. Small fixes don't justify subagent overhead.

Hooks: Event-Triggered Automation

Hooks are Claude Code's automation engine. They fire at key lifecycle events — before/after file edits, before/after command execution.

Popular use: auto-run lint and type checking after every Claude edit. Rollback on failure. Or auto-build before running tests.

Hooks have minimal context overhead — they trigger short action sequences without persistent context consumption.

Output Styles: Standardized Output

Output Styles control Claude Code's response format. The default format works for most cases. Use this when you need structured output (JSON-format refactoring plans) or compressed output for specific scenarios.

Append System Prompt: Global Fallthrough

The heaviest mechanism. System-level prompts appended via CLAUDE.md or command-line flags, loaded in every conversation.

Place only the most fundamental rules here: "Prefer command-line tools over Python" "Don't use Markdown tables in responses". Global, persistent, unavoidable.

How to Choose

Three-layer decision logic:

By loading timing: Project level (CLAUDE.md) → Conversation level (Rules) → On-demand (Skills/Subagents) → Event level (Hooks).

By context cost: Hooks < Rules < Output Styles < CLAUDE.md < Skills < Subagents < Append Prompt. Start with cheaper options when context budget is tight.

By execution permission: Pure prompt (CLAUDE.md/Rules/Skills) → Code execution (Hooks) → Independent scheduling (Subagents).

For Kaihe AIBOX users, while Claude Code itself is a cloud service, the design philosophy behind these customization mechanisms is universal — an Agent framework's customizability determines whether it truly fits your workflow.

Further Reading

-#KaiheAIBOX #AITutorial #AIAgent #AIBOX #Productivity


Kaihe AIBOX | The Agent Computer That Works 7×24 for You · AI Agent

Recommended Products

A1 Home Entry A1 Pro Enhanced A2 Professional A2 Pro Advanced X1 Enterprise G1 Flagship
© KAIHE AI - Agent Computer Specialist