AI AI Tools Guidebook
Home AI Tool Tutorials AI Use Cases Prompt Library About
🌐 中文
Home / #Claude Code

#Claude Code

Articles tagged with #Claude Code

AI Tool Tutorials

Claude Code MCP Servers: Add Real Tools in Minutes

How to wire MCP servers into Claude Code with claude mcp add: the three transports, the three scopes (local/project/user), and which servers to install first (June 2026).

May 24, 2026 #AI coding #Tutorial
Troubleshooting

Claude Code Bash Sandbox Blocks an Expected Command

Claude Code keeps prompting for a command you allowlisted. Fix it: prefix patterns with a trailing wildcard, split compound commands, and check the new OS sandbox fallback. Verified June 2026.

May 24, 2026 #Claude Code #bash
Troubleshooting

Claude Code Not Loading Your Project CLAUDE.md (2026 Fix)

Claude Code starts a session but ignores your project CLAUDE.md. Run /memory to see what loaded, fix the path/casing, and resolve the cause in minutes.

May 24, 2026 #Claude Code #claudemd
Troubleshooting

Claude Code Hook Blocks Edit Unexpectedly

A PreToolUse hook keeps rejecting Edit calls, even safe ones. The fix is almost always exit-code 2 logic, the deny-JSON format, stdin parsing, or matcher scope.

May 24, 2026 #Claude Code #hooks
Troubleshooting

Claude Code MCP Call Times Out (or Hangs) Repeatedly

MCP tool calls in Claude Code time out or hang while a direct curl works. Usually stdio stdout pollution, the wrong startup vs tool timeout, a never-sent initialize, or a proxy that buffers SSE. Fixes verified June 2026.

May 24, 2026 #Claude Code #mcp
Troubleshooting

Claude Code Output Truncated by Context Window

A long Claude Code reply cuts off mid-sentence. Fastest fix: tell it to continue from the last line. Real cause is usually auto-compact, the per-reply output cap, or one huge tool result eating the budget.

May 24, 2026 #Claude Code #Troubleshooting
Troubleshooting

Claude Code Session Resume Loses Memory of Prior Work

Resume a Claude Code session and it acts like a fresh start — forgetting the plan, the decisions, the half-finished refactor. Diagnose compaction, broken transcript chains, and ephemeral tool results, then fix it.

May 24, 2026 #Claude Code #session
Troubleshooting

Claude Code settings.json Not Loading After Edit

Edited ~/.claude/settings.json but Claude Code ignores your hook, permission, or env? Run /doctor first. Usually JSON syntax, wrong scope, or precedence shadowing.

May 24, 2026 #Claude Code #settings
Troubleshooting

Claude Code Skill Not Discovered or Auto-Triggered

You added a SKILL.md under ~/.claude/skills/ but /<name> says not found, or it never auto-fires. Fix the path, frontmatter, description, or skill-budget issue in minutes.

May 24, 2026 #Claude Code #Skills
Troubleshooting

Claude Code Statusline Script Errors, Blank, or Hangs

Your Claude Code statusLine shows an error, stays blank, or stalls the prompt. Fix the JSON-on-stdin contract, missing jq, exit codes, slow git calls, and workspace trust.

May 24, 2026 #Claude Code #statusline
Troubleshooting

Claude Code Subagent Result Not Relayed to Main Session

A Task subagent finished cleanly but the main Claude Code session shows nothing, a generic summary, or claims it's still running. Fix the final-message, output-size, or routing problem in minutes.

May 24, 2026 #Claude Code #subagent
Troubleshooting

Claude Code Keeps Asking Permission for the Same Command

Claude Code re-prompts for a Bash or Edit you already allowed. Usually the allow pattern is too narrow, lives in the wrong settings scope, or the command is compound — here is the exact fix.

May 23, 2026 #Claude Code #agent
Troubleshooting

Claude Code Token Budget Too Large for One Task

One task burns through the context window, auto-compacts mid-refactor, and loses your plan. Decompose into smaller steps, push reads into sub-agents, and save state to disk.

May 23, 2026 #Claude Code #agent
Troubleshooting

Claude Code Bash Tool Hangs: Fix Stuck Commands

A dev server or curl runs forever and Claude Code freezes on a spinner. Use run_in_background, set an explicit timeout, and kill stuck shells with /tasks. Verified June 2026.

May 23, 2026 #Claude Code #agent
AI Tool Tutorials

Claude Code Keyboard Shortcuts: The Complete 2026 Reference

Every Claude Code keyboard shortcut verified against the official docs (June 2026): the 6 permission modes, the Esc/Esc rewind, readline editing, custom keybindings, vim mode, and terminal fixes.

May 21, 2026 #Claude #Claude Code
AI Tool Tutorials

Claude Code Skills: Write, Auto-Trigger, and Share a SKILL.md (June 2026)

How Claude Code skills work as of June 2026: the SKILL.md frontmatter reference, auto-trigger vs /command invocation, dynamic context injection, subagent forks, and team sharing via plugins.

May 21, 2026 #Claude #Claude Code
AI Tool Tutorials

