From a693becffc91dc2cfc511e1ed1f7ee4c2c7549af Mon Sep 17 00:00:00 2001 From: Shayan Rais Date: Mon, 3 Nov 2025 19:49:38 +0500 Subject: [PATCH] updated prompt --- .claude/.gitignore | 6 +++--- docs/PROMPTS.md | 46 +++++++++++++--------------------------------- output/output.md | 16 +++++++++++++--- 3 files changed, 29 insertions(+), 39 deletions(-) diff --git a/.claude/.gitignore b/.claude/.gitignore index cadb9ac..b9172c4 100644 --- a/.claude/.gitignore +++ b/.claude/.gitignore @@ -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 diff --git a/docs/PROMPTS.md b/docs/PROMPTS.md index e39b22a..32d50e4 100644 --- a/docs/PROMPTS.md +++ b/docs/PROMPTS.md @@ -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" \ No newline at end of file diff --git a/output/output.md b/output/output.md index 6afa0b3..e1117b5 100644 --- a/output/output.md +++ b/output/output.md @@ -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