hello-world-agent — Claude Code subagent: greeting and tech news
hello-world-agent — a Claude Code subagent that greets the user and asks what they need. It triggers on "hi claude", "hi cc", or "hi claude code".
no license ★ 3,990 updated 2026-03-04
.claude/agents/hello-world-agent.mdWhat hello-world-agent does
The subagent replies to the primary agent that talks to the user. Its response has three parts: a greeting, a question about the task, and one random fact from today's tech news.
It uses the WebSearch tool to pull the news item. The output format is fixed: the primary agent gets a ready-made message with the greeting, the question, and the fact.
This is a teaching example from the claude-code-hooks-mastery repository. It shows the smallest possible subagent: one tool and one response template.
What it helps with
- greet the user when a session starts
- ask what the user needs
- add a random tech news fact
- demonstrate a minimal subagent structure
Example prompts for the agent
- Type "hi claude" to get a greeting and a question about your task.
- Send "hi cc" for a greeting with a news fact.
- Use "hi claude code" to trigger the greeting scenario.
How to install hello-world-agent
Manually: put the files in place
.claude/agents/hello-world-agent.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/hello-world-agent.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/hello-world-agent.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about hello-world-agent
How do I install hello-world-agent in Claude Code?
Drop the file into .claude/agents/hello-world-agent.md.
What does hello-world-agent do?
It greets the user, asks what they need, and shares a random tech news fact. The fact comes from WebSearch.
When does the subagent run?
When the user types "hi claude", "hi cc", or "hi claude code".