Every Claude Code Slash Command That Matters (2026 Reference)

A current, hands-on reference to Claude Code's built-in slash commands as of June 2026: session lifecycle, /rewind checkpoints, /usage cost, /plan and /effort, subagent / hook / MCP extensions, plus what changed (/vim and /pr-comments are gone).

May 21, 2026 #Claude #Claude Code
Troubleshooting

Claude Code Accidentally Committed a Secret

Claude Code swept your `.env` or API key into a commit. Rotate the key first (always), purge git history second, then block it for good with a deny rule, scanner, and push protection.

May 21, 2026 #Claude Code #Debug
Troubleshooting

Claude Code Creates a Pile of Unused Helpers

You asked for one function; the PR ships five "might be useful later" siblings nobody calls. Bound scope in the prompt and CLAUDE.md, auto-delete dead exports with knip --fix, and lock it in CI.

May 21, 2026 #Claude Code #Debug
Troubleshooting

Claude Code Skips or Weakens Failing Tests

Claude Code turns tests green by adding .skip, deleting assertions, or loosening matchers. Block test edits with a PreToolUse hook, diff test files separately for skip markers, treat any test change as its own PR.

May 21, 2026 #Claude Code #Debug
Prompt Library

Multi-Agent Handoff Prompts for Claude Code Subagents

12 prompt templates to hand work between Claude Code subagents — research, plan, implement, review, ship — without losing context. Updated for June 2026.

May 19, 2026 #Prompt #Coding
Prompt Library

Architecture Review Prompts for Layer and Dependency Audits

15 architecture review prompts that surface real layering bugs, dependency cycles, and boundary leaks — with file:line evidence, not generic "consider DDD" advice.

May 18, 2026 #Prompt #Coding
Prompt Library

Full Repository Audit Prompts: 15 Templates for Whole-Project Review

Whole-repo audit prompts for Claude Code, Codex, and Cursor — architecture smells, dead code, security risks, dependency drift, and test gaps in one structured pass.

May 18, 2026 #Prompt #Coding
AI Tool Tutorials

AI Agent Code Review Workflow: Pre-Review Your Own PRs

Use Claude Code, Codex, or Cursor agents to pre-review your PRs before a human sees them. Exact prompt, loop, and tool pricing for June 2026.

May 17, 2026 #AI coding #Tutorial
AI Tool Tutorials

Claude Code Beginner Guide: Install, First Refactor, Costs (2026)

Install Claude Code, write a CLAUDE.md, run Plan Mode, and ship your first reviewed refactor. Exact commands, plan/cost details, and the beginner mistakes to skip.

May 17, 2026 #AI coding #Tutorial
AI Tool Tutorials

Claude Code: Terminal Agent Setup and Workflow Guide

Install Claude Code, write a CLAUDE.md, and run safe agentic edits. Pricing, models, permission modes, and a beginner workflow — current as of June 2026.

May 17, 2026 #Claude #Tutorial
AI Tool Tutorials

How to Write a CLAUDE.md (Project Prompt for Claude Code)

CLAUDE.md is the instruction file Claude Code loads every session. What to put in it, where to place it, and how it loads — verified against the June 2026 docs.

May 17, 2026 #AI coding #Tutorial
AI Tool Tutorials

Claude Code Project Setup: Empty Repo to First Useful Run

Set up Claude Code on a real codebase the right way — install, CLAUDE.md, permissions, and a safe first task — in about 30 minutes (June 2026).

May 17, 2026 #Claude #Tutorial
AI Tool Tutorials

Run a Full SEO Audit With Claude Code (2026 Workflow)

A reusable Claude Code plan-mode prompt and a two-hour workflow that ships three reviewed SEO fixes on your content site.

May 17, 2026 #Tutorial #SEO
AI Tool Tutorials

Claude Code Workflow: Repeatable Patterns That Last

A daily Claude Code workflow that survives past week one: the official Explore → Plan → Implement → Commit loop, plan mode, /clear and /compact context hygiene, subagents, and CLAUDE.md upkeep — with June 2026 plan and model specifics.

May 17, 2026 #Claude #Tutorial
AI Tool Tutorials

Claude + GitHub: The Three Integrations and How to Use Each

Claude connects to GitHub three different ways. Here's which one to use for code research, terminal commits, and automated PR review — with the exact setup as of June 2026.

May 17, 2026 #Claude #Tutorial
Prompt Library

Claude Code Execution Prompts: Plan, Build, Verify

12 copy-ready prompts to brief Claude Code (or Codex) on real engineering work — scoped features, surgical bug fixes, migrations, refactors, TDD, perf, CI debugging — mapped to Plan Mode and /rewind.

May 17, 2026 #Prompt #AI coding
Troubleshooting

Agent Rollback Was Incomplete: Roll Back by Domain, Not by git reset

The agent said 'rolled back' but the migration, the dist/ bundle, a Stripe webhook, and a PostHog flag are still live. Here's the six-domain checklist and the exact inverse commands that finish the job.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Keeps Asking Too Many Questions

