Life = Content

Say hello.

A question about AI, a project idea, or something you’re exploring. I’d like to hear about it.

contact@dylanjharris.com

Open Gmail

Or say hi on X · @dylanjharris
More ways to get in touch

Writing

Claude Code field guide: setup, skills, hooks, and better results

updated 2026-10-19

Give Claude Code a clear job, the right project context, and a way to check its own result. Add skills and automation once the same work repeats.

This guide covers the coding agent that reads a repository, edits files, and runs commands, along with how broader Claude task features fit in. Older guides call some of those task features Cowork; access and controls still depend on the interface you use.

A workflow from project context to an agent task, then tests and human review.
Give the agent a job it can verify.

What is in this guide?

Which Claude tool do you need?

ToolGood starting useContext to provide
Claude chatQuestions, drafts, analysis, and work with uploaded materialRelevant files and instructions; Projects can organize related work
Claude task features, formerly CoworkDelegated work with files and connected toolsA permitted workspace, inputs, and a clear deliverable
Claude CodeRepository changes, scripts, tests, and development tasksThe actual project, its commands, and its working rules

Claude Code runs in the terminal, desktop app, web browser, and IDE integrations. The environment determines which files and tools it can reach—a cloud session cannot see the files on your laptop unless you connect them. Claude Code overview.

Anthropic is folding Cowork features directly into Claude, with rollout starting on Pro and Max. Older instructions that point to a separate Cowork tab may not match your account. Cowork is now Claude.

Don’t treat “chat can’t handle files” as the dividing line. Instead, check whether the interface you picked can reach the working files, tools, and permissions your task requires.

How do you start with Claude Code?

Use Anthropic's installer for your operating system. On macOS, Linux, or WSL, its native install command is:

curl -fsSL https://claude.ai/install.sh | bash
claude --version
cd /path/to/your/project
claude

Use your real project path. Follow the sign-in flow. Supported access includes eligible Claude subscriptions, a Console account, and supported cloud providers. Billing depends on which route you use. Official quickstart.

For a first session, ask for a read-only tour:

Explain this repository. Find its entry points, build command, tests, and deployment rules. Identify missing setup. Do not edit files yet.

Then choose a small task whose result you can inspect: fix a broken link, add a validation rule, or produce a report from sample data. Use the result to check your setup before asking for broader changes.

Check the permission mode shown in your session. Defaults can differ by account, interface, and managed settings. Auto mode is not an unrestricted bypass: it uses automated review. Use Manual mode when you want to review operations yourself. Permissions and sandbox controls are separate from prose instructions. Permission modes.

What belongs in CLAUDE.md?

Put project facts and broad working rules in CLAUDE.md. Claude Code reads applicable instruction files as it works. Auto memory is a separate feature for saved learning. Neither changes the model's trained weights. Memory and project instructions.

A useful starting file might be:

# Working in this repository

- Use the existing components before adding a dependency.
- Run npm run typecheck after TypeScript changes.
- Run the relevant tests before calling a change complete.
- Create a feature branch from dev.
- Follow docs/deployment.md for promotion and rollback.
- Keep credentials out of code, logs, and commits.
- Report the change, the checks run, and any unresolved issue.

These are example commands and policies. Replace them with the ones your project actually uses.

Keep this file short enough to scan. Move rare procedures into skills and long explanations into linked docs instead of pasting a vendor manual into every session.

No magic line-count limit guarantees good results; the practical test is whether the agent finds and follows the rules that matter.

How do you write a task Claude can finish?

Give the agent the outcome, relevant evidence, boundaries, and acceptance check.

Goal: Fix the search page when the query has no matches.
Context: Reproduce with the query "zzzz-no-result".
Expected result: Show a clear empty state and keep the search input.
Constraints: Reuse the current components. Do not change search ranking.
Check: Verify one matching query and one empty query on mobile and desktop.
Report: List the changed files, checks, and anything still uncertain.

For unfamiliar or broad work, start in Plan mode before editing (claude --permission-mode plan, or switch modes inside the session). For an obvious typo fix, a separate planning phase just adds overhead. Planning and common workflows.

When a requirement is ambiguous, tell the agent to ask only the questions that would change the implementation. Nobody needs a twenty-question interview for a one-line change.

When should you use skills, hooks, or subagents?

These tools solve different problems. Anthropic describes them as separate ways to steer Claude Code. Customization guide.

NeedUseExample
A rule that applies across this projectCLAUDE.mdRequired build and deployment checks
A repeatable procedureSkillPrepare a release note from merged changes
Code that runs at a defined eventHookValidate an edited file
A focused task with separate contextSubagentInspect a change for permission bugs
Access to another serviceCLI, API, or MCP integrationRead the issue linked in the task
Shared installation of several extensionsPluginDistribute team skills and tools

Create a small skill

Create .claude/skills/release-summary/SKILL.md:

