0Pricing
Claude Architect · 강의

Claude Code 기본 제공 도구

Glob, Grep, Read, Write, Edit 및 Bash를 다룹니다

Claude Code 기본 제공 도구은(는) CoddyKit의 무료 Claude Architect 강의입니다. 이것은 4개 중 3번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Claude Architect 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Why Built-in Tools Matter

Claude Code ships with a small, powerful set of built-in tools that let the model explore and edit a codebase directly: Glob, Grep, Read, Write, Edit, and Bash.

As an architect, your job is not just to know what each tool does, but to know which tool to reach for at each step of an investigation. Picking the right one keeps context lean and the agent fast.

  • Glob — find files by name pattern
  • Grep — search file contents
  • Read — load one file
  • Write — create a file
  • Edit — make a precise change
  • Bash — run a shell command

Glob — Find Files by Pattern

Glob locates files by their name or path pattern, not their contents. It is the fastest way to answer "where are the X files?"

Patterns use standard glob syntax: ** matches any depth of directories, * matches within a segment. Reach for Glob before reading anything — it narrows a huge tree down to the handful of files worth opening.

# Find every React test file anywhere in the repo
Glob: **/*.test.tsx

# Find all config files at the project root
Glob: *.config.js

Grep — Search File Contents

Grep searches inside files for a string or regular expression. Use it to find where a function is defined, where a symbol is used, or which files mention a feature flag.

The key distinction to memorize for the exam: Glob matches file names; Grep matches file contents. Confusing the two is a classic misroute.

# Where is processRefund defined or called?
Grep: processRefund

# Find all TODO comments under src/
Grep: TODO  (path: src/)

Read — Load a File

Read loads the contents of a single file into context so the model can reason about it. After Glob or Grep has narrowed the candidates, Read brings the relevant file in.

Be deliberate: every file you Read consumes context window. Reading dozens of large files dilutes attention and triggers the lost-in-the-middle effect, where the model attends to the start and end of context far more than the middle. Read only what the investigation actually needs.

Write — Create a File

Write creates a new file (or fully overwrites one) with the content you supply. Use it when you are producing something from scratch — a new module, a config file, a test suite.

For changing an existing file, prefer Edit: it makes a surgical, reviewable change instead of rewriting the whole file. Reserve Write for genuinely new content or a deliberate full replacement.

Edit — Precise, Unique-Match Changes

Edit performs a precise change by matching a unique string in the file and replacing it. Because the match must be unique, it makes edits safe and reviewable — you change exactly the intended line, nothing else.

The exam-critical rule: if the target string is not unique, the Edit fails. The correct fallback is to Read the file for more surrounding context to build a unique match, or to Write the file if a full replacement is cleaner. Do not blindly retry the same ambiguous edit.

# Edit needs a unique old_string. If 'count = 0' appears 5 times,
# the edit is ambiguous and fails. Fix it by including unique context:
Edit old_string:
  def reset_cart(self):
      count = 0
Edit new_string:
  def reset_cart(self):
      count = 0
      self.dirty = True

Bash — Run Shell Commands

Bash runs shell commands: build, test, lint, git, package managers, or any CLI. It is the escape hatch for everything the dedicated tools don't cover.

Idiomatic practice: use the dedicated tool when one exists. Prefer Grep over bash grep, Read over cat, Glob over find — they return structured, model-friendly results. Save Bash for genuine shell work like running the test suite or a git operation.

# Good use of Bash: actually running things
Bash: npm test -- --runInBand
Bash: git status --short

# Avoid: Bash: grep -r processRefund .   ← use Grep instead
# Avoid: Bash: cat src/cart.ts          ← use Read instead

The Incremental Investigation Pattern

Built-in tools shine when chained into an incremental investigation rather than dumping the whole codebase into context. The canonical loop:

  1. Grep the entry points to find where behavior originates
  2. Read those files to understand them
  3. Grep for usages of the symbols you found
  4. Read the consumers that matter

Each step narrows the search before the next widens it. This keeps context focused and avoids the lost-in-the-middle problem.

# Trace a bug in refund handling:
Grep: processRefund            # 1. find entry points
Read: src/payments/refund.ts   # 2. understand it
Grep: processRefund(           # 3. find callers
Read: src/api/checkout.ts      # 4. read the consumer

Tools Map to a Developer-Productivity Workflow

In the certification's Developer Productivity scenario, built-in tools are the foundation of fast, focused work. The architect's instinct is to scope each tool to the step and avoid loading more than needed.

When the repo's built-in tools aren't enough — you need a database schema, an issue tracker, or an external catalog — you reach for MCP servers, which extend Claude Code with additional tools and read-only resources. Built-in tools cover the local filesystem; MCP covers everything outside it.

Least Privilege: Scope Tools to the Role

When you put these tools behind a subagent or skill, grant only what the role needs. A read-only review agent should get Glob, Grep, and Read — not Write, Edit, or Bash.

This matters because 4–5 tools per agent is optimal; piling on 18+ degrades selection reliability. Restricting the toolset both enforces safety and sharpens the model's choices. In a skill, the allowed-tools frontmatter field does exactly this.

---
name: code-reviewer
description: Read-only reviewer that inspects but never modifies code
allowed-tools: Glob, Grep, Read
argument-hint: <path-to-review>
---
Review the files under $ARGUMENTS for correctness issues only.

Built-in Tools in CI/CD

These same tools power non-interactive runs in a pipeline. With -p / --print Claude Code runs headless, and --output-format json makes results parseable for the CI step that follows.

For pre-merge review, run in an isolated session — a fresh review is less biased than self-reviewing in the same session that generated the code. And use a blocking, synchronous call here: the Batch API (50% cheaper, up to 24h, no latency SLA) is for overnight audits, never for time-sensitive pre-merge checks.

# Headless review in a pipeline, machine-readable output
claude -p "Review the staged diff for correctness bugs only" \
  --output-format json \
  --allowedTools Glob,Grep,Read

Quick Check: Choosing the Right Tool

You are tracing where a function named process_refund is called across an unfamiliar TypeScript repo, then you need to change one specific call site whose surrounding code is identical to three others. Which approach is correct?

Recap: Built-in Tools

Key takeaways for the exam:

  • Glob = find files by pattern; Grep = search file contents — never confuse the two.
  • Read loads a file; read only what you need to avoid lost-in-the-middle.
  • Write creates/overwrites; Edit makes a precise unique-match change. If the match isn't unique, Read for more context (or Write a full replacement) — don't blindly retry.
  • Bash is for real shell work; prefer dedicated tools over grep/cat/find.
  • Chain them incrementally: Grep entry points → Read → Grep usages → Read consumers.
  • Apply least privilege (4–5 tools, read-only for reviewers); in CI use -p + --output-format json in an isolated session, and never the Batch API for blocking checks.

자주 묻는 질문

“Claude Code 기본 제공 도구” 강의는 무료인가요?

네 — “Claude Code 기본 제공 도구” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Claude Architect 강의 전체를 잠금 해제할 수 있습니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.

“Claude Code 기본 제공 도구”에서 뭘 배우나요?

Glob, Grep, Read, Write, Edit 및 Bash를 다룹니다 브라우저에서 직접 실행하는 실습 코드로 Claude Architect을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Claude Architect을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Claude Architect은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 3번째 강의입니다.

“Claude Code 기본 제공 도구” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Claude Architect 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Claude Architect 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 에이전트당 도구 수
  2. tool_choice: auto / any / forced
  3. Claude Code 기본 제공 도구
  4. 점진적 조사 패턴
← Claude Architect(으)로 돌아가기