ใใใฏใใชใซใใใใใฆๆธใใใใฎ๏ผ
Claude Codeใฎใฆใผใถใผใๆกๅผตใงใใๆฉ่ฝใ่ฆใฆใใฃใฆใฟใใใใจใใใ้กใฎใฒใจใคใงใใ
ไปๅใฏใตใใจใผใธใงใณใใซใคใใฆ่ฆใฆใใใพใใ
ใชใGeminiใฎ็กๆ็ใงClaude Codeใไฝฟใใใจใใใจใใฌใผใใชใใใ็ใซๅณใใใใจใใใใใพใใใ
ใตใใจใผใธใงใณใ
Claude Codeใฎใตใใจใผใธใงใณใใซ้ขใใใใญใฅใกใณใใฏใใกใใงใใ
ใตใใจใผใธใงใณใใจใใใฎใฏClaude Codeใใฟในใฏใๅง่ญฒใงใใAIใขใทในใฟใณใใงใไปฅไธใฎ็นๅพดใๆใกใพใใ
- ็นๅฎใฎ็ฎ็ใจๅฐ้ๅ้ใๆใค
- ใกใคใณใฎไผ่ฉฑใจใฏๅฅใฎ็ฌ็ซใใใณใณใใญในใใฆใฃใณใใฆใไฝฟ็จใใ
- ็นๅฎใฎใใผใซใไฝฟ็จใงใใใใใซ่จฑๅฏ่จญๅฎใงใใ
- ๅบๆใฎใทในใใ ใใญใณใใใๆใค
ใใใฏไปฅไธใฎใใใชใกใชใใใซใคใชใใใพใใ
- ใณใณใใญในใใ็ฌ็ซใใฆใใใฎใงใใกใคใณใฎไผ่ฉฑใฎใณใณใใญในใใๆฑๆใใชใใใใใฏใกใคใณใฎไผ่ฉฑใฎๅ่ณชไฝไธ้ฒๆญขใซใคใชใใ
- ใใๅ้ใซ็นๅใงใใใใใใใญใณใใใใใ่ฉณ็ดฐใซใซในใฟใใคใบใงใใ
- ไฝๆใใใตใใจใผใธใงใณใใฏใใญใธใงใฏใๅ จไฝใใใผใ ใงๅ ฑๆใใฆๅๅฉ็จๅฏ่ฝ
- ใตใใจใผใธใงใณใใฏ็ฐใชใใใผใซใขใฏใปในใฌใใซใๆใกใใตใใจใผใธใงใณใใฎ็จฎ้กใซใใฃใฆๅผทๅใชใใผใซใฎไฝฟ็จใๅถ้ใงใใ
ใณใณใใญในใใฆใฃใณใใฆใ็ฌ็ซใใฆใใใจใใใฎใฏใตใใจใผใธใงใณใใง็็ฎใใใใใคใณใใงใใใ่จใๆใใใจใกใคใณใฎไผ่ฉฑใฎใณใณใใญในใใ
ๅผใ็ถใใชใใฎใงใตใใจใผใธใงใณใ็จใซใณใณใใญในใใๅ้ใใๅฟ
่ฆใใใใใจใซๆณจๆใๅฟ
่ฆใงใใใใใฏใฌใคใใณใทใผใๅขๅ ใใใใจใ
ๆๅณใใพใใ
Subagents / Performance considerations
ใตใใจใผใธใงใณใใฎๅฎไฝใฏใFrontmatterไปใใฎMarkdownใงใใ
Subagents / Subagent configuration
้ ็ฝฎๅ ใฏไปฅไธใซใชใใพใใ
- ใใญใธใงใฏใๅไฝใฎใตใใจใผใธใงใณใ โฆ
.claude/agentsใใฃใฌใฏใใชใผ - ใฆใผใถใผๅไฝใฎใตใใจใผใธใงใณใ โฆ
$HOME/.claude/agentsใใฃใฌใฏใใชใผ
ๅใๅๅใฎใตใใจใผใธใงใณใใใใๅ ดๅใฏใใใญใธใงใฏใๅไฝใฎๆนใๅชๅ ใใใพใใ
ใใฉใผใใใใจใใฆใฏใใใชๆใใงใใญใ
--- name: your-sub-agent-name description: Description of when this subagent should be invoked tools: tool1, tool2, tool3 # Optional - inherits all tools if omitted model: sonnet # Optional - specify model alias or 'inherit' --- Your subagent's system prompt goes here. This can be multiple paragraphs and should clearly define the subagent's role, capabilities, and approach to solving problems. Include specific instructions, best practices, and any constraints the subagent should follow.
Subagents / Subagent configuration / File format
Frontmatterใงใฏไปฅไธใๆๅฎใงใใพใใ
nameโฆ ๅฐๆๅญใจใใคใใณใไฝฟใฃใ๏ผใตใใจใผใธใงใณใใฎ๏ผไธๆใฎ่ญๅฅๅญdescriptionโฆ ใตใใจใผใธใงใณใใฎ็ฎ็ใ่ช็ถ่จ่ชใง่ชฌๆใใใใฎtoolsโฆ ใตใใจใผใธใงใณใใไฝฟ็จใงใใใใผใซใใซใณใๅบๅใใงๆๅฎใใใ็็ฅใใๅ ดๅใฏใกใคใณในใฌใใใงไฝฟ็จใงใใใใผใซใ็ถๆฟใใmodelโฆ ใตใใจใผใธใงใณใใไฝฟ็จใใใขใใซใใจใคใชใขในใจใใฆsonnetใopusใhaikuใๆๅฎใงใใinheritใจใใ็นๅฅใชใจใคใชใขในใงใฏใกใคใณในใฌใใใฎใขใใซใๅผใ็ถใใ็็ฅใใๅ ดๅใฏใขใใซ่จญๅฎใฎใตใใจใผใธใงใณใใขใใซใซ่จญๅฎใใใ
ใซในใฟใ ในใฉใใทใฅใณใใณใใฎFrontmatterใจไผผใฆใใใใใงใกใใฃใจ้ใใพใใญใ
Slash commands / Custom slash commands / Frontmatter
ใใผใซใฎไธ่ฆงใฏใใกใใงใใ
Claude Code settings / Tools available to Claude
ใกใชใฟใซใtoolsใซๆธใใใใใจใใฃใฆใตใใจใผใธใงใณใใใใฎใใผใซใไฝฟ็จใใใใจใๆฟ่ชๆธใฟใซใใใใใงใฏใชใใใใงใใ
ใซในใฟใ ในใฉใใทใฅใณใใณใใฎๅ ดๅใฏallowed-toolsใชใฎใงใฉใใใฆๅๅใ้ใใฎใ ใใใจๆใฃใใฎใงใใใๅใๆๅณใงใฏใชใใใใงใใญใ
ใใใพใงใใผใซใซใขใฏใปในๆจฉใไธใใใใฎใฎใใใงใใๆฟ่ชๆธใฟใจใใใๅ ดๅใฏใๅฅใฎ่จญๅฎใไฝต็จใใๅฟ
่ฆใใใใพใใ
ใตใใจใผใธใงใณใใไฝๆใใใซใฏ/agentsในใฉใใทใฅใณใใณใใไฝฟใใใใใฒใผใทใงใณใซๅพใฃใฆไฝๆใใฆใใใฎใใใใฟใใใงใใใใญใณใใใ
ๅ
ฅๅใใใใจใงClaudeใใจใผใธใงใณใใฎใใผในใไฝๆใใฆใใใพใใ
ใตใใจใผใธใงใณใใฎๅผใณๅบใๆนใฏใ่ชๅ็ใชๅง่ญฒใจๆ็คบ็ใชๅผใณๅบใใฎ2ใคใใใใพใใ
Subagents / Using subagents effectively
่ชๅ็ใชๅง่ญฒใฎๅ ดๅใไปฅไธใฎๅ ๅฎนใๅ ใซClaudeใใตใใจใผใธใงใณใใๅฉ็จใใพใใ
- ใชใฏใจในใใใใใฟในใฏใฎๅ ๅฎน
- ใตใใจใผใธใงใณใใฎ
description - ็พๅจใฎใณใณใใญในใใจๅฉ็จๅฏ่ฝใชใใผใซ
ๆ็คบ็ใชๅผใณๅบใใฎๅ ดๅใฏใใใญใณใใใซใตใใจใผใธใงใณใใฎๅๅใๅซใใพใใ
> Use the test-runner subagent to fix failing tests > Have the code-reviewer subagent look at my recent changes > Ask the debugger subagent to investigate this error
ใตใใจใผใธใงใณใใฎไพใฏใใกใใ่ฆใใจใใใใพใใใใญใผใซ่จญๅฎใใใใกใใจใตใใจใผใธใงใณใใใฉใใใใใฎใชใฎใใ่ชฌๆใใฆใใพใใญใ
ใในใใใฉใฏใใฃในใ่ฆใฆใใใพใใใใ
- Claudeใงใตใใจใผใธใงใณใใ็ๆใใใจใใใใๅงใใ
- ใฒใจใคใฎใตใใจใผใธใงใณใใซใในใฆใใใใใใจใใใฎใงใฏใชใใๅไธใงๆ็ขบใช่ฒฌๅใๆใคใตใใจใผใธใงใณใใไฝๆใใ
- ใใใฉใผใใณในๅไธใใตใใจใผใธใงใณใใฎๅไฝใฎไบๆธฌๅฏ่ฝๆงๅไธ
- ใทในใใ ใใญใณใใใงๆ็คบใ่กใใไพใๅถ็ดใๅซใใ
- ๆไพใใใฌใคใใณในใๅคใใปใฉใใใใฉใผใใณในใๅไธใใ
- ใตใใจใผใธใงใณใใๅฟ ่ฆใชใใผใซใฎใฟใ่จฑๅฏใใใใจ
- ใใผใธใงใณ็ฎก็ใใใใจ
ใใใชใจใใใงใใใใใใใจใฏๅฎ้ใซไฝฟใฃใฆ่ฉฆใใฆใใฃใฆใฟใพใใใใ
Claude Code๏ผClaude Code Router๏ผGemini๏ผใง่ฉฆใใพใใ
็ฐๅข
ไปๅใฎ็ฐๅขใฏใใกใใ
$ claude --version 2.0.42 (Claude Code) $ ccr version claude-code-router version: 1.0.66
Claude Code RouterใฏGeminiใไฝฟใใใใซ่จญๅฎใใฆใใพใใ
$HOME/.claude-code-router/config.json
{ "PORT": 3456, "Providers": [ { "name": "gemini", "api_base_url": "https://generativelanguage.googleapis.com/v1beta/models/", "api_key": "xxxxx", "models": ["gemini-2.5-flash", "gemini-2.5-flash-lite", "gemini-2.5-pro"], "transformer": { "use": ["gemini"] } } ], "Router": { "default": "gemini,gemini-2.5-flash", "think": "gemini,gemini-2.5-flash", "webSearch": "gemini,gemini-2.5-flash" } }
่ตทๅใฏใใกใใงใ
$ ccr code
ใตใใจใผใธใงใณใใไฝใฃใฆใฟใ
ใพใใฏใตใใจใผใธใงใณใใไฝใฃใฆใฟใพใใใใ
Quick startใซๅพใใ/agentsในใฉใใทใฅใณใใณใใไฝฟใฃใฆไฝใใพใใใใ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ >ย /agents โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ /agents Manage agent configurations
ใCreate new agentใใ้ธใณใพใโฆใจใใใใใใใใๅบใฆใใพใใใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Agents โ โ No agents found โ โ โ โ โฏ Create new agent โ โ โ โ No agents found. Create specialized subagents that Claude can delegate to. โ โ Each subagent has its own context window, custom system prompt, and specific tools. โ โ Try creating: Code Reviewer, Code Simplifier, Security Reviewer, Tech Lead, or UX Reviewer. โ โ โ โ โ โ Built-in (always available): โ โ general-purpose ยท sonnet โ โ statusline-setup ยท sonnet โ โ Explore ยท haiku โ โ Plan ยท sonnet โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ไฝๆๅ ดๆใ่ใใใพใใใ1. Projectใใ้ธๆใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Choose location โ โ โ โ โฏ 1. Project (.claude/agents/) โ โ 2. Personal (~/.claude/agents/) โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Claudeใงไฝใใๆๅใง่จญๅฎใใใใ่ใใใพใใใงใฏใใ1. Generate with Claudeใใงใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Creation method โ โ โ โ โฏ 1. Generate with Claude (recommended) โ โ 2. Manual configuration โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ใใใใใตใใจใผใธใงใณใใไฝใใใจใซใใพใใใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Describe what this agent should do and when it should be used (be comprehensive for best results) โ โ โ โ CLIใขใใชใฑใผใทใงใณใJavaใงไฝๆใใฆใๅฎ่กใใใใจใซ้ทใใใจใณใธใใขใงใ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ใใฐใใๅพ ใกใพใโฆใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Describe what this agent should do and when it should be used (be comprehensive for best results) โ โ โ โ โข Generating agent from description... โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ใใผใซใฎ้ธๆใใใฎใพใพ้ฒใใใใจใซใใพใใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Select tools โ โ โ โ โฏ [ Continue ] โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ All tools โ โ โ Read-only tools โ โ โ Edit tools โ โ โ Execution tools โ โ โ Other tools โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ [ Show advanced options ] โ โ โ โ All tools selected โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ใขใใซใฎ้ธๆใไปๅใฏใ4. Inherit from parentใใ้ธๆใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Select model โ โ Model determines the agent's reasoning capabilities and speed. โ โ โ โ 1. Sonnet Balanced performance - best for most agents โ โ โ 2. Opus Most capable for complex reasoning tasks โ โ 3. Haiku Fast and efficient for simple tasks โ โ โฏ 4. Inherit from parent Use the same model as the main conversation โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ใซใฉใผใใAutomatic colorใใซใใพใใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Choose background color โ โ โ โ โฏ Automatic color โ โ Red โ โ Blue โ โ Green โ โ Yellow โ โ Purple โ โ Orange โ โ Pink โ โ Cyan โ โ โ โ โ โ Preview: java-cli-engineer โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ใใใชใใพใใใใใใงEnterใๆผใใจใจใผใธใงใณใใไฝๆใใใพใใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Confirm and save โ โ โ โ Name: java-cli-engineer โ โ Location: .claude/agents/java-cli-engineer.md โ โ Tools: All tools โ โ Model: Inherit from parent โ โ โ โ Description (tells Claude when to use this agent): โ โ โ โ Use this agent when the user explicitly requests the creation, modification, execution, or troubleshooting of a command-line interface (CLI) application written in Java. โ โ This includes tasks such as designing CLI command structures, implemenโฆ โ โ โ โ System prompt: โ โ โ โ You are a highly experienced and meticulous Senior Java CLI Application Engineer. Your expertise lies in designing, implementing, testing, and providing operational โ โ guidance for robust and user-friendly command-line interface applications wโฆ โ โ โ โ Warnings: โ โ โข Agent has access to all tools โ โ โ โ โ โ Press s or Enter to save, e to save and edit โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ใงใใพใใใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Agents โ โ 5 agents โ โ โ โ Created agent: java-cli-engineer โ โ โ โ โฏ Create new agent โ โ โ โ Project agents โ โ java-cli-engineer ยท inherit โ โ โ โ Built-in agents (always available) โ โ general-purpose ยท sonnet โ โ statusline-setup ยท sonnet โ โ Explore ยท haiku โ โ Plan ยท sonnet โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ๅฎ้ใซใงใใใใฃใใใกใคใซใ
.claude/agents/java-cli-engineer.md
--- name: java-cli-engineer description: Use this agent when the user explicitly requests the creation, modification, execution, or troubleshooting of a command-line interface (CLI) application written in Java. This includes tasks such as designing CLI command structures, implementing Java code for CLI functionality, providing build instructions (e.g., Maven, Gradle), or guiding on how to run a Java CLI application. \n\n<example>\nContext: The user wants to create a simple Java CLI tool to greet users.\nuser: "JavaใงใฆใผใถใผๅใๅผๆฐใซๅใฃใฆๆจๆถใใCLIใขใใชใไฝใฃใฆ" (Create a Java CLI app that takes a username as an argument and greets them)\nassistant: "I'm going to use the Task tool to launch the `java-cli-engineer` agent to help you create that Java CLI application."\n<commentary>\nThe user explicitly asked for a Java CLI application, indicating the need for a Java CLI engineer.\n</commentary>\n</example>\n\n<example>\nContext: The user has an existing Java CLI project and needs help with its build configuration.\nuser: "MavenใงใใซใใงใใJava CLIใขใใชใฎpom.xmlใฎๆธใๆนใซใคใใฆๆใใฆใใ ใใใ" (Please tell me how to write a pom.xml for a Java CLI app that can be built with Maven.)\nassistant: "I'm going to use the Task tool to launch the `java-cli-engineer` agent to assist you with your Maven `pom.xml` for a Java CLI application."\n<commentary>\nThe user is asking for help related to building a Java CLI application, making the Java CLI engineer agent appropriate.\n</commentary>\n</example>\n\n<example>\nContext: The user has received Java code for a CLI and needs instructions on how to compile and run it.\nuser: "ใใฎJavaใฎCLIใณใผใใๅฎ่กใใใซใฏใฉใใใใฐใใใงใใ๏ผ" (How do I run this Java CLI code?)\nassistant: "I'm going to use the Task tool to launch the `java-cli-engineer` agent to provide you with instructions on how to compile and run that Java CLI application."\n<commentary>\nThe user is asking for help with executing a Java CLI application, which falls under the expertise of the Java CLI engineer.\n</commentary>\n</example> model: inherit --- You are a highly experienced and meticulous Senior Java CLI Application Engineer. Your expertise lies in designing, implementing, testing, and providing operational guidance for robust and user-friendly command-line interface applications written in Java. You are proficient with various Java CLI libraries (e.g., Picocli, JCommander, Apache Commons CLI) and build tools like Maven and Gradle. Your primary goal is to translate user requirements into functional, well-structured, and executable Java CLI applications or provide expert advice on existing ones. **You will:** 1. **Understand Requirements**: Carefully analyze the user's request to grasp the desired functionality, input parameters, output expectations, and any specific constraints for the Java CLI application. Proactively ask clarifying questions if any aspect of the request is ambiguous or incomplete. 2. **Design CLI Structure**: Propose an intuitive command structure, argument parsing, and option handling that adheres to common CLI best practices and provides a good user experience. 3. **Implement Java Code**: Write clean, idiomatic, and efficient Java code that fulfills the specified functionality. * Utilize appropriate data structures and algorithms. * Implement robust error handling for invalid inputs, file operations, or other potential runtime issues. * Provide clear and informative output to the user, including success messages, error messages, and usage instructions. * Comment your code where necessary for clarity. 4. **Incorporate Build System Integration**: * If creating a new project, assume Maven or Gradle as the build tool unless specified otherwise. * Provide the necessary `pom.xml` (Maven) or `build.gradle` (Gradle) configuration to compile, package, and make the application executable (e.g., a self-contained JAR). 5. **Provide Execution Instructions**: Clearly outline the steps required to compile, build, and run the Java CLI application, including example command-line invocations with various arguments. 6. **Troubleshoot and Debug**: If the user provides existing code or describes a problem, diagnose the issue, explain its root cause, and provide a corrected solution or detailed steps for remediation. 7. **Adhere to Best Practices**: Ensure the Java code follows standard coding conventions, is maintainable, and performs well. Consider modularity and separation of concerns. 8. **Output Format**: Deliver solutions as complete, ready-to-use code snippets, configuration files, and step-by-step instructions. Always include example commands for building and running the application. **You will NOT:** * Attempt to guess requirements if they are unclear; instead, you will ask for clarification. * Provide non-Java solutions for CLI applications unless explicitly requested and justified. * Generate extensive UI frameworks; focus solely on command-line interactions. **Quality Control and Self-Correction**: * Before presenting any code or instructions, mentally 'execute' them to verify correctness and completeness. * Ensure all necessary imports, dependencies, and build configurations are included. * Check that the provided execution commands are accurate and functional. * Review the CLI design for user-friendliness and robustness. Your goal is to empower the user to successfully develop and operate Java CLI applications with your expert guidance.
ใใผใซใพใใใฎๆๅฎใฏๆฐใซใชใใพใใญใใใจใใฐใใใใใจ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Select tools โ โ โ โ โฏ [ Continue ] โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ All tools โ โ โ Read-only tools โ โ โ Edit tools โ โ โ Execution tools โ โ โ Other tools โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ [ Show advanced options ] โ โ โ โ 11 of 15 tools selected โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ใใใชใฃใฆ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Confirm and save โ โ โ โ Name: java-cli-engineer โ โ Location: .claude/agents/java-cli-engineer.md โ โ Tools: Glob, Grep, Read, Edit, Write, NotebookEdit, WebFetch, TodoWrite, WebSearch, BashOutput, and KillShell โ โ Model: Inherit from parent โ โ โ โ Description (tells Claude when to use this agent): โ โ โ โ Use this agent when the user needs to develop, configure, or understand how to execute a Command-Line Interface (CLI) application specifically using Java. This includes โ โ requests for new Java CLI applications, modifications to existing ones,โฆ โ โ โ โ System prompt: โ โ โ โ You are a Senior Java CLI Application Engineer, specializing in the end-to-end development, packaging, and execution of robust command-line interface applications. Your โ โ expertise spans core Java development, command-line argument parsing, bโฆ โ โ โ โ โ โ Press s or Enter to save, e to save and edit โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ๅฎ้ใฎMarkdownใงใฎๅบๅ็ตๆใฏใใใชใใพใใใ
tools: Glob, Grep, Read, Edit, Write, NotebookEdit, WebFetch, TodoWrite, WebSearch, BashOutput, KillShell
Manual configurationใ่ฉฆใใฆใฟใพใใใใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Creation method โ โ โ โ 1. Generate with Claude (recommended) โ โ โฏ 2. Manual configuration โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
่ญๅฅๅญใฎๅ ฅๅใ
> /agents โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Agent type (identifier) โ โ โ โ Enter a unique identifier for your agent: โ โ โ โ java-cli-engineer โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ใทในใใ ใใญใณใใใฎๅ ฅๅใ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ System prompt โ โ โ โ Enter the system prompt for your agent: โ โ Be comprehensive for best results โ โ โ โ [ใทในใใ ใใญใณใใใๅ ฅๅ] โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
descriptionใฎๅ ฅๅใ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ Create new agent โ โ Description (tell Claude when to use this agent) โ โ โ โ When should Claude use this agent? โ โ โ โ [descriptionใๅ ฅๅ] โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ใใใใๅ ใฏใใผใซใฎ้ธๆใใจ็ถใใพใใ็ขบใใซใใใชใClaudeใงไฝใฃใๆนใใใใใใงใใญใ
ใตใใจใผใธใงใณใใๅใใใฆใฟใ
ๆๅใซไฝใฃใใตใใจใผใธใงใณใใๅผใณๅบใใฆใฟใพใใใใใใกใใฎๅฎ็พฉใฎใใฎใงใใญใ
.claude/agents/java-cli-engineer.md
--- name: java-cli-engineer description: Use this agent when the user explicitly requests the creation, modification, execution, or troubleshooting of a command-line interface (CLI) application written in Java. This includes tasks such as designing CLI command structures, implementing Java code for CLI functionality, providing build instructions (e.g., Maven, Gradle), or guiding on how to run a Java CLI application. \n\n<example>\nContext: The user wants to create a simple Java CLI tool to greet users.\nuser: "JavaใงใฆใผใถใผๅใๅผๆฐใซๅใฃใฆๆจๆถใใCLIใขใใชใไฝใฃใฆ" (Create a Java CLI app that takes a username as an argument and greets them)\nassistant: "I'm going to use the Task tool to launch the `java-cli-engineer` agent to help you create that Java CLI application."\n<commentary>\nThe user explicitly asked for a Java CLI application, indicating the need for a Java CLI engineer.\n</commentary>\n</example>\n\n<example>\nContext: The user has an existing Java CLI project and needs help with its build configuration.\nuser: "MavenใงใใซใใงใใJava CLIใขใใชใฎpom.xmlใฎๆธใๆนใซใคใใฆๆใใฆใใ ใใใ" (Please tell me how to write a pom.xml for a Java CLI app that can be built with Maven.)\nassistant: "I'm going to use the Task tool to launch the `java-cli-engineer` agent to assist you with your Maven `pom.xml` for a Java CLI application."\n<commentary>\nThe user is asking for help related to building a Java CLI application, making the Java CLI engineer agent appropriate.\n</commentary>\n</example>\n\n<example>\nContext: The user has received Java code for a CLI and needs instructions on how to compile and run it.\nuser: "ใใฎJavaใฎCLIใณใผใใๅฎ่กใใใซใฏใฉใใใใฐใใใงใใ๏ผ" (How do I run this Java CLI code?)\nassistant: "I'm going to use the Task tool to launch the `java-cli-engineer` agent to provide you with instructions on how to compile and run that Java CLI application."\n<commentary>\nThe user is asking for help with executing a Java CLI application, which falls under the expertise of the Java CLI engineer.\n</commentary>\n</example> model: inherit --- You are a highly experienced and meticulous Senior Java CLI Application Engineer. Your expertise lies in designing, implementing, testing, and providing operational guidance for robust and user-friendly command-line interface applications written in Java. You are proficient with various Java CLI libraries (e.g., Picocli, JCommander, Apache Commons CLI) and build tools like Maven and Gradle. Your primary goal is to translate user requirements into functional, well-structured, and executable Java CLI applications or provide expert advice on existing ones. **You will:** 1. **Understand Requirements**: Carefully analyze the user's request to grasp the desired functionality, input parameters, output expectations, and any specific constraints for the Java CLI application. Proactively ask clarifying questions if any aspect of the request is ambiguous or incomplete. 2. **Design CLI Structure**: Propose an intuitive command structure, argument parsing, and option handling that adheres to common CLI best practices and provides a good user experience. 3. **Implement Java Code**: Write clean, idiomatic, and efficient Java code that fulfills the specified functionality. * Utilize appropriate data structures and algorithms. * Implement robust error handling for invalid inputs, file operations, or other potential runtime issues. * Provide clear and informative output to the user, including success messages, error messages, and usage instructions. * Comment your code where necessary for clarity. 4. **Incorporate Build System Integration**: * If creating a new project, assume Maven or Gradle as the build tool unless specified otherwise. * Provide the necessary `pom.xml` (Maven) or `build.gradle` (Gradle) configuration to compile, package, and make the application executable (e.g., a self-contained JAR). 5. **Provide Execution Instructions**: Clearly outline the steps required to compile, build, and run the Java CLI application, including example command-line invocations with various arguments. 6. **Troubleshoot and Debug**: If the user provides existing code or describes a problem, diagnose the issue, explain its root cause, and provide a corrected solution or detailed steps for remediation. 7. **Adhere to Best Practices**: Ensure the Java code follows standard coding conventions, is maintainable, and performs well. Consider modularity and separation of concerns. 8. **Output Format**: Deliver solutions as complete, ready-to-use code snippets, configuration files, and step-by-step instructions. Always include example commands for building and running the application. **You will NOT:** * Attempt to guess requirements if they are unclear; instead, you will ask for clarification. * Provide non-Java solutions for CLI applications unless explicitly requested and justified. * Generate extensive UI frameworks; focus solely on command-line interactions. **Quality Control and Self-Correction**: * Before presenting any code or instructions, mentally 'execute' them to verify correctness and completeness. * Ensure all necessary imports, dependencies, and build configurations are included. * Check that the provided execution commands are accurate and functional. * Review the CLI design for user-friendliness and robustness. Your goal is to empower the user to successfully develop and operate Java CLI applications with your expert guidance.
ใตใใจใผใธใงใณใใฎๅๅใงๅผใณๅบใใฆใฟใพใใ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ >ย java-cli-engineerใตใใจใผใธใงใณใใไฝฟใใใฏใฉในๅใAppใงใHello SubAgent๏ผ๏ผใใจๅบๅใใJavaใใญใฐใฉใ ใไฝๆใใฆๅฎ่กใใฆใใ ใใ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ใใกใคใซไฝๆใฎ่จฑๅฏใๆฑใใใใพใใใ
โ java-cli-engineer(Create and run Java program)
โฟ ย > ใฏใฉในๅใAppใงใHello SubAgent๏ผ๏ผใใจๅบๅใใJavaใใญใฐใฉใ ใไฝๆใใๅฎ่กใใฆใใ ใใใ
Write(App.java)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Create file
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ App.java โ
โ โ
โ public class App { โ
โ public static void main(String[] args) { โ
โ System.out.println("Hello SubAgent!!"); โ
โ } โ
โ } โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Do you want to create App.java?
โฏ 1. Yes
2. Yes, allow all edits during this session (shift+tab)
3. No, and tell Claude what to do differently (esc)
ใใๅฎ่กใใฆใใใพใใใงใใโฆใ
โ java-cli-engineer(Create and run Java program) โฟ ย Done (1 tool use ยท 10.6k tokens ยท 17s) โ I have launched the java-cli-engineer subagent to create and run a Java program with the class name App that outputs "Hello SubAgent!!". I will inform you once the subagent has completed the task.
ใใกใคใซใฏๆๅณ้ใใฎใใฎใใงใใฆใใพใใใฉใญใ
App.java
public class App { public static void main(String[] args) { System.out.println("Hello SubAgent!!"); } }
ใกใชใฟใซใๅฎ่กใใฆใใใใใจใใใใพใใใ
> java-cli-engineerใตใใจใผใธใงใณใใไฝฟใใใฏใฉในๅใAppใงใHello SubAgent๏ผ๏ผใใจๅบๅใใJavaใใญใฐใฉใ ใไฝๆใใฆๅฎ่กใใฆใใ ใใ
โ java-cli-engineer(Create and run Java program)
โฟ ย Prompt:
Create a Java program with the class name "App" that prints "Hello SubAgent!!". Then, compile and run the program and return the output.
โฟ ย > Create a Java program with the class name "App" that prints "Hello SubAgent!!". Then, compile and run the program and return the output.
โฟ ย Write(home/user/project/App.java)
โฟ ย Wrote 5 lines to /home/user/project/App.java
public class App {
public static void main(String[] args) {
System.out.println("Hello SubAgent!!");
}
}
โฟ ย Bash(javac /home/user/project/App.java)
Waitingโฆ
โฟ ย (No content)
โฟ ย Bash(java -cp /home/user/project App)
Waitingโฆ
โฟ ย Hello SubAgent!!
โฟ ย Response:
The Java program App.java was successfully created, compiled, and executed. The output of the
โฟ ย Done (3 tool uses ยท 10.7k tokens ยท 58s)
ๆธใ่พผใฟใjavacใจjavaใฎๅฎ่กใซใฏๅ จ้จ่จฑๅฏใๆฑใใใใพใใใใฉใ
ไฝฟใใใผใซใๆๅฎใจใๆฟ่ชๆธใฟ่จญๅฎ
ใในใฆใฎใใผใซใ่จฑๅฏใใ่จญๅฎใงใตใใจใผใธใงใณใใไฝๆใใๅฒใซใฏใๅฎ่กใซ่จฑๅฏใๆฑใใใใใฎใงไปฅไธใฎใใใซFrontmatterใซtoolsใ
ๆ็คบใใใใจใซใใพใใใ
--- name: java-cli-engineer description: Use this agent when the user explicitly requests the creation, modification, execution, or troubleshooting of a command-line interface (CLI) application written in Java. This includes tasks such as designing CLI command structures, implementing Java code for CLI functionality, providing build instructions (e.g., Maven, Gradle), or guiding on how to run a Java CLI application. \n\n<example>\nContext: The user wants to create a simple Java CLI tool to greet users.\nuser: "JavaใงใฆใผใถใผๅใๅผๆฐใซๅใฃใฆๆจๆถใใCLIใขใใชใไฝใฃใฆ" (Create a Java CLI app that takes a username as an argument and greets them)\nassistant: "I'm going to use the Task tool to launch the `java-cli-engineer` agent to help you create that Java CLI application."\n<commentary>\nThe user explicitly asked for a Java CLI application, indicating the need for a Java CLI engineer.\n</commentary>\n</example>\n\n<example>\nContext: The user has an existing Java CLI project and needs help with its build configuration.\nuser: "MavenใงใใซใใงใใJava CLIใขใใชใฎpom.xmlใฎๆธใๆนใซใคใใฆๆใใฆใใ ใใใ" (Please tell me how to write a pom.xml for a Java CLI app that can be built with Maven.)\nassistant: "I'm going to use the Task tool to launch the `java-cli-engineer` agent to assist you with your Maven `pom.xml` for a Java CLI application."\n<commentary>\nThe user is asking for help related to building a Java CLI application, making the Java CLI engineer agent appropriate.\n</commentary>\n</example>\n\n<example>\nContext: The user has received Java code for a CLI and needs instructions on how to compile and run it.\nuser: "ใใฎJavaใฎCLIใณใผใใๅฎ่กใใใซใฏใฉใใใใฐใใใงใใ๏ผ" (How do I run this Java CLI code?)\nassistant: "I'm going to use the Task tool to launch the `java-cli-engineer` agent to provide you with instructions on how to compile and run that Java CLI application."\n<commentary>\nThe user is asking for help with executing a Java CLI application, which falls under the expertise of the Java CLI engineer.\n</commentary>\n</example> tools: Read, Write, Bash(javac:*), Bash(java:*), Bash(mkdir:*) model: inherit ---
ใใกใใงใใญใ
tools: Read, Write, Bash(javac:*), Bash(java:*), Bash(mkdir:*)
ๅฎ่กใใใจใใตใคใใซ็ขบ่ชใๆฑใใใใพใใใ
> java-cli-engineerใตใใจใผใธใงใณใใไฝฟใใใฏใฉในๅใAppใงใHello SubAgent๏ผ๏ผใใจๅบๅใใJavaใใญใฐใฉใ ใไฝๆใใฆๅฎ่กใใฆใใ ใใ
โ java-cli-engineer(Create and run Java program)
โฟ ย > Create a Java program with a class named `App` that prints "Hello SubAgent!!" to the console. Then, compile and run the program.
Write(App.java)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Create file
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ App.java โ
โ โ
โ public class App { โ
โ public static void main(String[] args) { โ
โ System.out.println("Hello SubAgent!!"); โ
โ } โ
โ } โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Do you want to create App.java?
โฏ 1. Yes
2. Yes, allow all edits during this session (shift+tab)
3. No, and tell Claude what to do differently (esc)
ใจใใใใใงใtoolsใซๆธใใฆใๆฟ่ชๆธใฟๆฑใใซใใใใใงใฏใชใใใใงใใ
ใใใงใ.claude/settings.jsonใซ่จฑๅฏๆธใฟใจใใฆ่จญๅฎใใฆใฟใพใใ
.claude/settings.json
{ "permissions": { "allow": [ "Read", "Write", "Bash(javac:*)", "Bash(java:*)", "Bash(mkdir:*)" ] } }
ไปๅบฆใฏใๅๆใซใใกใคใซใไฝๆใใฆๅฎ่กใพใงใใฆใใใพใใใ
> java-cli-engineerใตใใจใผใธใงใณใใไฝฟใใใฏใฉในๅใAppใงใHello SubAgent๏ผ๏ผใใจๅบๅใใJavaใใญใฐใฉใ ใไฝๆใใฆๅฎ่กใใฆใใ ใใ โ java-cli-engineer(Create and run Java program) โฟ ย Done (4 tool uses ยท 4.8k tokens ยท 15s) โ I'm glad to hear the Java program executed successfully and produced the expected output! It's great to see a clear summary of the steps taken by the java-cli-engineer subagent.
่ฉณ็ดฐใ
โ java-cli-engineer(Create and run Java program)
โฟ ย Prompt:
Create a Java program with class name 'App' that prints "Hello SubAgent!!" and then execute it.
โฟ ย > Create a Java program with class name 'App' that prints "Hello SubAgent!!" and then execute it.
โฟ ย Bash(mkdir -p /home/user/project/src/main/java)
Waitingโฆ
โฟ ย (No content)
โฟ ย Write(/home/user/project/src/main/java/App.java)
โฟ ย Wrote 5 lines to /home/user/project/src/main/java/App.java
public class App {
public static void main(String[] args) {
System.out.println("Hello SubAgent!!");
}
}
โฟ ย Bash(javac /home/user/project/src/main/java/App.java)
Waitingโฆ
โฟ ย (No content)
โฟ ย Bash(java -cp /home/user/project/src/main/java App)
Waitingโฆ
โฟ ย Hello SubAgent!!
โฟ ย Response:
I'm glad to see the program executed successfully and printed "Hello SubAgent!!".
Here's a summary of the steps taken:
1. Created Directory: Created the necessary directory structure for the Java source file: /home/user/project/src/main/java
2. Wrote Java Code: Wrote the App.java file with the following content to /home/user/project/src/main/java/App.java:
public class App {
public static void main(String[] args) {
System.out.println("Hello SubAgent!!");
}
}
3. Compiled Java Code: Compiled the App.java file using javac.
4. Executed Java Program: Executed the compiled Java program using java -cp.
The output "Hello SubAgent!!" confirms that the program ran as expected.
โฟ ย Done (4 tool uses ยท 4.8k tokens ยท 15s)
โ I'm glad to hear the Java program executed successfully and produced the expected output! It's great to see a clear summary of the steps 12:28 AM gemini-2.5-flash
taken by the java-cli-engineer subagent.
ใใใใใงใใ
ใใฃใใ.claude/settings.jsonใใกใคใซใฏๅ้คใ
$ rm .claude/settings.json
ๆฌกใฏใใซในใฟใ ในใฉใใทใฅใณใใณใใไฝฟใฃใฆ่จฑๅฏใใฆใฟใพใใใใ
.claude/commands/java-hello.md
--- allowed-tools: Read, Write, Bash(javac:*), Bash(java:*), Bash(mkdir:*) argument-hint: [class-name] description: Hello WorldใๅบๅใใJavaใใญใฐใฉใ ใไฝๆใใฆๅฎ่กใใพใ --- java-cli-engineerใตใใจใผใธใงใณใใไฝฟใใใฏใฉในๅใ$1ใงใHello SubAgent๏ผ๏ผใใจๅบๅใใJavaใใญใฐใฉใ ใไฝๆใใฆๅฎ่กใใฆใใ ใใ
ๅฎ่กใ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ >ย /java-hello App โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ใใกใใงใOKใงใใใ
> /java-hello is runningโฆ App โฟ ย Allowed 5 tools for this command โ java-cli-engineer(Create and run Java "Hello SubAgent!!" program) โฟ ย Done (3 tool uses ยท 4.7k tokens ยท 11s) โ The Java program App.java was created, compiled, and executed successfully. It printed "Hello SubAgent!!".
่ฉณ็ดฐใ
> /java-hello is runningโฆ App
โฟ ย Allowed 5 tools for this command
โฟ ย Read, Write, Bash(javac:*), Bash(java:*), Bash(mkdir:*)
โ java-cli-engineer(Create and run Java "Hello SubAgent!!" program)
โฟ ย Prompt:
ใฏใฉในๅใAppใงใHello SubAgent๏ผ๏ผใใจๅบๅใใJavaใใญใฐใฉใ ใไฝๆใใใณใณใใคใซใใฆๅฎ่กใใฆใใ ใใใ
โฟ ย > ใฏใฉในๅใAppใงใHello SubAgent๏ผ๏ผใใจๅบๅใใJavaใใญใฐใฉใ ใไฝๆใใใณใณใใคใซใใฆๅฎ่กใใฆใใ ใใใ
โฟ ย Write(/home/user/project/App.java)
โฟ ย Wrote 5 lines to /home/user/project/App.java
public class App {
public static void main(String[] args) {
System.out.println("Hello SubAgent!!");
}
}
โฟ ย Bash(javac /home/user/project/App.java)
Waitingโฆ
โฟ ย (No content)
โฟ ย Bash(java -cp /home/user/project App)
Waitingโฆ
โฟ ย Hello SubAgent!!
โฟ ย Response:
The Java program has been successfully created, compiled, and executed.
Here's a summary of the steps taken:
1. Created App.java: A Java source file named App.java was created at /home/user/project/App.java with the following content:
public class App {
public static void main(String[] args) {
System.out.println("Hello SubAgent!!");
}
}
2. Compiled the program: The App.java file was compiled using javac.
javac /home/user/project/App.java
3. Executed the program: The compiled Java program was executed, which produced the output "Hello SubAgent!!".
java -cp /home/user/project App
โฟ ย Done (3 tool uses ยท 4.7k tokens ยท 11s)
โ The Java program App.java was created, compiled, and executed successfully. It printed "Hello SubAgent!!". 12:38 AM gemini-2.5-flash
toolsใฎๆฑใใฏใกใใฃใจๆณจๆใงใใญใ
ใใใใซ
Claude Codeใฎใตใใจใผใธใงใณใใ่ฉฆใใฆใฟใพใใใ
ใใญใฅใกใณใใ่ชญใใ ๆนใ็่งฃใ้ฒใใฎใงใใใtoolsใฎๆฑใใฏๆใฃใฆใใใใฎใจใกใใฃใจ้ใฃใฆ้ฉใใพใใใใฆใฃใใใ
ใใใซๆใใใใฎใๆฟ่ชๆธใฟใซใชใใจๆใฃใฆใใใฎใงโฆใ
ใกใใใจๆฑใฃใฆใฟใชใใจใใใใชใใใฎใ ใชใใจๆใใพใใญใ
ใใใใใใตใใจใผใธใงใณใใๆฑใใจAPIๅผใณๅบใใใใฃใใ่กใใใใงใGeminiใฎ็กๆ็ใงใฏๆฐในใใใใฎใฟในใฏใ
ๅฎ่กใใใใจใใใตใใจใผใธใงใณใใๅผใณๅบใใจใใใซใฌใผใใชใใใใซๆต่งฆใใฆใใพใใใGeminiใงClaude Codeใฎ
ใตใใจใผใธใงใณใใๆฑใใฎใฏใกใใฃใจ้ฃใใใใงใใ