fix example agents (#438)
This commit is contained in:
@@ -68,11 +68,11 @@ When a user describes what they want an agent to do, you will:
|
|||||||
assistant: "Now let me use the test-runner agent to run the tests"
|
assistant: "Now let me use the test-runner agent to run the tests"
|
||||||
</example>
|
</example>
|
||||||
- <example>
|
- <example>
|
||||||
Context: User is creating an agent to respond to the word "hello" with a friendly jok.
|
Context: User is creating an agent for Claude Code product questions.
|
||||||
user: "Hello"
|
user: "How do I configure Claude Code hooks?"
|
||||||
assistant: "I'm going to use the ${AGENT_TOOL_NAME} tool to launch the greeting-responder agent to respond with a friendly joke"
|
assistant: "I'm going to use the ${AGENT_TOOL_NAME} tool to launch the claude-code-guide agent to answer the question"
|
||||||
<commentary>
|
<commentary>
|
||||||
Since the user is greeting, use the greeting-responder agent to respond with a friendly joke.
|
Since the user is asking how to use Claude Code, use the claude-code-guide agent.
|
||||||
</commentary>
|
</commentary>
|
||||||
</example>
|
</example>
|
||||||
- If the user mentioned or implied that the agent should be used proactively, you should include examples of this.
|
- If the user mentioned or implied that the agent should be used proactively, you should include examples of this.
|
||||||
|
|||||||
@@ -156,34 +156,24 @@ ${AGENT_TOOL_NAME}({
|
|||||||
const currentExamples = `Example usage:
|
const currentExamples = `Example usage:
|
||||||
|
|
||||||
<example_agent_descriptions>
|
<example_agent_descriptions>
|
||||||
"test-runner": use this agent after you are done writing code to run tests
|
"claude-code-guide": use this agent when the user asks how Claude Code works or how to use its features
|
||||||
"greeting-responder": use this agent to respond to user greetings with a friendly joke
|
"statusline-setup": use this agent to configure the user's Claude Code status line setting
|
||||||
</example_agent_descriptions>
|
</example_agent_descriptions>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
user: "Please write a function that checks if a number is prime"
|
user: "How do I configure Claude Code hooks?"
|
||||||
assistant: I'm going to use the ${FILE_WRITE_TOOL_NAME} tool to write the following code:
|
|
||||||
<code>
|
|
||||||
function isPrime(n) {
|
|
||||||
if (n <= 1) return false
|
|
||||||
for (let i = 2; i * i <= n; i++) {
|
|
||||||
if (n % i === 0) return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
</code>
|
|
||||||
<commentary>
|
<commentary>
|
||||||
Since a significant piece of code was written and the task was completed, now use the test-runner agent to run the tests
|
This is a Claude Code usage question, so use the claude-code-guide agent
|
||||||
</commentary>
|
</commentary>
|
||||||
assistant: Uses the ${AGENT_TOOL_NAME} tool to launch the test-runner agent
|
assistant: Uses the ${AGENT_TOOL_NAME} tool to launch the claude-code-guide agent
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
user: "Hello"
|
user: "Set up my Claude Code status line"
|
||||||
<commentary>
|
<commentary>
|
||||||
Since the user is greeting, use the greeting-responder agent to respond with a friendly joke
|
This matches the statusline-setup agent, so use it to configure the setting
|
||||||
</commentary>
|
</commentary>
|
||||||
assistant: "I'm going to use the ${AGENT_TOOL_NAME} tool to launch the greeting-responder agent"
|
assistant: "I'm going to use the ${AGENT_TOOL_NAME} tool to launch the statusline-setup agent"
|
||||||
</example>
|
</example>
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user