0Pricing
Claude Architect · レッスン

Claude Codeとは

ターミナルやIDE上で動作するエージェント型コーディングツールです

「Claude Codeとは」はCoddyKit上の無料Claude Architectレッスンです。 これはレッスン1/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはClaude Architect学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Claude Architectコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

Claude Code in One Sentence

Claude Code is an agentic coding tool that lives in your terminal and IDE. Instead of copy-pasting snippets into a chat window, you let Claude read your real files, run commands, and edit code directly in your project.

It is not just an autocomplete. It runs an agentic loop: it inspects the task, calls tools, reads the results, and keeps going until the work is genuinely done.

On the Claude Certified Architect exam, this lives in Domain 3 (Claude Code Config & Workflows, 20% of the exam). Understanding what Claude Code is — and how it differs from a plain chatbot — is the foundation for everything else in this track.

Why "Agentic" Matters

A plain LLM chat call is one round trip: you send a message, you get text back. Claude Code is different — it is built on the agentic loop:

  • Send a request to the model.
  • Inspect the stop_reason on the response.
  • If it is tool_use, run the requested tool and append the result to the conversation history.
  • Repeat until the model returns end_turn.

The critical rule: you terminate on the stop reason, never by scanning the model's text for words like "done" or "finished". Parsing text for completion signals is a classic anti-pattern the exam loves to test.

stop_reason = response.stop_reason
if stop_reason == "tool_use":
    # run the tool, append its result, loop again
    pass
elif stop_reason == "end_turn":
    # the model is genuinely finished
    pass

The Built-in Tools

Claude Code's power comes from a small, focused set of built-in tools. As an architect you should know each one cold:

  • Glob — find files by pattern, e.g. **/*.test.tsx.
  • Grep — search file contents with a regex.
  • Read — load a file into context.
  • Write — create a new file.
  • Edit — make a precise, unique-match change to an existing file.
  • Bash — run shell commands.

These are deliberately few. Four to five well-scoped tools per agent is optimal; piling on 18+ tools degrades the model's ability to pick the right one.

Incremental Investigation

The reason a terminal agent beats a chatbot for real codebases is incremental investigation. Claude Code does not read your whole repo at once. It works the way a senior engineer does:

  • Grep for entry points or a symbol.
  • Read the files that matched.
  • Grep again for usages of what it found.
  • Read the consumers.

Each step narrows the search and pulls only the relevant code into context. This keeps the context window lean and the reasoning sharp — far better than dumping an entire directory into a single prompt.

# Conceptual investigation trail Claude Code follows:
# 1. Grep "createSession"   -> find where it's defined
# 2. Read src/session.ts     -> understand the definition
# 3. Grep "createSession"   -> find every caller
# 4. Read the callers        -> understand impact before editing

Edit vs. Write

The Edit tool performs a precise string replacement, and it requires the matched text to be unique in the file. This is a safety feature: a unique match means the change lands exactly where intended.

If the match is not unique — or the surrounding code is too ambiguous to target — the correct fallback is to Read the file and then Write it back with the change. As an architect, recognize that Edit failures are usually a uniqueness problem, not a tool bug.

# Edit needs an OLD string that appears exactly once.
# old_string: "const PORT = 3000"   # unique -> Edit succeeds
# old_string: "return null"          # appears 12x -> Edit refuses
# Fallback: Read the whole file, then Write the modified version.

It Lives Where You Work: Terminal and IDE

"Lives in your terminal and IDE" is not marketing — it is the operating model. Because Claude Code runs inside your project, it has direct access to:

  • Your actual file tree (via Glob, Grep, Read).
  • Your shell (via Bash) — so it can run tests, linters, git, and build commands.
  • Your project configuration files, which steer its behavior.

This is what makes it agentic rather than advisory. A chatbot can suggest a fix; Claude Code can apply the fix, run the test suite to confirm it, and iterate if the test fails — all without you leaving the terminal.

CLAUDE.md: Project Memory

You steer Claude Code with a CLAUDE.md file — persistent instructions it reads at the start of a session. There is a hierarchy:

  • User-level (~/.claude/CLAUDE.md) — personal, not shared via version control. New teammates never see it.
  • Project-level (./CLAUDE.md or .claude/CLAUDE.md) — shared via VCS, so the whole team gets the same guidance.
  • Directory-level — scoped to a subtree.

Use @path imports to modularize, e.g. @./standards/coding-style.md. The exam distinction to remember: project-level is shared; user-level is private.

# ./CLAUDE.md  (committed, shared with the team)

## Build
- Run `yarn build` before committing

## Conventions
- Use absolute imports
@./standards/coding-style.md   # modular import

Rules, Commands, and Skills

Beyond CLAUDE.md, Claude Code offers finer-grained configuration:

  • .claude/rules/ — files with YAML frontmatter paths: that load only when you edit matching files. This saves context and tokens versus stuffing everything into one monolithic CLAUDE.md.
  • .claude/skills/ — the current way to package reusable workflows (.claude/commands/ is the legacy form). Project-scoped skills are shared via VCS; user-scoped ones are personal.

Skill frontmatter can set context: fork to isolate verbose output, restrict allowed-tools, and give an argument-hint.

---
paths:
  - "src/api/**/*.ts"
