Tabbit
ResourcesBlogModels
Tabbit LogoTabbit

Tabbit — The AI Browser that Works for You

Topics

  • AI Browser Resources
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Comparisons
  • AI Browser Alternatives
  • Browser Productivity Resources

Popular Guides

  • AI Browser
  • Agentic Browser Download
  • Best AI Browser 2026: Top 9 Tested & Ranked
  • AI Browser Download
  • Free AI Browser
  • Best AI Browser 2026
  • AI Browser Comparison 2026
  • AI Browser for Windows
  • AI Browser for Mac
  • Chrome Alternative 2026

Events

  • Tabbit Skill Competition
  • KPOP SBTI Fandom Personality Test
  • Tabbit Campus Creator Program
  • fifi's Picks: AI Skills for Research Papers
  • User Survey

About

  • Tabbit Blog
  • Press & Media
Prompt guide
MediaClaude Opus 4.7

Claude Opus 4.7: Anthropic's Official Guide to Steering Claude Code - Choosing Among CLAUDE.md, Skills, Hooks, and Subagents

Original source

Anthropic official blog

AuthorAnthropic

Source date2026-06-18

Tabbit curation2026-08-20

Read original

One-sentence takeaway

Anthropic officially provides seven ways to customize Claude Code's behavior (CLAUDE.md, Rules, Skills, Subagents, Hooks, Output Styles, and System Prompt Appending). Each differs in loading timing, compaction behavior, and context cost, so the appropriate method should be selected based on the specific need.

Use cases

  • Suitable tasks: Situations that require a systematic understanding of Claude Code's customization mechanisms, or a decision about where to place project standards, team conventions, automated workflows, and so on

  • Unsuitable tasks: Situations that require deep technical implementation details (this article focuses more on a decision framework)

  • Applicable model version: Claude Opus 4.7 (through Claude Code)

  • Applicable client, Agent, or API: Claude Code CLI

  • Recommended reasoning levels and parameters: N/A (this article discusses customization mechanisms rather than specific tasks)

Ready-to-use content

Comparison of the seven customization methods

MethodWhen it's loadedCompaction behaviorContext costWhen to use
CLAUDE.md (root)Session start; stays in context for the entire sessionMemoized. Read once and cached for the session; cache cleared and re-read after compactionHigh. Every line costs tokens whether relevant or notBuild commands, directory layout, monorepo structure, coding conventions, team norms
CLAUDE.md (subdirectory)On-demand, when Claude reads a file under that subdirectoryLost until that subdirectory is touched againLow. Only consumes context when the relevant subdirectory is being worked onConventions specific to a subdirectory
RulesSession start (user-level rules) or only when matching files are touched (path-scoped)Re-injected on compactionMedium. Always-on unless path-scopedSpecific constraints or conventions (e.g., all API handlers must validate input with Zod)
SkillsName and description at session start; full body loads when the skill is invokedInvoked skills re-injected up to a shared budget; oldest dropped firstLow. Full body loads only when invoked; subject to a shared token budget across invoked skillsProcedural workflows (deploy or release checklists)
SubagentsName, description, and tool list at session start; body loads only when called via the Agent toolOnly the final message (summary plus metadata) returns to the main sessionLow. Zero cost in main context until called; runs in its own isolated context windowRunning work in parallel or side tasks that should run in isolation and return only a summary (deep search, log analysis, dependency audit)
HooksFire on lifecycle eventsBypass compaction entirelyLow. Configuration lives outside main context; some output may return (e.g., blocking errors)Deterministic automation: run linters, post to Slack on completion, block commands, back up chat history on PreCompact
Output stylesSession start; injected into the system promptNever compactedHigh. Occupies context window, but overwrites default system promptSignificant role changes (code assistant to general assistant)
Appending the system promptSession start; passed as a CLI flagNever compacted; applies only to that invocationModerate. Cached after first request in a sessionTone, response length, formatting preferences

CLAUDE.md best practices

Two types:

  1. Always loaded: The root CLAUDE.md, loaded at the start of a session and retained without loss or degradation throughout a long session

  2. On-demand: A subdirectory CLAUDE.md, loaded only when Claude reads a file under that subdirectory

Key recommendations:

  • Keep CLAUDE.md under 200 lines

  • Assign an owner and review changes like code

  • Move team-specific conventions into path-scoped rules

  • Move workflows into skills

  • In monorepos, give each team's directory its own subdirectory CLAUDE.md

