Claude Code Agents for PyEye¶
This document describes the Claude Code agents (subagents) used in this repository.
Overview¶
Agents appear in Claude Code's /agents command and run in a separate context from your main session, so detailed analysis doesn't clutter the main conversation. Each agent is defined by a markdown file in .claude/agents/ with YAML frontmatter that sets its name, description, and the tools it may use.
Available agents¶
smart-commit¶
Git commit workflow with pre-commit validation: checks status/diff, screens for secrets, runs the pre-commit hooks, writes a conventional-commit message, and handles hook fixes. Invoke when the user says "commit". See .claude/instructions/06-workflow-commits.md.
Other entries in
/agents(e.g.general-purpose,statusline-setup) are Claude Code built-ins, not defined in this repository.
Retired agents¶
- cross-platform-validator (retired #483) — it was built on the Jedi-shaped tools removed in v2.0 (
find_symbol,get_type_info,find_imports,get_module_info,list_modules) plusfind_references/get_call_hierarchy(themselves removed in #505), and its core job (finding code matching a pattern likestr(path)) is a textual search that pyeye is explicitly not for. Usescripts/check_cross_platform_paths.pyand the rules in.claude/instructions/10-cross-platform.mdinstead. - worktree-manager (retired #362) — superseded by native worktree tooling (
EnterWorktree/ theusing-git-worktreesskill).
How agents work¶
- Separate context — agents run isolated, preserving the main session.
- Tool restrictions — the frontmatter
tools:line is an allow-list; an agent can only call those tools. Grant the minimum needed. - Definition format:
---
name: agent-name
description: "Brief description of what the agent does"
tools: tool1, tool2, tool3
---
[Agent system prompt with detailed instructions]
Creating a new agent¶
- Pick the right tools for the task. This is the lesson from the retired cross-platform-validator: match the tool to the job, don't force everything through one layer.
- Semantic navigation (what is this symbol, what does it call, who imports
it, what's the structure) → the pyeye primitives
resolve/resolve_at/inspect/outline/expand/trace. See thepython-exploreskill. - Textual / pattern search (find every site that does
str(path), grep a regex, locate a string literal) →Bash/grep. pyeye is not a content search engine and does not answer "who references this" (deferred to #333). - Editing →
ReadthenEdit/MultiEdit. - Define the agent in
.claude/agents/<name>.mdwith the frontmatter above, granting only the tools it needs. - Test it via
/agentsor a directAgenttool call withsubagent_type: "<name>", and document it in this file.
Benefits¶
- Context preservation — heavy analysis stays out of the main session.
- Tool safety — agents only hold the permissions they're granted.
- Reusability — agent definitions are checked in and shared across the team.