---
# This rule loads ONLY when editing files under src/api.
All endpoints must validate input with Zod before use.

Plan Mode vs. Direct Execution

Claude Code can either jump straight to editing or first propose a plan for your approval. Knowing when to use which is an architect-grade judgment call:

  • Use Plan Mode for large changes, when there are multiple viable approaches, for architectural decisions, or when you want safe exploration and explicit approval before any edits land.
  • Use direct execution for single-file fixes or a clear stack trace where the fix is obvious.

For the discovery phase of a large task, an Explore subagent isolates the investigation output so it does not clutter the main context.

Claude Code in CI/CD

Claude Code is not just interactive — it runs in pipelines too. The flags that matter:

  • -p / --print — non-interactive mode, required in any CI pipeline.
  • --output-format json (optionally with a schema) — produces parseable results your pipeline can act on.

A key reliability practice: run automated code review in an isolated session, separate from the one that generated the code. A fresh reviewer is less biased by the generation context — the author retains its own reasoning and tends not to challenge itself. When re-running, include the prior results and report only new or still-unfixed issues to minimize false positives.

# Non-interactive review in a CI job, parseable output:
claude -p "Review the staged diff for correctness bugs" \
  --output-format json > review.json

Memory and Context Commands

Two built-in commands shape how Claude Code manages state across a long session:

  • /memory — edits CLAUDE.md so your instructions persist across sessions.
  • /compact — compresses the current context when it grows large. Useful, but with a known risk: compression makes numbers, percentages, and dates vague. Keep critical transactional facts somewhere verbatim rather than trusting a compacted summary.

This connects to Domain 5 (Context Management & Reliability): models attend most to the start and end of context ("lost-in-the-middle"), so where you place key facts matters.

Quick Check: When the Agent Stops

A scenario from the Code Generation domain. Test your understanding of the agentic loop.

Recap: What Claude Code Is

Key takeaways from this lesson:

  • Claude Code is an agentic coding tool in your terminal and IDE — it reads real files, runs commands, and edits code directly.
  • It runs an agentic loop driven by stop_reason; terminate on end_turn, never by parsing text.
  • Its built-in tools — Glob, Grep, Read, Write, Edit, Bash — support incremental investigation; Edit needs a unique match, falling back to Read+Write.
  • CLAUDE.md steers it: project-level is shared via VCS, user-level is personal; .claude/rules/ and .claude/skills/ add scoped, on-demand configuration.
  • Plan Mode suits big or ambiguous changes; direct execution suits clear single-file fixes.
  • In CI/CD, use -p and --output-format json, and review in an isolated session.

You now have the foundation for the rest of the Claude Code Fundamentals track.

よくある質問

「Claude Codeとは」レッスンは無料ですか?

はい。「Claude Codeとは」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Claude Architectコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Claude Architectコースには全4レッスンが含まれています。

「Claude Codeとは」で何を学びますか?

ターミナルやIDE上で動作するエージェント型コーディングツールです ブラウザで直接実行するハンズオンコードでClaude Architectを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Claude Architectを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのClaude Architectは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン1/4です。

「Claude Codeとは」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このClaude Architectレッスンでコードを書いて実行できますか?

はい。すべてのClaude Architectレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. Claude Codeとは
  2. インタラクティブとヘッドレス
  3. Read / Edit / Writeループ
  4. メモリとCompactコマンド
← Claude Architectに戻る