---
name: release-summary
description: Summarize a supplied release diff for users. Use for release notes, not general code review.
---

1. Read the supplied diff and linked issue.
2. Describe the user-visible change in two sentences.
3. Include a migration step only when the diff requires one.
4. Separate verified checks from checks that were not run.
5. Return a draft. Do not publish it.

Invoke it with /release-summary, or ask for a release summary in plain language. Claude can select relevant skills from their descriptions. Project skills live in .claude/skills/; personal skills can live in ~/.claude/skills/. Claude Code skills.

Test both kinds of request. If the skill works only when you name it, improve its description. For team distribution, see the agent skills guide.

Use a hook for a defined event

A hook needs an event name and the expected input format. A list of commands under an arbitrary hooks array is not enough.

This minimal .claude/settings.json example runs an existing project check after successful Edit or Write tool calls:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "npm run typecheck"
          }
        ]
      }
    ]
  }
}

Use this only in a project that defines typecheck. The command runs in the hook’s current working directory, so after a directory or worktree change it may check a different package. In a multi-package repo, parse cwd from the hook’s JSON input to target the right package (CLAUDE_PROJECT_DIR can still point to the original checkout). Running a full type check after every edit can also slow down large repos; prefer a targeted check or run the full suite at a later stage.

Hooks receive structured JSON on standard input. Have file-aware scripts parse that standard input rather than assuming an environment variable like CLAUDE_FILE_PATHS exists. Note that PostToolUse on Edit|Write does not catch file edits made through Bash or external processes, and because it runs after the edit, it cannot block the write. Hook reference.

Run /hooks to inspect your configuration, and test both passing and failing cases on a scratch file before relying on it. Hook setup guide.

Ask for an independent review

A subagent can inspect a bounded change in its own clean context—useful once your main session has already committed to one approach, though not infallible. Subagents.

For a UI change, split the review into three focused questions:

  • Brief: Does the page do what was requested?
  • System: Does it reuse the site's existing components and styles?
  • Craft: Do real mobile and desktop screenshots look right?

Ask each reviewer for concrete evidence and specific fixes, and cap the loop at a couple of rounds. If reviewers still disagree, make the call yourself. No fixed token budget or automated “loop until perfect” recipe replaces human judgment.

How do you manage context and cost?

Keep the session focused on one job. Large command outputs and unrelated discussions make the important evidence harder to find.

SituationPractical response
Starting unrelated workSave needed state, then use /clear
Continuing a long taskUse /compact with the facts to preserve
Returning to prior workResume the relevant session
Investigating a noisy subsystemGive a bounded investigation to a subagent
Repeating a stable data operationUse a script and return its summary

Anthropic recommends context management and evidence-based verification. It does not establish a universal “quality fails at turn 30” or “clear at 60%” rule. Best practices.

A good handoff records the goal, files changed, decisions, test results, open issues, and next action. Save it in the project when work spans sessions. Exclude secrets.

Cost also depends on the model, task length, tool output, and billing route. More agents can finish independent work sooner, but they can also repeat the same reading. Measure useful results and corrections, not just response speed. Cost management.

How do you review the result?

Ask for evidence you can inspect:

WorkEvidence
Bug fixReproduction before the change; passing check after it
Website changeMobile and desktop views; working interactions
Data importCounts, duplicate handling, and a sample of imported rows
RefactorRelevant tests plus a review of behavior changes
DeploymentCorrect environment, live response, and rollback path

Review the diff before merge. “Tests passed” means little if no relevant test ran. A screenshot of a static page does not prove its buttons work.

For GitHub automation, use the actual anthropics/claude-code-action setup. GitHub workflow files belong in .github/workflows/. Install the integration, configure its required permissions and credentials, and test it in a non-production repository. A local Claude Code installation alone does not enable automatic PR reviews. Official GitHub Actions guide.

What should you set up first?

Start with one project instruction file, one clear task, and one relevant check. Add a skill when a procedure repeats. Add a hook when an event should run code. Add parallel review when the extra review is worth its cost.

For recurring work outside a coding session, use the Claude automation guide. For current tools and learning resources, browse the AI directory.

FAQ

Is Claude Code only a terminal tool?

No. It has terminal, desktop, web, and IDE interfaces. The available files, tools, and controls depend on the environment.

Is CLAUDE.md the same as a skill?

No. CLAUDE.md supplies broad project instructions. A skill supplies a procedure or reference for a particular task.

Does a skill train the model?

No. It supplies instructions and resources during work. It does not update the model's trained weights.

Should I use hooks for all checks?

No. Use hooks when a defined event should run a check. Keep expensive checks at sensible stages. Ensure that the event covers the way files actually change.

Should I clear context at a fixed percentage?

There is no universal threshold. Save important state and start fresh when the task changes or accumulated context stops helping.

Can Claude Code deploy a website?

It can use deployment tools when configured and authorized. Define the branch flow, environment, checks, and rollback procedure before using it for production.

← back to writing