[weather orchestration workflow] added
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="93" height="20" role="img" aria-label="Best Practice">
|
||||
<title>Best Practice</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="r">
|
||||
<rect width="93" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="93" height="20" fill="#e3342f"/>
|
||||
<rect width="93" height="20" fill="url(#s)"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="11">
|
||||
<text x="46.5" y="14">Best Practice</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 719 B |
@@ -0,0 +1,32 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="172" height="40" role="img" aria-label="Implemented">
|
||||
<title>Implemented</title>
|
||||
<style>
|
||||
@keyframes shimmer {
|
||||
0% { transform: translateX(-172px); }
|
||||
100% { transform: translateX(172px); }
|
||||
}
|
||||
.shine { animation: shimmer 2.5s ease-in-out infinite; }
|
||||
</style>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="shimmer" x1="0" y1="0" x2="1" y2="0">
|
||||
<stop offset="0" stop-color="#fff" stop-opacity="0"/>
|
||||
<stop offset="0.4" stop-color="#fff" stop-opacity="0"/>
|
||||
<stop offset="0.5" stop-color="#fff" stop-opacity=".3"/>
|
||||
<stop offset="0.6" stop-color="#fff" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#fff" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<clipPath id="r">
|
||||
<rect width="172" height="40" rx="5" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="172" height="40" fill="#2ea44f"/>
|
||||
<rect width="172" height="40" fill="url(#s)"/>
|
||||
<rect class="shine" width="172" height="40" fill="url(#shimmer)"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="18">
|
||||
<text x="86" y="26">Implemented</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,17 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="86" height="20" role="img" aria-label="Implemented">
|
||||
<title>Implemented</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="r">
|
||||
<rect width="86" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="86" height="20" fill="#2ea44f"/>
|
||||
<rect width="86" height="20" fill="url(#s)"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="11">
|
||||
<text x="43" y="14">Implemented</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 711 B |
@@ -0,0 +1,32 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="276" height="40" role="img" aria-label="Orchestration Workflow">
|
||||
<title>Orchestration Workflow</title>
|
||||
<style>
|
||||
@keyframes shimmer {
|
||||
0% { transform: translateX(-276px); }
|
||||
100% { transform: translateX(276px); }
|
||||
}
|
||||
.shine { animation: shimmer 2.5s ease-in-out infinite; }
|
||||
</style>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="shimmer" x1="0" y1="0" x2="1" y2="0">
|
||||
<stop offset="0" stop-color="#fff" stop-opacity="0"/>
|
||||
<stop offset="0.4" stop-color="#fff" stop-opacity="0"/>
|
||||
<stop offset="0.5" stop-color="#fff" stop-opacity=".3"/>
|
||||
<stop offset="0.6" stop-color="#fff" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#fff" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<clipPath id="r">
|
||||
<rect width="276" height="40" rx="5" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="276" height="40" fill="#e67e22"/>
|
||||
<rect width="276" height="40" fill="url(#s)"/>
|
||||
<rect class="shine" width="276" height="40" fill="url(#shimmer)"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="18">
|
||||
<text x="138" y="26">Orchestration Workflow</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,17 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="138" height="20" role="img" aria-label="Orchestration Workflow">
|
||||
<title>Orchestration Workflow</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="r">
|
||||
<rect width="138" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="138" height="20" fill="#e67e22"/>
|
||||
<rect width="138" height="20" fill="url(#s)"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="11">
|
||||
<text x="69" y="14">Orchestration Workflow</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 748 B |
@@ -1,9 +1,10 @@
|
||||
# claude-code-best-practice
|
||||
practice makes claude perfect
|
||||
|
||||
 <a href="https://github.com/shanraisshan/claude-code-best-practice/stargazers"><img src="https://img.shields.io/github/stars/shanraisshan/claude-code-best-practice?style=social" alt="GitHub Stars"></a><br>
