updated prompt

This commit is contained in:
Shayan Rais
2025-11-03 19:49:38 +05:00
parent 8a1112a00c
commit a693becffc
3 changed files with 29 additions and 39 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
# Claude Code local settings
.claude/settings.local.json
settings.local.json
# Hooks
.claude/hooks/config/hooks-config.local.json
.claude/hooks/logs/
hooks/config/hooks-config.local.json
hooks/logs/hooks-logs.jsonl
+13 -33
View File
@@ -5,42 +5,22 @@
create a claude agent and command. the agent will first use tool to call weather api to fetch karachi weather in degree centigrade and then read instructions from @input/input.md to transform the result and update the @output/output.md
# Invocation difference between agents and commands
I have claude agents @.claude/agents folder and claude commands @.claude/commands folder. I want to invoke agents and commands differently. For example, I want to invoke agents with @agent_name and commands with @command_name. How can I achieve this?
see the table in @PROMPTS.md of Agent Invocation and Command Invocation and cross verify, also add missing invocation cases if I have missed any
## Claude Answer
### Agent Invocation
For Commands (Slash Commands)
Commands in .claude/commands/ are invoked using the slash prefix:
/command-name
For your update-readme command:
/update-readme
For Agents (Sub-agents)
Agents in .claude/agents/ are invoked using the Task tool within commands or directly:
#### Using Task tool in your code/commands
Task(subagent_type="readme-writer", prompt="Generate README content")
Or by mentioning them in your instructions to Claude Code.
| What | How | Example |
| From | How | Example |
|----------------------|------------------------|-------------------------------------|
| Commands | /command-name | /update-readme |
| Agents (in commands) | Task tool | Task(subagent_type="readme-writer") |
| Claude CLI | Prompt | use weather transformer agent to transform 50 degree |
| /commands/Commands.md| Task tool | Task(subagent_type="weather-transformer") |
| Another subagent | Task tool | Task(subagent_type="weather-fetcher") |
### Command Invocation
# based on @prompts/README.md claude answer, what I understand is commands must be invoked by using / on claude and it cannot be invoked like "claude use
| From | How | Example |
|----------------------|------------------------|-------------------------------------|
| Claude CLI | Prompt | use the weather command to fetch the weather |
| Claude CLI | /command-name | /weather |
| /agents/Agents.md | SlashCommand tool | SlashCommand(command="/weather Karachi") |
| Another /command | SlashCommand tool | SlashCommand(command="/weather Karachi") |
- Commands are invoked using the slash prefix syntax: /command-name
- Example: /update-readme
However:
You can also invoke commands in natural language by asking Claude Code to use them. For example:
- "use the weather command to fetch the weather"
- "Run the weather slash command"
+13 -3
View File
@@ -1,3 +1,13 @@
Original Temperature: 26°C
Transformation Applied: add +10 in the result
Final Result: 36°C
# Weather Transformation Results
**Original Temperature:** 50°C
**Transformation Applied:** Add +10 to the result
**Final Result:** 60°C
## Calculation Details
- Starting value: 50°C
- Operation: +10
- Result: 50 + 10 = 60°C