Claude Code setup guide
Create a read-only project subagent in Claude Code
Short answer. If you keep asking Claude to check whether the README points to files that still exist, give that check its own subagent. Start with a task that only needs to read the repository. From the repository root, create .claude/agents/readme-path-check.md. Claude Code loads project subagents from .claude/agents/.
By CWYN · Last updated · Not affiliated with Anthropic · Published
1. Give the subagent a project home
From the repository root, create .claude/agents/readme-path-check.md. Claude Code loads project subagents from .claude/agents/. Use a name that is distinct from your other agents so you can identify it in the session.
2. Limit the tools to reading and searching
Put this example in the file. The YAML at the top names the agent and restricts it to the tools listed. The Markdown below tells it what to check.
---
name: readme-path-check
description: Checks whether paths in the project README exist.
tools: Read, Glob, Grep
---
Read the project README. Check the repository-relative file paths it
mentions. Report missing paths with the line where each is mentioned.
3. Pick the subagent in the prompt
Open a Claude Code terminal session from the repository root. If you created the .claude/agents/ directory after starting the session, restart Claude Code. Type @, select readme-path-check from the suggestions, and ask it to check the README paths.
4. Confirm the delegation and check one result
Look for a tool call in the transcript named for your subagent. If the agent reports a missing path, check that line in the README and look for the file yourself. If the agent is missing from the picker, check the project path and the name and description fields before trying a fresh session.
If a later task needs an agent to edit files while you work, give the subagent its own worktree so it edits a separate checkout.
If you want the same checklist to run after every edit, compare subagents, skills and hooks to choose what should trigger the check.
Sources · Project scope, frontmatter, tools and explicit invocation