|
||||
[](https://github.com/shanraisshan/claude-code-best-practice#my-experience) *Click on this badge to show the latest best practice*<br>
|
||||
[](https://github.com/shanraisshan/claude-code-best-practice/tree/main/.claude/hooks) *Click on this badge to show implementation in this repo*
|
||||
 <a href="https://github.com/shanraisshan/claude-code-best-practice/stargazers"><img src="https://img.shields.io/github/stars/shanraisshan/claude-code-best-practice?style=social" alt="GitHub Stars"></a><br>
|
||||
[](https://github.com/shanraisshan/claude-code-best-practice#my-experience) *Click on this badge to show the latest best practice*<br>
|
||||
[](https://github.com/shanraisshan/claude-code-best-practice/tree/main/.claude/hooks) *Click on this badge to show implementation in this repo*<br>
|
||||
[](https://github.com/shanraisshan/claude-code-best-practice#orchestration-workflow) *Click on this badge to see the Command → Agent → Skills orchestration workflow*
|
||||
|
||||
<p align="center">
|
||||
<img src="!/claude-jumping.svg" alt="Claude Code mascot jumping" width="120" height="100">
|
||||
@@ -23,7 +24,7 @@ practice makes claude perfect
|
||||
|---------|----------|-------------|
|
||||
| [**Skills**](https://code.claude.com/docs/en/skills) | `.claude/skills/<name>/SKILL.md` | Reusable knowledge, workflows, and slash commands — load on-demand or invoke with `/skill-name` |
|
||||
| [**Commands**](https://code.claude.com/docs/en/skills) | `.claude/commands/<name>.md` | Entry-point prompts for workflows — invoke with `/command-name` |
|
||||
| [**Sub-Agents**](https://code.claude.com/docs/en/sub-agents) | `.claude/agents/<name>.md` | [](best-practice/claude-subagents.md) Custom agents with their own name, color, tools, permissions, and model — usable as main agent or isolated subagents via the Task tool |
|
||||
| [**Sub-Agents**](https://code.claude.com/docs/en/sub-agents) | `.claude/agents/<name>.md` | [](best-practice/claude-subagents.md) [](implementation/claude-subagents-implementation.md) Custom agents with their own name, color, tools, permissions, and model — usable as main agent or isolated subagents via the Task tool |
|
||||
| [**Memory**](https://code.claude.com/docs/en/memory) | `CLAUDE.md` | Persistent context via CLAUDE.md files and `@path` imports that Claude sees every session |
|
||||
| [**Rules**](https://code.claude.com/docs/en/memory#modular-rules-with-clauderules) | `.claude/rules/*.md` | Modular topic-specific instructions with optional path-scoping via frontmatter |
|
||||
| [**Hooks**](https://code.claude.com/docs/en/hooks) | `.claude/hooks/` | Deterministic scripts that run outside the agentic loop on specific events |
|
||||
@@ -108,7 +109,11 @@ practice makes claude perfect
|
||||
- [Claude Code Tasks - inspired by beats](https://www.reddit.com/r/ClaudeAI/comments/1qkjznp/anthropic_replaced_claude_codes_old_todos_with/) [Inspiration](https://github.com/steveyegge/beads)
|
||||
- [Ralph Plugin](https://x.com/GeoffreyHuntley/status/2015031262692753449)
|
||||
|
||||
## COMMAND + SKILL + SUBAGENT ARCHITECTURE
|
||||
<a id="orchestration-workflow"></a>
|
||||
|
||||
## <img src="!/tags/orchestration-workflow-hd.svg" alt="Orchestration Workflow">
|
||||
|
||||
Multi-step workflows using the **Command → Agent → Skills** architecture pattern.
|
||||
|
||||
<p align="center">
|
||||
<img src="!/command-skill-agent-flow.svg" alt="Command Skill Agent Architecture Flow" width="600">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Claude Code: Subagents Reference
|
||||
# Sub-agents Best Practice
|
||||
|
||||

|
||||
<br>
|
||||
[](../implementation/claude-subagents-implementation.md)
|
||||
|
||||
Complete reference for Claude Code subagents — built-in agent types, custom agent definitions, and frontmatter fields.
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# Sub-agents Implementation
|
||||
|
||||

|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td><a href="../">← Back to Claude Code Best Practice</a></td>
|
||||
<td align="right"><img src="../!/claude-jumping.svg" alt="Claude" width="60" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
---
|
||||
|
||||
<a href="#weather-agent"><img src="../!/tags/implemented-hd.svg" alt="Implemented"></a>
|
||||
|
||||
The weather agent is implemented in this repo as an example of the **Command → Agent → Skills** architecture pattern.
|
||||
|
||||
---
|
||||
|
||||
## Weather Agent
|
||||
|
||||
**File**: [`.claude/agents/weather.md`](../.claude/agents/weather.md)
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: weather
|
||||
description: Use this agent PROACTIVELY when you need to fetch and transform
|
||||
weather data for Karachi, Pakistan. This agent fetches real-time temperature
|
||||
from wttr.in API and applies transformation rules from
|
||||
weather-orchestration/input.md, writing results to
|
||||
weather-orchestration/output.md.
|
||||
tools: WebFetch, Read, Write
|
||||
model: sonnet
|
||||
color: green
|
||||
memory: project
|
||||
skills:
|
||||
- weather-fetcher
|
||||
- weather-transformer
|
||||
---
|
||||
|
||||
# Weather Agent
|
||||
|
||||
You are a specialized weather agent that fetches and transforms weather data
|
||||
for Karachi, Pakistan.
|
||||
|
||||
## Your Task
|
||||
|
||||
Execute the weather workflow by following the instructions from your preloaded
|
||||
skills sequentially:
|
||||
|
||||
1. **First**: Follow the `weather-fetcher` skill instructions to fetch the
|
||||
current temperature
|
||||
2. **Then**: Follow the `weather-transformer` skill instructions to apply
|
||||
transformations and write results
|
||||
3. **Finally**: Update your agent memory with the reading details for
|
||||
historical tracking
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
The agent has two skills preloaded (`weather-fetcher` and `weather-transformer`) that provide step-by-step instructions for fetching from the wttr.in API and applying transformation rules.
|
||||
|
||||
---
|
||||
|
||||
## How to Use
|
||||
|
||||
```bash
|
||||
$ claude
|
||||
> What is the weather in Karachi?
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
<a href="https://github.com/shanraisshan/claude-code-best-practice#orchestration-workflow"><img src="../!/tags/orchestration-workflow-hd.svg" alt="Orchestration Workflow"></a>
|
||||
|
||||
The weather agent is the **Agent** in the Command → Agent → Skills orchestration pattern. It receives the workflow from the `/weather-orchestrator` command and executes it using two preloaded skills (`weather-fetcher`, `weather-transformer`) within a single execution context.
|
||||
|
||||
<p align="center">
|
||||
<img src="../!/command-skill-agent-flow.svg" alt="Command Skill Agent Architecture Flow" width="600">
|
||||
</p>
|
||||
|
||||
| Component | Role | This Repo |
|
||||
|-----------|------|-----------|
|
||||
| **Command** | Entry point, user interaction | `/weather-orchestrator` |
|
||||
| **Agent** | Orchestrates workflow with preloaded skills | `weather` agent |
|
||||
| **Skills** | Domain knowledge injected at startup | `weather-fetcher`, `weather-transformer` |
|
||||
|
||||
Reference in New Issue
Block a user