Monorepo configuration:

{
  "claudeMdExcludes": ["teams/other-team/**"]
}

Rules example

---
paths:
  - "src/api/**"
  - "**/*.handler.ts"
---
All API handlers must validate input with Zod before processing.

Decision framework

Choose CLAUDE.md (root) when:

  • You need build commands, directory layout, or monorepo structure

  • You need coding conventions or team norms

  • The information must remain available throughout the entire session

Choose CLAUDE.md (subdirectory) when:

  • The conventions apply only to a specific subdirectory

  • You want to reduce context cost

Choose Rules when:

  • You need hard constraints (such as "all API handlers must validate input with Zod")

  • You need path-scoped constraints

Choose Skills when:

  • You need reusable workflows (deployment checklists or release checks)

  • You want on-demand loading to save context

Choose Subagents when:

  • You need to run work in parallel

  • You need tasks to run in an isolated context and return only a summary (deep search, log analysis, dependency audits)

Choose Hooks when:

  • You need deterministic automation (running linters, blocking commands, or backing up chat history)

  • You need to trigger actions on lifecycle events

Choose Output styles when:

  • You need a significant role change (from code assistant to general assistant)

Choose Appending the system prompt when:

  • You need to set tone, response length, or formatting preferences

Testing/workflow steps

  1. Assess the current project: Identify which conventions need to be always available (put them in the root CLAUDE.md) and which are needed only in specific situations (put them in a subdirectory or rules)

  2. Review the existing CLAUDE.md: If it exceeds 200 lines, consider moving team conventions into rules and workflows into skills

  3. Configure the monorepo: Create a subdirectory CLAUDE.md for each team, and use claudeMdExcludes to exclude unrelated team files

  4. Create Rules: Create path-scoped rules for hard constraints

  5. Create Skills: Create skills for reusable workflows

  6. Configure Hooks: Configure hooks for automated tasks (such as running linters or blocking dangerous commands)

  7. Test compaction behavior: Test the compaction behavior of each method in a long session to ensure that critical conventions are not lost

Original evidence and data

  • The article explicitly lists seven methods and their loading timing, compaction behavior, context cost, and usage timing

  • It emphasizes keeping CLAUDE.md under 200 lines and assigning an owner

  • It provides an example of the YAML frontmatter format for Rules

  • It explains the advantages, disadvantages, and applicable scenarios for each method in detail

  • It emphasizes that Skills use a shared token budget, with the oldest dropped first

  • It explains that Subagents have zero cost in the main context and load only when called

Scope and limitations

  • This article provides a decision framework rather than specific implementation details

  • The seven methods can be used together; trade-offs should be evaluated based on the needs of the specific project

  • The always-loaded type of CLAUDE.md consumes tokens in every session, even when irrelevant

  • The shared token budget for Skills may cause the oldest skills to be dropped

  • Hooks bypass compaction, but their configuration lives outside the main context

Source excerpt or observation (short compliant quotation only)

Official article: "Think of this file as giving Claude an overview of your codebase, or as an index pointing to other files where Claude can find more information as needed."

"Keep CLAUDE.md under 200 lines, give it an owner, and review changes to it like code."

"Each method trades context cost against authority."

Curated by Tabbit

Prompt material is summarized from public sources and Tabbit editorial notes. Check the original licensing and intended use before copying it.

Claude Opus 4.7

Use in Tabbit

Claude Opus 4.7

Related prompts

MediaAnthropic Claude Platform Docs / Anthropic Newsroom2026-04-16

Claude Opus 4.7: Effort Levels and Migration Prompt Template

MediaAnthropic official documentation

Claude Opus 4.7: Anthropic's Official Prompt Library and Best Patterns

MediaZooClaw AI Help2026-04-07

Claude Opus 4.7: Three Practical Patterns - Caveman Prompts, CLAUDE.md Safety Guardrails, and Git Worktrees

MediaTenten Learning

Claude Opus 4.7: The Complete Guide to 50+ Community Tips

Claude Opus 4.7

Related reviews

MediaAnthropic Newsroom2026-04-16

Claude Opus 4.7: Official Coding, Vision, and Agent Benchmarks

MediaVellum2026-04-16

Claude Opus 4.7: Vellum's Cross-model Benchmarks and Task Selection

CommunityReddit r/ClaudeCode

Claude Opus 4.7: Post-Release Long-Session Experience with Reddit Claude Code