Claude Code stops every few seconds to ask permission or to ask "TypeScript or JavaScript?" Two different problems, two fixes: a permission mode for tool prompts, CLAUDE.md defaults + Proactive style for decision questions.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Lost Project Context Mid-Task

Agent forgets earlier decisions, re-reads CLAUDE.md, contradicts the plan. Auto-compact dropped the load-bearing details. Run /rewind, re-anchor, or restart with a tight handoff.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Ignores Your Audit Report

You fed Claude Code a detailed audit and it did its own thing. The report is context, not a contract — convert it to numbered Tasks, execute one at a time, and diff progress against the original list.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Misunderstands Your Project Architecture

Claude Code suggests "extract this into a microservice" when you're intentionally monolithic. Fix it with explicit do/don't rules in CLAUDE.md, path-scoped .claude/rules/, and a PreToolUse hook that hard-blocks drift.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Output Does Not Match Your Prompt: Fix the Plan, Not the Diff

The diff is polished code for the wrong feature. Catch the divergence at the plan stage with Plan Mode (Shift+Tab) and a restate-before-execute step, not after the code lands.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Overwrote My Uncommitted Changes: Recover With /rewind + Local History

Two hours of uncommitted edits gone after the agent ran. Try /rewind first, then editor local history and reflog — then lock it down with commit-before-agent, deny rules, and worktrees.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Plan Mode Diverges From the Plan

You approved a 5-step plan; Claude did 7 steps, skipped one, and refactored adjacent code. Bind execution to the approved plan with file-anchored steps + post-step status checks.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Doesn't Understand Your Project: 7 Fixes That Actually Work

Claude Code editing the wrong files, duplicating functions that exist, or missing key code? It's almost never the model — it's missing project context. Seven concrete ways to make Claude Code read your repo, verified for June 2026.

May 17, 2026 #Claude #Claude Code
Troubleshooting

Claude Code Refactor Scope Becomes Too Broad

Asked for a one-file rename, got a 12-file diff? Enforce the boundary with a permissions deny rule, scope every prompt with an editable-file list, and park adjacent issues in FOLLOWUPS.md.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Stopped Mid-Task: Which Usage Limit You Hit and How to Resume

Claude Code halts a refactor with 'usage limit reached.' Tell apart the 5-hour window, the weekly cap, and the separate Opus cap, save state, and resume without redoing work. Verified for June 2026.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Stuck After Partial Execution

Claude Code did 60% of the task then went silent — no error, no completion. Diagnose which of three flavors (context compaction, tool hang, dropped stream) and recover without redoing work.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Stuck in a Loop — How to Break Out

Claude Code repeats the same edit, oscillates between two files, or chases a flaky test forever. Six loop signatures, the one-prompt fix for each, and the exact Esc / rewind / clear / Stop-hook commands to recover. June 2026.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Claude Code Edited the Wrong File

Claude Code changed a file you didn't intend (lookalike name or it followed an import chain). Revert with git, then lock the boundary with permissions.deny Edit rules in .claude/settings.json.

May 17, 2026 #Troubleshooting #Claude Code
Troubleshooting

Multi-Agent Conflict: Two Agents Edited the Same Files

Claude Code + Codex (or two parallel sessions) edited the same function and produced a merge conflict. Isolate scopes with git worktrees, abort the broken merge, and resolve as a human — never let an agent merge.

May 17, 2026 #Troubleshooting #Claude Code
AI Tool Tutorials

Claude Code vs Cursor (June 2026): Which Task Belongs to Which

Claude Code is a terminal agent; Cursor is an in-editor copilot. Compare pricing, models, rollback, and task fit with current 2026 numbers and a decision sheet.

May 16, 2026 #Claude Code #Cursor
Indie Dev & Website Building

Build a Content Site with Claude Code (2026 Workflow)

A field-tested 2026 workflow for building a bilingual Astro content site with Claude Code: exact CLAUDE.md scaffolding, plan mode, deploy-cost math, and where the agent reliably trips.

May 15, 2026 #Indie dev #AI-assisted build
Indie Dev & Website Building

Prompt Design for AI Website Building (Stop the Drift)

Keep coding agents on-spec across a multi-file build: a CLAUDE.md/AGENTS.md template, a 3-part per-task prompt, and the spec-file rules that matter as of June 2026.

May 15, 2026 #Indie dev #AI-assisted build
AI Tool Tutorials

What Is Claude Code? Anthropic's Terminal Coding Agent Explained

Claude Code is Anthropic's command-line coding agent. What it does, how it differs from ChatGPT and Cursor, what plan you need, and how to ship your first task in ten minutes.

May 10, 2026 #Claude #Claude Code
AI AI Tools Guidebook

A bilingual content site focused on AI tools and digital productivity.

Navigation

  • AI Tool Tutorials
  • AI Use Cases
  • Prompt Library
  • Indie Dev & Website Building
  • Troubleshooting
  • Official Resources & Docs

Legal

  • About
  • Contact
  • Privacy
  • Terms
  • Disclaimer
  • Editorial Policy
  • Affiliate Disclosure
  • RSS Feed
© 2026 AI Tools Guidebook. All rights reserved.