Settings and Functions I First Mastered When Starting to Use Claude Code
注目の記事

Settings and Functions I First Mastered When Starting to Use Claude Code

2026.04.03

This page has been translated by machine translation. View original

I'm Katagiri from the AI Business Division/Western Japan Development Team.
With April's arrival, I expect more people will start using Claude Code, so I've organized what I consider the "settings and features to understand first".

About this article

[Target audience]

  • People who have installed Claude Code but haven't configured it
  • People who want to review Claude Code's basic features

Current status check

Run the following command to verify Claude Code's operation:

claude doctor

After executing, check these two areas:

claude doctor execution results(partial excerpt)
 Currently running: native (2.1.84) ← check if running native version
 Auto-update channel: stable (version setting for auto-updates)

Getting started - Claude Code global settings (settings.json)

Before creating CLAUDE.md, let's first look at settings.json, which contains Claude Code settings.
This file defines model specifications, environment variables, and the Hooks that will be discussed later.

settings.json location

  • ~/.claude/settings.json common across all projects
  • .claude/settings.json per project (create when needed)

settings.json example

Below is what I initially set up:

settings.json
{
  "autoUpdatesChannel": "stable",
  "language": "japanese",
  "cleanupPeriodDays": 14,
  "showTurnDuration": true,
  "spinnerTipsEnabled": false,
  "model": "sonnet",
  "env": {
    "DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1"
  }
}
Settings explanation
  • autoUpdatesChannel ("stable"): Resource channel for updates
  • language ("japanese"): Fix responses to Japanese.
  • cleanupPeriodDays (14): Auto-delete old session history after 14 days.
  • showTurnDuration (true): Display time taken for each response.
  • spinnerTipsEnabled (false): Turn off tips display during loading (personal preference).
  • DISABLE_NON_ESSENTIAL_MODEL_CALLS ("1"): Stop unnecessary API calls in the background.

Auto-update (About resource channels for updates)

This setting allows you to choose whether to install the latest version or the stable version when Claude Code updates.

"latest": Receive the latest version as soon as it's released (default)
"stable": Use a version from about 1 week ago, skipping releases with major regressions

Quoted from official documentation

After configuring, run claude doctor to confirm your changes took effect.

Changing the IDE that opens for editing

When using multiple editors, Claude Code might not automatically open your preferred editor.
In that case, you can change it by editing the env in settings.json.

Below is an example to set it to open in VSCode:

settings.json
{
  "env": {
    "EDITOR": "code --wait",
    "VISUAL": "code --wait"
  }
}
For opening in Cursor
settings.json
{
  "env": {
    "EDITOR": "cursor --wait",
    "VISUAL": "cursor --wait"
  }
}
For opening in Vim
settings.json
{
  "env": {
    "EDITOR": "vim",
    "VISUAL": "vim"
  }
}

Creating instructions for Claude Code (CLAUDE.md)

CLAUDE.md is an instruction sheet that is automatically loaded at the beginning of each session.
Its purpose is to create a state where "you don't have to explain the same thing every time."

CLAUDE.md location

  • ~/.claude/CLAUDE.md ← "personal rules" common to all projects
  • ./CLAUDE.md (project root) ← instructions specific to that project

Principles to know before writing CLAUDE.md

The longer your CLAUDE.md gets, the more tokens are consumed each time, and the overall inference accuracy may decrease.

+ What to write: Your working style, what not to do, rules used across projects  

- What not to write: Code style, things controllable in settings.json, excessively long background explanations

CLAUDE.md example

First, let's create rules common to all projects.

CLAUDE.md
# Basic policy
- Always propose a work plan and get confirmation before making changes
- Make changes gradually in small steps rather than large batches at once
- Stop and ask questions when something is unclear

# What not to do
- Don't modify files that weren't specified
- Don't read or modify `.env` files
- Don't skip tests arbitrarily

# Context management
- Suggest `/clear` after completing tasks
- Suggest `/compact` during long sessions

Creating CLAUDE.md for specific projects during work

Project-specific CLAUDE.md can be automatically created using /init within a Claude session.
Since this is automatic generation, make sure to review it after creation.
You can also create it manually in the project directory without issues.

Examples of project-specific additions

  • Add team-specific rules that weren't automatically detected
  • Delete unnecessary lines (shorter is better!)

4 methods to reduce token consumption

The context window counts [conversations with Claude Code, loaded files, execution results, CLAUDE.md contents] and more.
As this amount increases, accuracy drops and token consumption (cost) increases.

Check the session context window status

Use the /context command to check current usage.

/context example
 /context
  Context Usage
   claude-sonnet-4-6 · 15k/200k tokens (8%)

   Estimated usage by category
 System prompt: 6.2k tokens (3.1%)
 System tools: 8.3k tokens (4.2%)
 Memory files: 196 tokens (0.1%)
 Skills: 476 tokens (0.2%)
 Messages: 8 tokens (0.0%)
 Compact buffer: 3k tokens (1.5%)
 Free space: 182k (90.9%)

     Memory files · /memory
 ~/.claude/CLAUDE.md: 196 tokens

     Skills · /skills

At startup, about 15k tokens are consumed.
Of those, about 14.5k (System prompt + System tools) are fixed costs that cannot be changed.
What you can adjust are the [Memory files (CLAUDE.md) + Skills] portions.

4 commands for saving tokens

/clear ← Initialize the context window

When to use:

  • When switching to a different task
  • When one task is complete
  • When the conversation starts to go off track

/compact ← Summarize the context window to free up space

When to use:

  • When you want to continue the same task but context exceeds 70%.

Even more useful with instructions like /compact make sure to keep the changed files and current TODOs.

/context ← Check current usage

When to use:

  • When response quality feels poor
  • When speed decreases

@ ← Narrow down what to load by specifying files

Use @filename or @directory to include files in your prompt.
By sharing only parts relevant to the current task rather than the entire project, you can minimize context window growth.

+ Bad example: `@project-a/` Look at the whole thing and find the bug  

- Optimal example: `@src/auth.ts Add error handling to the loginUser function that's missing it`

Understanding two key features

Let's briefly summarize Claude Code's two representative features: [Skills & Hooks].

Execution (invocation) timing

  • Skills:
    • Explicitly executed (/skill-name)
    • Automatically executed by Claude Code when needed
  • Hooks:
    • Automatically executed according to Claude Code's processes

1. Skills
By placing SKILL.md in the .claude/skills/ directory, you can package workflows.

SKILL.md
---
name: memo-management
description: Used when handling memos, meeting minutes, and note files. Applied in scenarios involving summarizing, organizing, and extracting actions.
---

## How to handle memo files
- Don't change or overwrite content. Read-only

2. Hooks
A powerful feature that automatically runs shell commands when Claude Code performs specific actions (before/after tool execution, at session end, etc.).
Add a hooks block to settings.json to configure.
Recently, it's become possible to use if filters to hook only specific commands and block execution.

Here's a simple example that sends a notification when work is completed:

settings.json
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Work completed\" with title \"Claude Code\"'"
          }
        ]
      }
    ]
  }
}

Differentiating between CLAUDE.md and Skills

CLAUDE.md is loaded in its "entirety" at the beginning of each session, so it always consumes tokens.
For Skills, only the "description" is loaded at startup, with the full content loaded only when needed.
Using Skills allows you to utilize tokens more efficiently.

Conclusion

In this article, I've summarized the key settings and features to understand when starting with Claude Code.
I'm still at the stage of beginning to use it in earnest myself.
I'll continue to share insights and challenges from the perspective of someone who's just getting started.

Sequel

Share this article