diff --git a/!/video-presentation-transcript/1-video-workflow.html b/!/video-presentation-transcript/1-video-workflow.html index 21cb1ae..4867d20 100644 --- a/!/video-presentation-transcript/1-video-workflow.html +++ b/!/video-presentation-transcript/1-video-workflow.html @@ -332,7 +332,7 @@
# .claude/agents/weather-agent.md --- name: weather-agent -description: Fetches weather data using wttr.in API +description: Fetches weather data using Open-Meteo tools: Bash, WebFetch model: haiku skills: diff --git a/.claude/agent-memory/weather-agent/MEMORY.md b/.claude/agent-memory/weather-agent/MEMORY.md index 5f6b72e..8739687 100644 --- a/.claude/agent-memory/weather-agent/MEMORY.md +++ b/.claude/agent-memory/weather-agent/MEMORY.md @@ -13,3 +13,4 @@ |------|-------------|------| | 2026-03-06 | 22.3 | Celsius | | 2026-03-06 | 22.5 | Celsius | +| 2026-03-07 | 25.7 | Celsius | diff --git a/.claude/agents/weather-agent.md b/.claude/agents/weather-agent.md index 01c5857..175dfe2 100644 --- a/.claude/agents/weather-agent.md +++ b/.claude/agents/weather-agent.md @@ -1,6 +1,6 @@ --- name: weather-agent -description: Use this agent PROACTIVELY when you need to fetch weather data for Dubai, UAE. This agent fetches real-time temperature from wttr.in API using its preloaded weather-fetcher skill. +description: Use this agent PROACTIVELY when you need to fetch weather data for Dubai, UAE. This agent fetches real-time temperature from Open-Meteo using its preloaded weather-fetcher skill. tools: WebFetch, Read, Write, Edit model: sonnet color: green @@ -49,7 +49,7 @@ Execute the weather workflow by following the instructions from your preloaded s ### Step 1: Fetch Temperature (weather-fetcher skill) Follow the weather-fetcher skill instructions to: -- Fetch current temperature from wttr.in API for Dubai +- Fetch current temperature from Open-Meteo for Dubai - Extract the temperature value in the requested unit (Celsius or Fahrenheit) - Return the numeric value and unit diff --git a/.claude/commands/weather-orchestrator.md b/.claude/commands/weather-orchestrator.md index 8920a2e..2edb20b 100644 --- a/.claude/commands/weather-orchestrator.md +++ b/.claude/commands/weather-orchestrator.md @@ -5,7 +5,7 @@ model: haiku # Weather Orchestrator Command -Fetch the current temperature for Dubai, Pakistan and create a visual SVG weather card. +Fetch the current temperature for Dubai, UAE and create a visual SVG weather card. ## Workflow @@ -18,7 +18,7 @@ Use the AskUserQuestion tool to ask the user whether they want the temperature i Use the Task tool to invoke the weather agent: - subagent_type: weather-agent - description: Fetch Dubai weather data -- prompt: Fetch the current temperature for Dubai, Pakistan in [unit requested by user]. Return the numeric temperature value and unit. The agent has a preloaded skill (weather-fetcher) that provides the detailed instructions. +- prompt: Fetch the current temperature for Dubai, UAE in [unit requested by user]. Return the numeric temperature value and unit. The agent has a preloaded skill (weather-fetcher) that provides the detailed instructions. - model: haiku Wait for the agent to complete and capture the returned temperature value and unit. diff --git a/.claude/commands/workflows/best-practice/workflow-claude-subagents.md b/.claude/commands/workflows/best-practice/workflow-claude-subagents.md index f93a73b..87ad3d2 100644 --- a/.claude/commands/workflows/best-practice/workflow-claude-subagents.md +++ b/.claude/commands/workflows/best-practice/workflow-claude-subagents.md @@ -15,7 +15,7 @@ This is a **read-then-report** workflow. Launch agents, merge results, and produ ## Phase 0: Launch Both Agents in Parallel -**Immediately** spawn both agents using the Task tool **in the same message** (parallel launch): +**Immediately** spawn both agents using the Agent tool **in the same message** (parallel launch): ### Agent 1: workflow-claude-subagents-agent @@ -39,7 +39,7 @@ Spawn using `subagent_type: "claude-code-guide"`. Give it this prompt: > 2. Any new agent frontmatter fields introduced in recent Claude Code versions > 3. Changes to existing field behavior (e.g. new model aliases, new permission modes, new tool syntax) > 4. Changes to agent memory scopes or memory behavior -> 5. Changes to agent invocation patterns (Task tool syntax, --agents CLI flag) +> 5. Changes to agent invocation patterns (Agent tool syntax, --agents CLI flag) > 6. New agent features (isolation, background, hooks, mcpServers, skills preloading) > 7. Changes to agent scope/priority resolution order > 8. Any deprecations or removals of agent frontmatter fields @@ -97,7 +97,7 @@ Produce a structured report with these sections: 2. **Changed Field Behavior** — Fields whose type, description, or behavior has changed 3. **Deprecated/Removed Fields** — Fields in report but no longer in official docs 4. **Memory Scope Changes** — Updates to memory scope storage, behavior, or new scopes -5. **Invocation Pattern Changes** — Updates to Task tool syntax, CLI flags, or invocation methods +5. **Invocation Pattern Changes** — Updates to Agent tool syntax, CLI flags, or invocation methods 6. **Scope & Priority Changes** — Updates to resolution order or new scope locations 7. **Example Accuracy** — Whether minimal and full-featured examples reflect current field set 8. **Field Type/Description Accuracy** — Per-field verification against official docs @@ -115,7 +115,7 @@ Priority Actions: 3 | Deprecated Field | Remove from table | RECURRING (first seen: 2026-02-20) 4 | Memory Scope | Update memory scope table | NEW 5 | Example Update | Update full-featured example | NEW -6 | Invocation Change | Update Task tool syntax | NEW +6 | Invocation Change | Update Agent tool syntax | NEW 7 | Scope/Priority | Update resolution order table | NEW ``` @@ -172,7 +172,7 @@ Update the "Last Updated" badge at the top of `best-practice/claude-subagents.md Scan `best-practice/claude-subagents.md` for every hyperlink (both markdown `[text](url)` and inline URLs). For each link: -1. **Local file links** (relative paths like `../.claude/agents/weather-agent.md`, `../claude-agent-memory.md`): Verify the file exists at the resolved path using the Read tool. Flag any broken links. +1. **Local file links** (relative paths like `../.claude/agents/weather-agent.md`, `../reports/claude-agent-memory.md`): Verify the file exists at the resolved path using the Read tool. Flag any broken links. 2. **External URLs** (e.g., `https://code.claude.com/docs/en/sub-agents`): Fetch each URL using WebFetch and verify it returns a valid page (not a 404 or redirect to an error page). Flag any dead or moved links. 3. **Anchor links** (e.g., `#section-name`): Verify the target heading exists within the same file. @@ -183,7 +183,7 @@ Hyperlink Validation Log: # | Type | Link | Status | Notes 1 | Local | ../.claude/agents/weather-agent.md | OK | 2 | External | https://code.claude.com/docs/en/sub-agents | OK | -3 | Local | ../claude-agent-memory.md | BROKEN | File not found +3 | Local | ../reports/claude-agent-memory.md | OK | ... ``` diff --git a/.claude/settings.json b/.claude/settings.json index 0d4dbdc..f614b56 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -12,15 +12,12 @@ "mcp__chrome-devtools__*", "mcp__claude-in-chrome__*", "mcp__playwright__*", - "mcp__reddit-mcp-server__get_post_details", - "mcp__reddit-mcp-server__search_reddit", "mcp__tavily-web-search__tavily_search", "mcp__tavily-web-search__tavily_extract", "WebFetch(domain:api.open-meteo.com)", "WebFetch(domain:raw.githubusercontent.com)", "WebFetch(domain:docs.anthropic.com)", - "WebFetch(domain:support.claude.com)", - "WebFetch(domain:wttr.in)" + "WebFetch(domain:support.claude.com)" ], "deny": [], "ask": [ @@ -67,7 +64,7 @@ "outputStyle": "Explanatory", "statusLine": { "type": "command", - "command": "echo 'shayan's best practice status line'", + "command": "echo \"shayan's best practice status line\"", "padding": 0 }, "attribution": { diff --git a/.mcp.json b/.mcp.json index 3b20d11..a6fccf1 100644 --- a/.mcp.json +++ b/.mcp.json @@ -4,13 +4,9 @@ "command": "npx", "args": ["-y", "@playwright/mcp"] }, - "reddit-mcp-server": { - "type": "http", - "url": "http://144.91.76.33:8080/mcp" - }, "tavily-web-search": { "type": "http", - "url": "https://mcp.tavily.com/mcp/?tavilyApiKey=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" + "url": "https://mcp.tavily.com/mcp/?tavilyApiKey=${TAVILY_API_KEY}" }, "context7": { "command": "npx", diff --git a/CLAUDE.md b/CLAUDE.md index d42a1f3..44c5e46 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,7 +12,7 @@ This is a best practices repository for Claude Code configuration, demonstrating A demonstration of two distinct skill patterns via the **Command → Agent → Skill** architecture: - `/weather-orchestrator` command (`.claude/commands/weather-orchestrator.md`): Entry point — asks user for C/F, invokes agent, then invokes SVG skill - `weather-agent` agent (`.claude/agents/weather-agent.md`): Fetches temperature using its preloaded `weather-fetcher` skill (agent skill pattern) -- `weather-fetcher` skill (`.claude/skills/weather-fetcher/SKILL.md`): Preloaded into agent — instructions for fetching temperature from wttr.in API +- `weather-fetcher` skill (`.claude/skills/weather-fetcher/SKILL.md`): Preloaded into agent — instructions for fetching temperature from Open-Meteo - `weather-svg-creator` skill (`.claude/skills/weather-svg-creator/SKILL.md`): Skill — creates SVG weather card, writes `orchestration-workflow/weather.svg` and `orchestration-workflow/output.md` Two skill patterns: agent skills (preloaded via `skills:` field) vs skills (invoked via `Skill` tool). See `orchestration-workflow/orchestration-workflow.md` for the complete flow diagram. @@ -47,9 +47,9 @@ Special handling: git commits trigger `pretooluse-git-committing` sound. ## Critical Patterns ### Subagent Orchestration -Subagents **cannot** invoke other subagents via bash commands. Use the Task tool: +Subagents **cannot** invoke other subagents via bash commands. Use the Agent tool (renamed from Task in v2.1.63; `Task(...)` still works as an alias): ``` -Task(subagent_type="agent-name", description="...", prompt="...", model="haiku") +Agent(subagent_type="agent-name", description="...", prompt="...", model="haiku") ``` Be explicit about tool usage in subagent definitions. Avoid vague terms like "launch" that could be misinterpreted as bash commands. @@ -58,23 +58,26 @@ Be explicit about tool usage in subagent definitions. Avoid vague terms like "la Subagents in `.claude/agents/*.md` use YAML frontmatter: - `name`: Subagent identifier - `description`: When to invoke (use "PROACTIVELY" for auto-invocation) -- `tools`: Comma-separated allowlist of tools (inherits all if omitted). Supports `Task(agent_type)` syntax +- `tools`: Comma-separated allowlist of tools (inherits all if omitted). Supports `Agent(agent_type)` syntax - `disallowedTools`: Tools to deny, removed from inherited or specified list - `model`: Model alias: `haiku`, `sonnet`, `opus`, or `inherit` (default: `inherit`) - `permissionMode`: Permission mode (e.g., `"acceptEdits"`, `"plan"`, `"bypassPermissions"`) - `maxTurns`: Maximum agentic turns before the subagent stops - `skills`: List of skill names to preload into agent context - `mcpServers`: MCP servers for this subagent (server names or inline configs) -- `hooks`: Lifecycle hooks scoped to this subagent (`PreToolUse`, `PostToolUse`, `Stop`) +- `hooks`: Lifecycle hooks scoped to this subagent (all hook events are supported; `PreToolUse`, `PostToolUse`, and `Stop` are the most common) - `memory`: Persistent memory scope — `user`, `project`, or `local` (see `reports/claude-agent-memory.md`) - `background`: Set to `true` to always run as a background task - `isolation`: Set to `"worktree"` to run in a temporary git worktree - `color`: CLI output color for visual distinction ### Configuration Hierarchy -1. `.claude/settings.local.json`: Personal settings (git-ignored) -2. `.claude/settings.json`: Team-shared settings -3. `hooks-config.local.json` overrides `hooks-config.json` +1. **Managed** (`managed-settings.json` / MDM plist / Registry): Organization-enforced, cannot be overridden +2. Command line arguments: Single-session overrides +3. `.claude/settings.local.json`: Personal project settings (git-ignored) +4. `.claude/settings.json`: Team-shared settings +5. `~/.claude/settings.json`: Global personal defaults +6. `hooks-config.local.json` overrides `hooks-config.json` ### Disable Hooks Set `"disableAllHooks": true` in `.claude/settings.local.json`, or disable individual hooks in `hooks-config.json`. @@ -101,6 +104,6 @@ From experience with this repository: ## Documentation See `.claude/rules/markdown-docs.md` for documentation standards. Key docs: -- `docs/AGENTS.md`: Subagent orchestration troubleshooting -- `docs/COMPARISION.md`: Commands vs Agents vs Skills invocation patterns +- `best-practice/claude-subagents.md`: Subagent frontmatter, hooks, and repository agents +- `best-practice/claude-commands.md`: Slash command patterns and built-in command reference - `orchestration-workflow/orchestration-workflow.md`: Weather system flow diagram diff --git a/README.md b/README.md index 411882b..416b124 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # claude-code-best-practice practice makes claude perfect -![Last Updated](https://img.shields.io/badge/Last_Updated-Mar_07%2C_2026_08%3A21_AM_PKT-white?style=flat&labelColor=555) GitHub Stars +![Last Updated](https://img.shields.io/badge/Last_Updated-Mar_07%2C_2026_8%3A40_AM_PKT-white?style=flat&labelColor=555) GitHub Stars [![Best Practice](!/tags/best-practice.svg)](best-practice/) *Click on this badge to show the latest best practice*
[![Implemented](!/tags/implemented.svg)](implementation/) *Click on this badge to show implementation in this repo*
@@ -21,10 +21,11 @@ practice makes claude perfect | Feature | Location | Description | |---------|----------|-------------| -| [**Commands**](https://code.claude.com/docs/en/skills) | `.claude/commands/.md` | [![Best Practice](!/tags/best-practice.svg)](best-practice/claude-commands.md) [![Implemented](!/tags/implemented.svg)](implementation/claude-commands-implementation.md) Entry-point prompts for workflows — invoke with `/command-name` | +| [**Commands**](https://code.claude.com/docs/en/slash-commands) | `.claude/commands/.md` | [![Best Practice](!/tags/best-practice.svg)](best-practice/claude-commands.md) [![Implemented](!/tags/implemented.svg)](implementation/claude-commands-implementation.md) Entry-point prompts for workflows — invoke with `/command-name` | | [**Sub-Agents**](https://code.claude.com/docs/en/sub-agents) | `.claude/agents/.md` | [![Best Practice](!/tags/best-practice.svg)](best-practice/claude-subagents.md) [![Implemented](!/tags/implemented.svg)](implementation/claude-subagents-implementation.md) Custom agents with their own name, color, tools, permissions, and model | | [**Skills**](https://code.claude.com/docs/en/skills) | `.claude/skills//SKILL.md` | [![Best Practice](!/tags/best-practice.svg)](best-practice/claude-skills.md) [![Implemented](!/tags/implemented.svg)](implementation/claude-skills-implementation.md) Reusable knowledge, workflows, and slash commands — load on-demand or invoke with `/skill-name` | | [**Workflows**](https://code.claude.com/docs/en/common-workflows) | [`.claude/commands/weather-orchestrator.md`](.claude/commands/weather-orchestrator.md) | [![Orchestration Workflow](!/tags/orchestration-workflow.svg)](orchestration-workflow/orchestration-workflow.md) | +| [**Scheduled Tasks**](https://code.claude.com/docs/en/scheduled-tasks) | `/loop`, cron tools | Run prompts on a recurring schedule (up to 3 days), set one-time reminders, poll deployments and builds | | [**Hooks**](https://code.claude.com/docs/en/hooks) | `.claude/hooks/` | [![Best Practice](!/tags/best-practice.svg)](https://github.com/shanraisshan/claude-code-voice-hooks) [![Implemented](!/tags/implemented.svg)](https://github.com/shanraisshan/claude-code-voice-hooks) Deterministic scripts that run outside the agentic loop on specific events | | [**MCP Servers**](https://code.claude.com/docs/en/mcp) | `.claude/settings.json`, `.mcp.json` | [![Best Practice](!/tags/best-practice.svg)](best-practice/claude-mcp.md) [![Implemented](!/tags/implemented.svg)](.mcp.json) Model Context Protocol connections to external tools, databases, and APIs | | [**Plugins**](https://code.claude.com/docs/en/plugins) | distributable packages | Bundles of skills, subagents, hooks, and MCP servers · [Marketplaces](https://code.claude.com/docs/en/discover-plugins) | @@ -40,10 +41,11 @@ practice makes claude perfect | Feature | Location | Description | |---------|----------|-------------| -| [**Agent Teams**](https://code.claude.com/docs/en/agent-teams) | `.claude/agents/.md` | Multiple agents working in parallel on the same codebase with shared task coordination | +| [**Agent Teams**](https://code.claude.com/docs/en/agent-teams) | built-in (env var) | Multiple agents working in parallel on the same codebase with shared task coordination | | [**Voice Mode**](https://x.com/trq212/status/2028628570692890800) | built-in command | speak to prompt - /voice to activate| | [**Remote Control**](https://code.claude.com/docs/en/remote-control) | built-in command | Continue local sessions from any device — phone, tablet, or browser · [Headless Mode](https://code.claude.com/docs/en/headless) | | [**Git Worktrees**](https://code.claude.com/docs/en/common-workflows) | built-in | [![Best Practice](!/tags/best-practice.svg)](https://x.com/bcherny/status/2025007393290272904) Isolated git branches for parallel development — each agent gets its own working copy | +| [**Scheduled Tasks**](https://code.claude.com/docs/en/scheduled-tasks) | `/loop`, cron tools | [![Best Practice](!/tags/best-practice.svg)](https://x.com/bcherny/status/2030193932404150413) Run prompts on a recurring schedule (up to 3 days), set one-time reminders, poll deployments and builds | | [**Ralph Wiggum Loop**](https://github.com/anthropics/claude-code/tree/main/plugins/ralph-wiggum) | plugin | [![Best Practice](!/tags/best-practice.svg)](https://github.com/ghuntley/how-to-ralph-wiggum) [![Implemented](!/tags/implemented.svg)](https://github.com/shanraisshan/novel-llm-26) Autonomous development loop for long-running tasks — iterates until completion | @@ -104,22 +106,23 @@ claude - [CLAUDE.md](https://code.claude.com/docs/en/memory) should target under [200 lines](https://code.claude.com/docs/en/memory#write-effective-instructions) per file. [60 lines in humanlayer](https://www.humanlayer.dev/blog/writing-a-good-claude-md) ([still not 100% guaranteed](https://www.reddit.com/r/ClaudeCode/comments/1qn9pb9/claudemd_says_must_use_agent_claude_ignores_it_80/)). - use [multiple CLAUDE.md](best-practice/claude-memory.md) for monorepos — ancestor + descendant loading - use [.claude/rules/](https://code.claude.com/docs/en/memory#organize-rules-with-clauderules) to split large instructions -- use [commands](https://code.claude.com/docs/en/skills) for your workflows instead of [sub-agents](https://code.claude.com/docs/en/sub-agents) +- use [commands](https://code.claude.com/docs/en/slash-commands) for your workflows instead of [sub-agents](https://code.claude.com/docs/en/sub-agents) - have feature specific [sub-agents](https://code.claude.com/docs/en/sub-agents) (extra context) with [skills](https://code.claude.com/docs/en/skills) (progressive disclosure) instead of general qa, backend engineer. - [memory.md](https://code.claude.com/docs/en/memory), constitution.md does not guarantee anything -- avoid agent dumb zone, do manual [/compact](https://code.claude.com/docs/en/context-management) at max 50%. Use [/clear](https://code.claude.com/docs/en/cli-reference) to reset context mid-session if switching to a new task +- avoid agent dumb zone, do manual [/compact](https://code.claude.com/docs/en/interactive-mode) at max 50%. Use [/clear](https://code.claude.com/docs/en/cli-reference) to reset context mid-session if switching to a new task - vanilla cc is better than any workflows with smaller tasks - use [skills in subfolders](reports/claude-skills-for-larger-mono-repos.md) for monorepos -- use [/model](https://code.claude.com/docs/en/model-configuration) to select model and reasoning, [/context](https://code.claude.com/docs/en/context-management) to see context usage, [/usage](https://code.claude.com/docs/en/usage-billing) to set a weekly limit, [/config](https://code.claude.com/docs/en/settings) to configure settings -- always use [thinking mode](https://code.claude.com/docs/en/model-configuration) true (to see reasoning) and [Output Style](https://code.claude.com/docs/en/output-styles) Explanatory (to see detailed output with ★ Insight boxes) in [/config](https://code.claude.com/docs/en/settings) for better understanding of Claude's decisions +- use [/model](https://code.claude.com/docs/en/model-config) to select model and reasoning, [/context](https://code.claude.com/docs/en/interactive-mode) to see context usage, [/usage](https://code.claude.com/docs/en/costs) to check plan limits, [/extra-usage](https://code.claude.com/docs/en/interactive-mode) to configure overflow billing, [/config](https://code.claude.com/docs/en/settings) to configure settings +- always use [thinking mode](https://code.claude.com/docs/en/model-config) true (to see reasoning) and [Output Style](https://code.claude.com/docs/en/output-styles) Explanatory (to see detailed output with ★ Insight boxes) in [/config](https://code.claude.com/docs/en/settings) for better understanding of Claude's decisions - use ultrathink keyword in prompts for [high effort reasoning](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#tips-and-best-practices) - [/rename](https://code.claude.com/docs/en/cli-reference) important sessions (e.g. [TODO - refactor task]) and [/resume](https://code.claude.com/docs/en/cli-reference) them later - use [Esc Esc or /rewind](https://code.claude.com/docs/en/checkpointing) to undo when Claude goes off-track instead of trying to fix it in the same context - commit often — try to commit at least once per hour, as soon as task is completed, commit. -■ **Workflows Advanced (5)** +■ **Workflows Advanced (6)** - use ASCII diagrams a lot to understand your architecture - [agent teams with tmux](https://code.claude.com/docs/en/agent-teams) and [git worktrees](https://x.com/bcherny/status/2025007393290272904) for parallel development +- use [/loop](https://code.claude.com/docs/en/scheduled-tasks) for recurring monitoring — poll deployments, babysit PRs, check builds (runs up to 3 days) - use [Ralph Wiggum plugin](https://github.com/shanraisshan/novel-llm-26) for long-running autonomous tasks - [/permissions](https://code.claude.com/docs/en/permissions) with wildcard syntax (Bash(npm run *), Edit(/docs/**)) instead of dangerously-skip-permissions - [/sandbox](https://code.claude.com/docs/en/sandboxing) to reduce permission prompts with file and network isolation @@ -129,7 +132,7 @@ claude - use mcp ([Claude in Chrome](https://code.claude.com/docs/en/chrome), [Playwright](https://github.com/microsoft/playwright-mcp), [Chrome DevTools](https://developer.chrome.com/blog/chrome-devtools-mcp)) to let claude see chrome console logs on its own - always ask claude to run the terminal (you want to see logs of) as a background task for better debugging - [/doctor](https://code.claude.com/docs/en/cli-reference) to diagnose installation, authentication, and configuration issues -- error during compaction can be resolved by using [/model](https://code.claude.com/docs/en/model-configuration) to select a 1M token model, then running [/compact](https://code.claude.com/docs/en/context-management) +- error during compaction can be resolved by using [/model](https://code.claude.com/docs/en/model-config) to select a 1M token model, then running [/compact](https://code.claude.com/docs/en/interactive-mode) - use a [cross-model](development-workflows/cross-model-workflow/cross-model-workflow.md) for QA — e.g. [Codex](https://github.com/shanraisshan/codex-cli-best-practice) for plan and implementation review ■ **Utilities (5)** @@ -153,6 +156,7 @@ claude - [12 ways how people are customizing their claudes | 12/Feb/26](tips/claude-boris-tips-feb-26.md) ● [Tweet](https://x.com/bcherny/status/2021699851499798911) - [Git Worktrees - 5 ways how boris is using | 21 Feb 2026](https://x.com/bcherny/status/2025007393290272904) ● [Tweet](https://x.com/bcherny/status/2025007393290272904) - [Seeing like an Agent - lessons from building Claude Code (Thariq) | 28 Feb 2026](https://x.com/trq212/status/2027463795355095314) ● [Tweet](https://x.com/trq212/status/2027463795355095314) +- [/loop — schedule recurring tasks for up to 3 days | 07 Mar 2026](https://x.com/bcherny/status/2030193932404150413) ● [Tweet](https://x.com/bcherny/status/2030193932404150413) ## ☠️ STARTUPS / BUSINESSES @@ -160,7 +164,7 @@ claude |-|-| |[**Voice Mode**](https://x.com/trq212/status/2028628570692890800)|[Wispr Flow](https://wisprflow.ai), [SuperWhisper](https://superwhisper.com/)| |[**Remote Control**](https://code.claude.com/docs/en/remote-control)|[OpenClaw](https://openclaw.ai/) -|[**Cowork**](https://code.claude.com/docs/en/cowork)|[OpenAI Operator](https://openai.com/operator), [AgentShadow](https://agentshadow.ai) +|**Cowork**|[OpenAI Operator](https://openai.com/operator), [AgentShadow](https://agentshadow.ai) |[**Tasks**](https://x.com/trq212/status/2014480496013803643)|[Beads](https://github.com/steveyegge/beads) |[**Plan Mode**](https://code.claude.com/docs/en/common-workflows)|[Agent OS](https://github.com/buildermethods/agent-os)| |[**Skills / Plugins**](https://code.claude.com/docs/en/plugins)|YC AI wrapper startups ([reddit](https://reddit.com/r/ClaudeAI/comments/1r6bh4d/claude_code_skills_are_basically_yc_ai_startup/))| diff --git a/best-practice/claude-cli-startup-flags.md b/best-practice/claude-cli-startup-flags.md index 48b8202..2ae4004 100644 --- a/best-practice/claude-cli-startup-flags.md +++ b/best-practice/claude-cli-startup-flags.md @@ -2,7 +2,7 @@ ![Last Updated](https://img.shields.io/badge/Last_Updated-Mar%2002%2C%202026-white?style=flat&labelColor=555) -Complete reference of all available command-line flags, subcommands, and environment variables when launching Claude Code from the terminal. +Reference for Claude Code startup flags, top-level subcommands, and startup environment variables when launching Claude Code from the terminal. @@ -184,15 +184,21 @@ Complete reference of all available command-line flags, subcommands, and environ ## Subcommands -These are not flags but top-level subcommands run as `claude `: +These are top-level commands run as `claude `: | Subcommand | Description | |------------|-------------| | `claude` | Start interactive REPL | | `claude "query"` | Start REPL with initial prompt | -| `claude update` | Update to latest version | -| `claude mcp` | Configure MCP servers (`add`, `remove`, `list`, `get`, `enable`) | +| `claude agents` | List configured agents | +| `claude auth` | Manage Claude Code authentication | | `claude doctor` | Run diagnostics from the command line | +| `claude install` | Install or switch Claude Code native builds | +| `claude mcp` | Configure MCP servers (`add`, `remove`, `list`, `get`, `enable`) | +| `claude plugin` | Manage Claude Code plugins | +| `claude remote-control` | Manage remote control sessions | +| `claude setup-token` | Create a long-lived token for subscription usage | +| `claude update` / `claude upgrade` | Update to the latest version | --- @@ -206,7 +212,7 @@ These startup-only environment variables are set in your shell before launching | `CLAUDE_CODE_TMPDIR` | Override temp directory for internal files | | `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` | Enable additional directory CLAUDE.md loading | | `DISABLE_AUTOUPDATER=1` | Disable auto-updates | -| `CLAUDE_CODE_EFFORT_LEVEL` | Control thinking depth: `low`, `medium`, `high` | +| `CLAUDE_CODE_EFFORT_LEVEL` | Control thinking depth — see [Settings Reference](./claude-settings.md#environment-variables-via-env) | | `USE_BUILTIN_RIPGREP=0` | Use system ripgrep instead of built-in (Alpine Linux) | | `CLAUDE_CODE_SIMPLE` | Enable simple mode (Bash + Edit tools only) | | `CLAUDE_BASH_NO_LOGIN=1` | Skip login shell for BashTool | diff --git a/best-practice/claude-commands.md b/best-practice/claude-commands.md index f1407c6..88c0913 100644 --- a/best-practice/claude-commands.md +++ b/best-practice/claude-commands.md @@ -3,7 +3,7 @@ ![Last Updated](https://img.shields.io/badge/Last_Updated-Mar_2%2C_2026-white?style=flat&labelColor=555)
[![Implemented](https://img.shields.io/badge/Implemented-2ea44f?style=flat)](../implementation/claude-commands-implementation.md) -Complete reference for Claude Code commands — command definitions, frontmatter fields, and all built-in slash commands. +Complete reference for Claude Code commands — command definitions, frontmatter fields, and current built-in slash commands.
@@ -113,47 +113,64 @@ Built-in slash commands available in Claude Code's interactive mode: | Command | Tag | Description | |---------|-----|-------------| -| `/clear` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Clear conversation history and start fresh | -| `/compact [instructions]` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Compress conversation to free context window. Optional instructions focus the compaction | -| `/exit` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Exit the REPL | -| `/fork` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Fork the current conversation into a new session | -| `/rename ` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Rename the current session for easier identification | -| `/resume [session]` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Resume a previous conversation by ID or name, or open the session picker | -| `/rewind` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Rewind conversation and/or code to an earlier point | -| `/teleport` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Resume a remote session from claude.ai (subscribers only) | -| `/context` | ![Context](https://img.shields.io/badge/Context-8E44AD?style=flat) | Visualize current context usage as a colored grid with token counts | -| `/cost` | ![Context](https://img.shields.io/badge/Context-8E44AD?style=flat) | Show token usage statistics and spending for the current session | -| `/stats` | ![Context](https://img.shields.io/badge/Context-8E44AD?style=flat) | Visualize daily usage, session history, streaks, and model preferences | -| `/usage` | ![Context](https://img.shields.io/badge/Context-8E44AD?style=flat) | Show plan usage limits and rate limit status (subscription plans only) | -| `/fast` | ![Model](https://img.shields.io/badge/Model-E67E22?style=flat) | Toggle fast mode — same Opus 4.6 model with faster output | -| `/model` | ![Model](https://img.shields.io/badge/Model-E67E22?style=flat) | Switch models (haiku, sonnet, opus) and adjust effort level | -| `/plan` | ![Model](https://img.shields.io/badge/Model-E67E22?style=flat) | Enter read-only planning mode — suggests approaches without making changes | -| `/init` | ![Project](https://img.shields.io/badge/Project-27AE60?style=flat) | Initialize a new project with CLAUDE.md guide | -| `/memory` | ![Memory](https://img.shields.io/badge/Memory-3498DB?style=flat) | View and edit CLAUDE.md memory files (user, project, and local scope) | -| `/config` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Open the interactive Settings interface with search functionality | -| `/keybindings` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Customize keyboard shortcuts per context, create chord sequences | -| `/permissions` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | View or update tool permissions | -| `/sandbox` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Configure sandboxing with dependency status | -| `/statusline` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Set up Claude Code's status line UI | -| `/terminal-setup` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Enable shift+enter for newlines in IDE terminals | -| `/theme` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Change the color theme | -| `/vim` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Enable vim-style editing mode | +| `/add-dir` | ![Project](https://img.shields.io/badge/Project-27AE60?style=flat) | Add additional working directories to the current session | | `/agents` | ![Extensions](https://img.shields.io/badge/Extensions-16A085?style=flat) | Manage custom subagents — view, create, edit, delete | -| `/hooks` | ![Extensions](https://img.shields.io/badge/Extensions-16A085?style=flat) | Interactive interface to manage hooks | -| `/ide` | ![Extensions](https://img.shields.io/badge/Extensions-16A085?style=flat) | Connect to IDE integration | -| `/mcp` | ![Extensions](https://img.shields.io/badge/Extensions-16A085?style=flat) | Manage MCP server connections — add, enable, list, get info, OAuth | -| `/plugin` | ![Extensions](https://img.shields.io/badge/Extensions-16A085?style=flat) | Manage plugins — install, uninstall, enable, disable, browse marketplaces | -| `/skills` | ![Extensions](https://img.shields.io/badge/Extensions-16A085?style=flat) | View available skills and their descriptions | -| `/debug [description]` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | Troubleshoot the current session by reading the debug log | +| `/bug [description]` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | Alias for `/feedback` | +| `/chrome` | ![Extensions](https://img.shields.io/badge/Extensions-16A085?style=flat) | Manage Claude in Chrome browser integration | +| `/clear` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Clear conversation history and start fresh | +| `/compact [prompt]` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Compress conversation to free context window. Optional prompt focuses the compaction | +| `/config` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Open the interactive settings interface with search | +| `/context` | ![Context](https://img.shields.io/badge/Context-8E44AD?style=flat) | Visualize current context usage as a colored grid with token counts | +| `/copy` | ![Export](https://img.shields.io/badge/Export-7F8C8D?style=flat) | Copy the last assistant response to the clipboard | +| `/cost` | ![Context](https://img.shields.io/badge/Context-8E44AD?style=flat) | Show token usage statistics for the current session | +| `/desktop` | ![Remote](https://img.shields.io/badge/Remote-5D6D7E?style=flat) | Connect to or manage the desktop companion app | +| `/diff` | ![Project](https://img.shields.io/badge/Project-27AE60?style=flat) | Review the current git diff in the active repo | | `/doctor` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | Check the health of your Claude Code installation | -| `/feedback` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | Generate a GitHub issue URL for reporting bugs or feedback | -| `/help` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | Show all available slash commands and usage help | -| `/tasks` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | List and manage background tasks | -| `/todos` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | List current TODO items | -| `/copy` | ![Export](https://img.shields.io/badge/Export-7F8C8D?style=flat) | Copy the last assistant response to clipboard | +| `/exit` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Exit the REPL | | `/export [filename]` | ![Export](https://img.shields.io/badge/Export-7F8C8D?style=flat) | Export the current conversation to a file or clipboard | +| `/extra-usage` | ![Context](https://img.shields.io/badge/Context-8E44AD?style=flat) | Configure pay-as-you-go overflow billing for subscription plans | +| `/fast` | ![Model](https://img.shields.io/badge/Model-E67E22?style=flat) | Toggle fast mode — same Opus 4.6 model with faster output | +| `/feedback [description]` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | Generate a GitHub issue URL for reporting bugs or feedback | +| `/fork` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Fork the current conversation into a new session | +| `/help` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | Show slash-command help | +| `/ide` | ![Extensions](https://img.shields.io/badge/Extensions-16A085?style=flat) | Connect to IDE integration | +| `/init [prompt]` | ![Project](https://img.shields.io/badge/Project-27AE60?style=flat) | Initialize a new project with a CLAUDE.md guide | +| `/install-github-app` | ![Remote](https://img.shields.io/badge/Remote-5D6D7E?style=flat) | Install the GitHub app for PR-linked workflows | +| `/install-slack-app` | ![Remote](https://img.shields.io/badge/Remote-5D6D7E?style=flat) | Install the Slack app for notifications and sharing | +| `/keybindings` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Customize keyboard shortcuts per context and create chord sequences | | `/login` | ![Auth](https://img.shields.io/badge/Auth-2980B9?style=flat) | Authenticate with Claude Code via OAuth | | `/logout` | ![Auth](https://img.shields.io/badge/Auth-2980B9?style=flat) | Log out from Claude Code | +| `/mcp` | ![Extensions](https://img.shields.io/badge/Extensions-16A085?style=flat) | Manage MCP server connections | +| `/memory` | ![Memory](https://img.shields.io/badge/Memory-3498DB?style=flat) | View and edit memory files | +| `/mobile` | ![Remote](https://img.shields.io/badge/Remote-5D6D7E?style=flat) | Connect to or manage the mobile companion app | +| `/model` | ![Model](https://img.shields.io/badge/Model-E67E22?style=flat) | Switch models (haiku, sonnet, opus) and adjust effort level | +| `/output-style` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Pick an output style preset | +| `/passes [number]` | ![Model](https://img.shields.io/badge/Model-E67E22?style=flat) | Set the number of review passes for certain workflows | +| `/permissions` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | View or update tool permissions | +| `/plan` | ![Model](https://img.shields.io/badge/Model-E67E22?style=flat) | Enter read-only planning mode — suggests approaches without making changes | +| `/pr-comments` | ![Project](https://img.shields.io/badge/Project-27AE60?style=flat) | Review or reply to pull-request comments | +| `/privacy-settings` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Manage privacy and telemetry preferences | +| `/release-notes` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | Show recent Claude Code release notes | +| `/reload-plugins` | ![Extensions](https://img.shields.io/badge/Extensions-16A085?style=flat) | Reload installed plugins without restarting | +| `/remote-control` | ![Remote](https://img.shields.io/badge/Remote-5D6D7E?style=flat) | Continue the current session from another device | +| `/remote-env` | ![Remote](https://img.shields.io/badge/Remote-5D6D7E?style=flat) | Inspect or copy the remote-control environment setup | +| `/rename ` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Rename the current session for easier identification | +| `/resume [session]` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Resume a previous conversation by ID or name, or open the session picker | +| `/review` | ![Project](https://img.shields.io/badge/Project-27AE60?style=flat) | Review the current code changes | +| `/rewind` | ![Session](https://img.shields.io/badge/Session-4A90D9?style=flat) | Rewind conversation and/or code to an earlier point | +| `/sandbox` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Configure sandboxing with dependency status | +| `/security-review` | ![Project](https://img.shields.io/badge/Project-27AE60?style=flat) | Run a focused security review on current changes | +| `/status` | ![Context](https://img.shields.io/badge/Context-8E44AD?style=flat) | Show a concise session status summary | +| `/stats` | ![Context](https://img.shields.io/badge/Context-8E44AD?style=flat) | Visualize daily usage, session history, streaks, and model preferences | +| `/statusline` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Set up Claude Code's status line UI | +| `/stickers` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Choose sticker packs shown in the UI | +| `/tasks` | ![Debug](https://img.shields.io/badge/Debug-E74C3C?style=flat) | List and manage background tasks | +| `/terminal-setup` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Enable shift+enter for newlines in IDE terminals | +| `/theme` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Change the color theme | +| `/usage` | ![Context](https://img.shields.io/badge/Context-8E44AD?style=flat) | Show plan usage limits and rate limit status (subscription plans only) | +| `/vim` | ![Config](https://img.shields.io/badge/Config-F39C12?style=flat) | Enable vim-style editing mode | + +Bundled skills such as `/debug` can also appear in the slash-command menu, but they are not built-in commands. ### Commands in This Repository @@ -162,7 +179,9 @@ Custom commands defined in `.claude/commands/` for this project: | Command | Description | Model | |---------|-------------|-------| | [`weather-orchestrator`](../.claude/commands/weather-orchestrator.md) | Fetch weather data for Dubai and create an SVG weather card | haiku | +| [`workflows/best-practice/workflow-claude-settings`](../.claude/commands/workflows/best-practice/workflow-claude-settings.md) | Track Claude Code settings report changes and find what needs updating | — | | [`workflows/best-practice/workflow-claude-subagents`](../.claude/commands/workflows/best-practice/workflow-claude-subagents.md) | Track Claude Code subagents report changes and find what needs updating | — | +| [`workflows/best-practice/workflow-concepts`](../.claude/commands/workflows/best-practice/workflow-concepts.md) | Update the README CONCEPTS section with the latest Claude Code features and concepts | — | --- diff --git a/best-practice/claude-mcp.md b/best-practice/claude-mcp.md index e05cc9c..0fccd46 100644 --- a/best-practice/claude-mcp.md +++ b/best-practice/claude-mcp.md @@ -66,6 +66,19 @@ MCP servers are configured in `.mcp.json` at the project root (project-scoped) o } ``` +Use environment variable expansion for secrets instead of committing API keys in `.mcp.json`: + +```json +{ + "mcpServers": { + "remote-api": { + "type": "http", + "url": "https://mcp.example.com/mcp?token=${MCP_API_TOKEN}" + } + } +} +``` + ### Settings for MCP Servers These settings in `.claude/settings.json` control MCP server approval: diff --git a/best-practice/claude-settings.md b/best-practice/claude-settings.md index d5ac0a0..6743d24 100644 --- a/best-practice/claude-settings.md +++ b/best-practice/claude-settings.md @@ -1,8 +1,8 @@ # Claude Code Settings Reference -![Last Updated](https://img.shields.io/badge/Last_Updated-Mar%2005%2C%202026%206%3A18%20AM%20PKT-white?style=flat&labelColor=555) ![Version](https://img.shields.io/badge/Claude_Code-v2.1.69-blue?style=flat&labelColor=555) +![Last Updated](https://img.shields.io/badge/Last_Updated-Mar%2007%2C%202026%202%3A31%20PM%20PKT-white?style=flat&labelColor=555) ![Version](https://img.shields.io/badge/Claude_Code-v2.1.71-blue?style=flat&labelColor=555) -A comprehensive guide to all available configuration options in Claude Code's `settings.json` files. As of v2.1.69, Claude Code exposes **55+ settings** and **110+ environment variables** (use the `"env"` field in `settings.json` to avoid wrapper scripts). +A comprehensive guide to all available configuration options in Claude Code's `settings.json` files. As of v2.1.71, Claude Code exposes **55+ settings** and **140+ environment variables** (use the `"env"` field in `settings.json` to avoid wrapper scripts).
@@ -65,7 +65,7 @@ Claude Code settings use a 5-level user-writable override chain plus an enforced | `skipWebFetchPreflight` | boolean | `false` | Skip WebFetch blocklist check before fetching URLs | | `availableModels` | array | - | Restrict models available to users (managed settings). Each entry has `title`, `modelId`, and optional `effortOptions` | | `fastModePerSessionOptIn` | boolean | `false` | Require users to opt in to fast mode each session | -| `teammateMode` | boolean | `false` | Enable teammate mode for multi-agent collaboration | +| `teammateMode` | string | `"auto"` | Agent team display mode: `"auto"` (split panes in tmux/iTerm2, in-process otherwise), `"in-process"`, or `"tmux"` | | `includeGitInstructions` | boolean | `true` | Include git-related instructions in system prompt | **Example:** @@ -86,7 +86,7 @@ Store plan files in a custom location relative to project root. | Key | Type | Default | Description | |-----|------|---------|-------------| -| `plansDirectory` | string | `.claude/plans/` | Directory where `/plan` outputs are stored | +| `plansDirectory` | string | `~/.claude/plans` | Directory where `/plan` outputs are stored | **Example:** ```json @@ -188,6 +188,7 @@ Control what tools and operations Claude can perform. | `permissions.additionalDirectories` | array | Extra directories Claude can access | | `permissions.defaultMode` | string | Default permission mode | | `permissions.disableBypassPermissionsMode` | string | Prevent bypass mode activation | +| `allowManagedPermissionRulesOnly` | boolean | **(Managed only)** Only managed permission rules apply; user/project `allow`, `ask`, `deny` rules are ignored | ### Permission Modes @@ -328,7 +329,7 @@ Configure bash command sandboxing for security. | `sandbox.filesystem.allowWrite` | array | `[]` | Path prefixes where write is allowed. Prefix: `//` (absolute), `~/` (home), `/` (project root), `./` (cwd) | | `sandbox.filesystem.denyWrite` | array | `[]` | Path prefixes where write is denied | | `sandbox.filesystem.denyRead` | array | `[]` | Path prefixes where read is denied | -| `sandbox.enableWeakerNetworkIsolation` | boolean | `false` | Weaker network isolation for environments with limited sandboxing | +| `sandbox.enableWeakerNetworkIsolation` | boolean | `false` | (macOS only) Allow access to system TLS trust (`com.apple.trustd.agent`); reduces security | **Example:** ```json @@ -357,7 +358,7 @@ Configure Claude Code plugins and marketplaces. | Key | Type | Scope | Description | |-----|------|-------|-------------| | `enabledPlugins` | object | Any | Enable/disable specific plugins | -| `extraKnownMarketplaces` | object | Any | Add custom plugin marketplaces | +| `extraKnownMarketplaces` | object | Project | Add custom plugin marketplaces (team sharing via `.claude/settings.json`) | | `strictKnownMarketplaces` | array | Managed only | Allowlist of permitted marketplaces | | `skippedMarketplaces` | array | Any | Marketplaces user declined to install | | `skippedPlugins` | array | Any | Plugins user declined to install | @@ -607,6 +608,36 @@ Set environment variables for all Claude Code sessions. | `CLAUDE_CODE_PROMPT_CACHING_ENABLED` | Override prompt caching behavior | | `CLAUDE_CODE_DISABLE_TOOLS` | Comma-separated list of tools to disable | | `CLAUDE_CODE_DISABLE_MCP` | Disable all MCP servers (`1` to disable) | +| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Max output tokens per response (default: 32000, max: 64000) | +| `CLAUDE_CODE_DISABLE_FAST_MODE` | Disable fast mode entirely (`1` to disable) | +| `CLAUDE_CODE_DISABLE_AUTO_MEMORY` | Disable auto memory (`1` to disable) | +| `CLAUDE_CODE_USER_EMAIL` | Provide user email synchronously for authentication | +| `CLAUDE_CODE_ORGANIZATION_UUID` | Provide organization UUID synchronously for authentication | +| `CLAUDE_CONFIG_DIR` | Custom config directory (overrides default `~/.claude`) | +| `ANTHROPIC_CUSTOM_HEADERS` | Custom headers for API requests (JSON string) | +| `ANTHROPIC_FOUNDRY_API_KEY` | API key for Microsoft Foundry authentication | +| `ANTHROPIC_FOUNDRY_BASE_URL` | Base URL for Foundry resource | +| `ANTHROPIC_FOUNDRY_RESOURCE` | Foundry resource name | +| `AWS_BEARER_TOKEN_BEDROCK` | Bedrock API key for authentication | +| `ANTHROPIC_SMALL_FAST_MODEL` | **DEPRECATED** — Use `ANTHROPIC_DEFAULT_HAIKU_MODEL` instead | +| `ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION` | AWS region for deprecated Haiku-class model override | +| `CLAUDE_CODE_SHELL_PREFIX` | Command prefix prepended to bash commands | +| `BASH_DEFAULT_TIMEOUT_MS` | Default bash command timeout in ms | +| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS auth for Bedrock (`1` to skip) | +| `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` | Skip Azure auth for Foundry (`1` to skip) | +| `CLAUDE_CODE_SKIP_VERTEX_AUTH` | Skip Google auth for Vertex (`1` to skip) | +| `CLAUDE_CODE_PROXY_RESOLVES_HOSTS` | Allow proxy to perform DNS resolution | +| `CLAUDE_CODE_API_KEY_HELPER_TTL_MS` | Credential refresh interval in ms for `apiKeyHelper` | +| `CLAUDE_CODE_CLIENT_CERT` | Client certificate path for mTLS | +| `CLAUDE_CODE_CLIENT_KEY` | Client private key path for mTLS | +| `CLAUDE_CODE_CLIENT_KEY_PASSPHRASE` | Passphrase for encrypted mTLS key | +| `CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS` | Plugin marketplace git clone timeout in ms (default: 120000) | +| `CLAUDE_CODE_HIDE_ACCOUNT_INFO` | Hide email/org info from UI | +| `CLAUDE_CODE_DISABLE_CRON` | Disable scheduled/cron tasks (`1` to disable) | +| `DISABLE_INSTALLATION_CHECKS` | Disable installation warnings | +| `DISABLE_BUG_COMMAND` | Disable the `/bug` command | +| `DISABLE_NON_ESSENTIAL_MODEL_CALLS` | Disable flavor text and non-essential model calls | +| `DISABLE_COST_WARNINGS` | Disable cost warning messages | --- diff --git a/best-practice/claude-skills.md b/best-practice/claude-skills.md index ba775de..fc20d9f 100644 --- a/best-practice/claude-skills.md +++ b/best-practice/claude-skills.md @@ -147,7 +147,7 @@ Skills defined in `.claude/skills/` for this project: | Skill | User-Invocable | Preloaded Into | Description | |-------|----------------|----------------|-------------| | [`weather-svg-creator`](../.claude/skills/weather-svg-creator/SKILL.md) | Yes | — | Creates SVG weather card and writes output files | -| [`weather-fetcher`](../.claude/skills/weather-fetcher/SKILL.md) | No | `weather-agent` | Fetches current temperature from wttr.in API | +| [`weather-fetcher`](../.claude/skills/weather-fetcher/SKILL.md) | No | `weather-agent` | Fetches current temperature from Open-Meteo | | [`agent-browser`](../.claude/skills/agent-browser/SKILL.md) | Yes | — | Browser automation CLI for AI agents | | [`presentation/vibe-to-agentic-framework`](../.claude/skills/presentation/vibe-to-agentic-framework/SKILL.md) | Yes | `presentation-curator` | Conceptual framework behind the presentation | | [`presentation/presentation-structure`](../.claude/skills/presentation/presentation-structure/SKILL.md) | Yes | `presentation-curator` | Slide format, weight system, and section structure | diff --git a/best-practice/claude-subagents.md b/best-practice/claude-subagents.md index 11e21c1..661d959 100644 --- a/best-practice/claude-subagents.md +++ b/best-practice/claude-subagents.md @@ -1,6 +1,6 @@ # Sub-agents Best Practice -![Last Updated](https://img.shields.io/badge/Last_Updated-Feb%2028%2C%202026%203%3A22%20PM%20PKT-white?style=flat&labelColor=555)
+![Last Updated](https://img.shields.io/badge/Last_Updated-Mar%2007%2C%202026%208%3A35%20AM%20PKT-white?style=flat&labelColor=555)
[![Implemented](https://img.shields.io/badge/Implemented-2ea44f?style=flat)](../implementation/claude-subagents-implementation.md) Complete reference for Claude Code subagents — built-in agent types, custom agent definitions, and frontmatter fields. @@ -20,14 +20,14 @@ Complete reference for Claude Code subagents — built-in agent types, custom ag |-------|------|----------|-------------| | `name` | string | Yes | Unique identifier using lowercase letters and hyphens | | `description` | string | Yes | When to invoke. Use `"PROACTIVELY"` for auto-invocation by Claude | -| `tools` | string/list | No | Comma-separated allowlist of tools (e.g., `Read, Write, Edit, Bash`). Inherits all tools if omitted. Supports `Task(agent_type)` syntax to restrict spawnable subagents | +| `tools` | string/list | No | Comma-separated allowlist of tools (e.g., `Read, Write, Edit, Bash`). Inherits all tools if omitted. Supports `Agent(agent_type)` syntax to restrict spawnable subagents; the older `Task(agent_type)` alias still works | | `disallowedTools` | string/list | No | Tools to deny, removed from inherited or specified list | | `model` | string | No | Model alias: `haiku`, `sonnet`, `opus`, or `inherit` (default: `inherit`) | | `permissionMode` | string | No | Permission mode: `default`, `acceptEdits`, `dontAsk`, `bypassPermissions`, or `plan` | | `maxTurns` | integer | No | Maximum number of agentic turns before the subagent stops | | `skills` | list | No | Skill names to preload into agent context at startup (full content injected, not just made available) | | `mcpServers` | list | No | MCP servers for this subagent — server name strings or inline `{name: config}` objects | -| `hooks` | object | No | Lifecycle hooks scoped to this subagent: `PreToolUse`, `PostToolUse`, `Stop` (converted to `SubagentStop` at runtime) | +| `hooks` | object | No | Lifecycle hooks scoped to this subagent. All hook events are supported; `PreToolUse`, `PostToolUse`, and `Stop` are the most common | | `memory` | string | No | Persistent memory scope: `user`, `project`, or `local` | | `background` | boolean | No | Set to `true` to always run as a background task (default: `false`) | | `isolation` | string | No | Set to `"worktree"` to run in a temporary git worktree (auto-cleaned if no changes) | @@ -43,22 +43,23 @@ Complete reference for Claude Code subagents — built-in agent types, custom ag | `project` | `.claude/agent-memory//` | Yes | Yes | | `local` | `.claude/agent-memory-local//` | No | No | -See [claude-agent-memory.md](../claude-agent-memory.md) for full details. +See [claude-agent-memory.md](../reports/claude-agent-memory.md) for full details. --- ## Invocation -Agents are invoked via the **Task tool**, never via bash commands: +Agents are invoked via the **Agent tool** (renamed from Task in v2.1.63; `Task(...)` still works as an alias): ``` -Task(subagent_type="agent-name", description="...", prompt="...", model="haiku") +Agent(subagent_type="agent-name", description="...", prompt="...", model="haiku") ``` Other invocation and management methods: | Method | Description | |--------|-------------| +| `--agent ` CLI flag | Run Claude Code as a specific agent for the entire session (overrides the `agent` setting) | | `--agents '{...}'` CLI flag | Define session-scoped agents via JSON (accepts `description`, `prompt`, `tools`, `model`, etc.) | | `claude agents` CLI command | List all configured agents grouped by source (added v2.1.51) | | `/agents` interactive command | Create, edit, and manage agents interactively | @@ -86,7 +87,7 @@ Review the code for quality issues and report findings. --- name: deploy-manager description: Use this agent PROACTIVELY for deployment pipelines and release management -tools: Read, Write, Edit, Bash, Grep, Glob, Task(monitor, rollback) +tools: Read, Write, Edit, Bash, Grep, Glob, Agent(monitor, rollback) disallowedTools: NotebookEdit model: sonnet permissionMode: acceptEdits @@ -144,15 +145,15 @@ When multiple subagents share the same name, the higher-priority location wins: ### Official Claude Agents -Built-in agent types available via `subagent_type` in the Task tool: +Built-in agent types available in current Claude Code installs: | Agent | Model | Tools | Description | |-------|-------|-------|-------------| | `general-purpose` | inherit | All | Complex multi-step tasks — the default agent type for research, code search, and autonomous work | | `Explore` | haiku | Read-only (no Write, Edit) | Fast codebase search and exploration — optimized for finding files, searching code, and answering codebase questions | | `Plan` | inherit | Read-only (no Write, Edit) | Pre-planning research in plan mode — explores the codebase and designs implementation approaches before writing code | -| `claude-code-guide` | inherit | Glob, Grep, Read, WebFetch, WebSearch | Answers questions about Claude Code features, hooks, slash commands, MCP servers, settings, IDE integrations, and keyboard shortcuts | -| `statusline-setup` | inherit | Read, Edit | Configures the user's Claude Code status line setting | +| `Bash` | inherit | Bash | Running terminal commands in a separate context | +| `statusline-setup` | sonnet | Read, Edit | Configures the user's Claude Code status line setting | ### Agents in This Repository @@ -161,8 +162,10 @@ Custom agents defined in `.claude/agents/` for this project: | Agent | Model | Color | Tools | Skills | Memory | |-------|-------|-------|-------|--------|--------| | [`presentation-curator`](../.claude/agents/presentation-curator.md) | sonnet | magenta | Read, Write, Edit, Grep, Glob | presentation/vibe-to-agentic-framework, presentation/presentation-structure, presentation/presentation-styling | — | -| [`weather-agent`](../.claude/agents/weather-agent.md) | sonnet | teal | WebFetch, Read, Write, Edit | weather-fetcher | project | +| [`weather-agent`](../.claude/agents/weather-agent.md) | sonnet | green | WebFetch, Read, Write, Edit | weather-fetcher | project | +| [`workflow-claude-settings-agent`](../.claude/agents/workflows/best-practice/workflow-claude-settings-agent.md) | opus | yellow | All (inherited) | — | — | | [`workflow-claude-subagents-agent`](../.claude/agents/workflows/best-practice/workflow-claude-subagents-agent.md) | opus | blue | All (inherited) | — | — | +| [`workflow-concepts-agent`](../.claude/agents/workflows/best-practice/workflow-concepts-agent.md) | opus | green | All (inherited) | — | — | --- diff --git a/changelog/best-practice/claude-settings/changelog.md b/changelog/best-practice/claude-settings/changelog.md index e8fa6e7..32371a2 100644 --- a/changelog/best-practice/claude-settings/changelog.md +++ b/changelog/best-practice/claude-settings/changelog.md @@ -27,3 +27,20 @@ | 11 | LOW | CLAUDE.md Sync | Update CLAUDE.md configuration hierarchy (add managed/CLI/user levels) | ON HOLD (awaiting user approval) | | 12 | LOW | Example Update | Update Quick Reference example with `$schema`, sandbox filesystem, `Agent(*)`, remove hooks example | COMPLETE (updated example) | | 13 | MED | Hooks Redirect | Replace hooks section with redirect to claude-code-voice-hooks repo | COMPLETE (hooks externalized to dedicated repo) | + +--- + +## [2026-03-07 02:17 PM PKT] Claude Code v2.1.71 + +| # | Priority | Type | Action | Status | +|---|----------|------|--------|--------| +| 1 | HIGH | Changed Behavior | Fix `teammateMode`: type `boolean` → `string`, default `false` → `"auto"`, description → "Agent team display: auto, in-process, tmux" | COMPLETE (type, default, and description updated) | +| 2 | HIGH | New Setting | Add `allowManagedPermissionRulesOnly` to Permissions table (boolean, managed only) | COMPLETE (added to Permission Keys table) | +| 3 | HIGH | Missing Env Vars | Add ~31 missing env vars including confirmed (`CLAUDE_CODE_MAX_OUTPUT_TOKENS`, `CLAUDE_CODE_DISABLE_FAST_MODE`, `CLAUDE_CODE_DISABLE_AUTO_MEMORY`, `CLAUDE_CODE_USER_EMAIL`, `CLAUDE_CODE_ORGANIZATION_UUID`, `CLAUDE_CONFIG_DIR`) and agent-reported (Foundry, Bedrock, mTLS, shell prefix, etc.) | COMPLETE (added 31 env vars to table) | +| 4 | MED | Changed Default | Fix `plansDirectory` default from `.claude/plans/` to `~/.claude/plans` | COMPLETE (default updated) | +| 5 | MED | Changed Description | Fix `sandbox.enableWeakerNetworkIsolation` description to "(macOS only) Allow access to system TLS trust; reduces security" | COMPLETE (description updated) | +| 6 | MED | Scope Fix | Fix `extraKnownMarketplaces` scope from "Any" to "Project" | COMPLETE (scope and description updated) | +| 7 | MED | Boundary Violation | Replace `CLAUDE_CODE_EFFORT_LEVEL` in `claude-cli-startup-flags.md` with cross-reference to settings report | COMPLETE (replaced with link) | +| 8 | MED | Version Badge | Update report version from v2.1.69 to v2.1.71 | COMPLETE (badge and header updated) | +| 9 | LOW | Suspect Keys | Verify `skipWebFetchPreflight`, `sandbox.ignoreViolations`, `sandbox.network.deniedDomains`, `skippedMarketplaces`, `skippedPlugins`, `pluginConfigs` | ON HOLD (kept in report pending verification — recurring from 2026-03-05) | +| 10 | LOW | CLAUDE.md Sync | Update CLAUDE.md configuration hierarchy (3 levels → 5+) | COMPLETE (updated to 5-level hierarchy with managed layer) | diff --git a/changelog/best-practice/claude-subagents/changelog.md b/changelog/best-practice/claude-subagents/changelog.md index 66dde3f..1d2190e 100644 --- a/changelog/best-practice/claude-subagents/changelog.md +++ b/changelog/best-practice/claude-subagents/changelog.md @@ -18,3 +18,23 @@ | 2 | HIGH | Agents Table | Fix presentation-curator skills column — add `presentation/` prefix to skill names | COMPLETE (updated to presentation/vibe-to-agentic-framework etc.) | | 3 | MED | Field Documentation | Add note to `color` field that it is functional but absent from official frontmatter table | COMPLETE (added note about unofficial status in description column) | | 4 | MED | Invocation Section | Expand invocation section with --agents CLI flag, /agents command, claude agents CLI, agent resumption | COMPLETE (added invocation methods table with 5 methods) | + +--- + +## [2026-03-07 08:35 AM PKT] Claude Code v2.1.71 + +| # | Priority | Type | Action | Status | +|---|----------|------|--------|--------| +| 1 | HIGH | Broken Link | Fix agent memory link to `reports/claude-agent-memory.md` | COMPLETE | +| 2 | HIGH | Changed Behavior | Update `tools` field description: `Task(agent_type)` → `Agent(agent_type)` (v2.1.63 rename) | COMPLETE | +| 3 | HIGH | Changed Behavior | Update invocation section: Task tool → Agent tool (v2.1.63 rename) | COMPLETE (updated heading, code example, and added rename note) | +| 4 | HIGH | Example Update | Update full-featured example: `Task(monitor, rollback)` → `Agent(monitor, rollback)` | COMPLETE | +| 5 | HIGH | Built-in Agent | Add `Bash` agent to Official Claude Agents table (model: inherit, purpose: terminal commands in separate context) | COMPLETE (added to table) | +| 6 | HIGH | Agents Table | Add `workflow-concepts-agent` to Agents in This Repository table (model: opus, color: green) | COMPLETE | +| 7 | HIGH | Agents Table | Add `workflow-claude-settings-agent` to Agents in This Repository table (model: opus, color: yellow) | COMPLETE | +| 8 | MED | Built-in Agent | Fix `statusline-setup` model: `inherit` → `Sonnet` | COMPLETE | +| 9 | MED | Built-in Agent | Fix `claude-code-guide` model: `inherit` → `Haiku` | NOT APPLICABLE (removed from table) | +| 10 | MED | Agents Table | Fix `weather-agent` color: `teal` → `green` | COMPLETE | +| 11 | MED | Invocation | Add `--agent ` CLI flag to invocation methods table | COMPLETE (added as first row in invocation methods table) | +| 12 | MED | Changed Behavior | Update line 147 text: "Task tool" → "Agent tool" in Official Claude Agents table header | COMPLETE (user rewrote header text) | +| 13 | MED | Cross-File | Update CLAUDE.md: `Task(...)` → `Agent(...)` references (lines 50-53, 61) | COMPLETE (updated orchestration section and tools field description) | diff --git a/changelog/best-practice/claude-subagents/verification-checklist.md b/changelog/best-practice/claude-subagents/verification-checklist.md index ec0aa05..ff320f9 100644 --- a/changelog/best-practice/claude-subagents/verification-checklist.md +++ b/changelog/best-practice/claude-subagents/verification-checklist.md @@ -56,6 +56,7 @@ Rules that verify scope and priority information. | # | Category | Check | Depth | Compare Against | Added | Origin | |---|----------|-------|-------|-----------------|-------|--------| | 4A | Priority Order | Verify the Scope and Priority table lists all agent locations in correct priority order | content-match | sub-agents reference page + CLI reference page | 2026-02-28 | Initial checklist — wrong priority order causes resolution bugs | +| 4B | Invocation Methods | Verify the invocation methods table lists ALL invocation methods from CLI reference and sub-agents docs, including `--agent` (singular), `--agents` (plural), `/agents`, `claude agents`, Agent tool, and agent resumption | field-level | CLI reference page + sub-agents reference page | 2026-03-07 | `--agent` CLI flag was missing from the invocation table — it's a distinct invocation method for running Claude as a specific agent | --- @@ -99,4 +100,4 @@ Rules that verify all hyperlinks in the report are valid. |---|----------|-------|-------|-----------------|-------|--------| | 8A | Local File Links | Verify all relative file links (e.g. `../.claude/agents/weather-agent.md`) resolve to existing files | exists | local filesystem | 2026-02-28 | File moves (reports/ → best-practice/) broke relative links — must catch future breakage | | 8B | External URL Links | Verify all external URLs (e.g. `https://code.claude.com/docs/en/sub-agents`) return valid pages | exists | HTTP response | 2026-02-28 | External docs pages can be restructured or removed — must validate on each run | -| 8C | Cross-File Reference Links | Verify links to other report files (e.g. `../claude-agent-memory.md`) resolve to existing files | exists | local filesystem | 2026-02-28 | Reports can be moved or renamed — cross-references must stay in sync | +| 8C | Cross-File Reference Links | Verify links to other report files (e.g. `../reports/claude-agent-memory.md`) resolve to existing files | exists | local filesystem | 2026-02-28 | Reports can be moved or renamed — cross-references must stay in sync | diff --git a/changelog/best-practice/concepts/changelog.md b/changelog/best-practice/concepts/changelog.md index 219041c..e19d375 100644 --- a/changelog/best-practice/concepts/changelog.md +++ b/changelog/best-practice/concepts/changelog.md @@ -44,3 +44,16 @@ Tracks drift between the README CONCEPTS table and official Claude Code document | 5 | MED | Merged Concept | Fold Auto Memory and Rules into Memory row as inline links | COMPLETE (linked to /memory and /memory#organize-rules-with-clauderules) | | 6 | MED | Merged Concept | Fold Headless Mode into Remote Control row as inline link | COMPLETE (linked to /headless) | | 7 | LOW | Reorder | Reorder table by logical grouping: building blocks → extension → config → context → runtime | COMPLETE (grouped by concern, not chronology) | + +--- + +## [2026-03-07 08:40 AM PKT] Claude Code v2.1.71 + +| # | Priority | Type | Action | Status | +|---|----------|------|--------|--------| +| 1 | HIGH | Broken URL | Fix `context-management` → `interactive-mode` in TIPS (lines 112, 115, 135) | COMPLETE (3 occurrences replaced with interactive-mode) | +| 2 | HIGH | Broken URL | Fix `model-configuration` → `model-config` in TIPS (lines 115, 116, 135) | COMPLETE (3 occurrences replaced with model-config) | +| 3 | HIGH | Broken URL | Fix `usage-billing` → `costs` in TIPS (line 115) | COMPLETE (replaced with costs) | +| 4 | HIGH | Broken URL | Remove `cowork` URL in STARTUPS (line 167) — page does not exist | COMPLETE (hyperlink removed, plain text kept) | +| 5 | HIGH | Missing Concept | Add Scheduled Tasks row to CONCEPTS and Hot section (`/loop`, cron tools) | COMPLETE (added by user to both tables + /loop tip + Boris tweet) | +| 6 | MED | Changed Location | Update Agent Teams location from `.claude/agents/.md` to `built-in (env var)` | COMPLETE (location updated to built-in env var) | diff --git a/implementation/claude-commands-implementation.md b/implementation/claude-commands-implementation.md index 0f80fff..4d5bfde 100644 --- a/implementation/claude-commands-implementation.md +++ b/implementation/claude-commands-implementation.md @@ -38,7 +38,7 @@ Use the AskUserQuestion tool to ask the user whether they want the temperature in Celsius or Fahrenheit. ### Step 2: Fetch Weather Data -Use the Task tool to invoke the weather agent: +Use the Agent tool to invoke the weather agent: - subagent_type: weather-agent - prompt: Fetch the current temperature for Dubai, UAE in [unit]... @@ -49,7 +49,7 @@ Use the Skill tool to invoke the weather-svg-creator skill: ... ``` -The command orchestrates the entire workflow: it asks the user for their temperature unit preference, invokes the `weather-agent` via the Task tool, and then invokes the `weather-svg-creator` skill via the Skill tool. +The command orchestrates the entire workflow: it asks the user for their temperature unit preference, invokes the `weather-agent` via the Agent tool, and then invokes the `weather-svg-creator` skill via the Skill tool. --- diff --git a/implementation/claude-skills-implementation.md b/implementation/claude-skills-implementation.md index 2721c5c..a26fc1e 100644 --- a/implementation/claude-skills-implementation.md +++ b/implementation/claude-skills-implementation.md @@ -65,7 +65,7 @@ This is a **skill** — invoked directly by the command via the Skill tool. It r --- name: weather-fetcher description: Instructions for fetching current weather temperature data - for Dubai, UAE from wttr.in API + for Dubai, UAE from Open-Meteo API user-invocable: false --- @@ -79,8 +79,9 @@ Fetch the current temperature for Dubai, UAE in the requested unit ## Instructions 1. Fetch Weather Data: Use the WebFetch tool to get current weather data - - URL: https://wttr.in/Dubai?format=j1 -2. Extract Temperature: From the JSON response, extract temp_C or temp_F + - Celsius URL: https://api.open-meteo.com/v1/forecast?latitude=25.2048&longitude=55.2708¤t=temperature_2m&temperature_unit=celsius + - Fahrenheit URL: https://api.open-meteo.com/v1/forecast?latitude=25.2048&longitude=55.2708¤t=temperature_2m&temperature_unit=fahrenheit +2. Extract Temperature: From the JSON response, extract `current.temperature_2m` 3. Return Result: Return the temperature value and unit clearly. ... @@ -116,4 +117,4 @@ Ask Claude to create one for you — it will generate the markdown file with YAM # My Skill Instructions for what the skill does. -``` \ No newline at end of file +``` diff --git a/implementation/claude-subagents-implementation.md b/implementation/claude-subagents-implementation.md index 7dece10..ad60eda 100644 --- a/implementation/claude-subagents-implementation.md +++ b/implementation/claude-subagents-implementation.md @@ -25,11 +25,13 @@ The weather agent is implemented in this repo as an example of the **Command → --- name: weather-agent description: Use this agent PROACTIVELY when you need to fetch weather data for - Dubai, UAE. This agent fetches real-time temperature from wttr.in API + Dubai, UAE. This agent fetches real-time temperature from Open-Meteo using its preloaded weather-fetcher skill. -tools: WebFetch, Read +tools: WebFetch, Read, Write, Edit model: sonnet color: green +maxTurns: 5 +permissionMode: acceptEdits memory: project skills: - weather-fetcher @@ -38,7 +40,7 @@ skills: # Weather Agent You are a specialized weather agent that fetches weather data for Dubai, -Pakistan. +UAE. ## Your Task @@ -54,7 +56,7 @@ skill: ... ``` -The agent has one preloaded skill (`weather-fetcher`) that provides instructions for fetching from the wttr.in API. It returns the temperature value and unit to the calling command. +The agent has one preloaded skill (`weather-fetcher`) that provides instructions for fetching from Open-Meteo. It returns the temperature value and unit to the calling command. --- diff --git a/orchestration-workflow/orchestration-workflow.md b/orchestration-workflow/orchestration-workflow.md index c602a5d..b7837ce 100644 --- a/orchestration-workflow/orchestration-workflow.md +++ b/orchestration-workflow/orchestration-workflow.md @@ -44,7 +44,7 @@ This showcases the **Command → Agent → Skill** architecture pattern, where: │ AskUser — C° or F°? │ └────────────┬───────────┘ │ - Step 2 — Task tool + Step 2 — Agent tool │ ▼ ┌─────────────────────────────────────────────────────┐ @@ -77,7 +77,7 @@ This showcases the **Command → Agent → Skill** architecture pattern, where: - **Purpose**: Entry point — orchestrates the workflow and handles user interaction - **Actions**: 1. Asks user for temperature unit preference (Celsius/Fahrenheit) - 2. Invokes weather-agent via Task tool + 2. Invokes weather-agent via Agent tool 3. Invokes weather-svg-creator via Skill tool - **Model**: haiku @@ -109,7 +109,7 @@ The agent has `weather-fetcher` preloaded into its context at startup. It follow #### `weather-fetcher` (Skill) - **Location**: `.claude/skills/weather-fetcher/SKILL.md` - **Purpose**: Instructions for fetching real-time temperature data -- **Data Source**: wttr.in API for Dubai, UAE +- **Data Source**: Open-Meteo API for Dubai, UAE - **Output**: Temperature value and unit (Celsius or Fahrenheit) - **Note**: This is an agent skill — preloaded into `weather-agent`, not invoked directly @@ -117,9 +117,9 @@ The agent has `weather-fetcher` preloaded into its context at startup. It follow 1. **User Invocation**: User runs `/weather-orchestrator` command 2. **User Prompt**: Command asks user for preferred temperature unit (Celsius/Fahrenheit) -3. **Agent Invocation**: Command invokes `weather-agent` via Task tool +3. **Agent Invocation**: Command invokes `weather-agent` via Agent tool 4. **Skill Execution** (within agent context): - - Agent follows `weather-fetcher` skill instructions to fetch temperature from wttr.in + - Agent follows `weather-fetcher` skill instructions to fetch temperature from Open-Meteo - Agent returns the temperature value and unit to the command 5. **SVG Creation**: Command invokes `weather-svg-creator` via Skill tool - Skill creates SVG weather card at `orchestration-workflow/weather.svg` @@ -136,10 +136,10 @@ The agent has `weather-fetcher` preloaded into its context at startup. It follow Input: /weather-orchestrator ├─ Step 1: Asks: Celsius or Fahrenheit? │ └─ User: Celsius -├─ Step 2: Task tool → weather-agent +├─ Step 2: Agent tool → weather-agent │ ├─ Preloaded Skill: │ │ └─ weather-fetcher (domain knowledge) -│ ├─ Fetches from wttr.in → 26°C +│ ├─ Fetches from Open-Meteo → 26°C │ └─ Returns: temperature=26, unit=Celsius ├─ Step 3: Skill tool → /weather-svg-creator │ ├─ Creates: orchestration-workflow/weather.svg diff --git a/orchestration-workflow/orchestration-workflow.svg b/orchestration-workflow/orchestration-workflow.svg index 363fb90..da3c646 100644 --- a/orchestration-workflow/orchestration-workflow.svg +++ b/orchestration-workflow/orchestration-workflow.svg @@ -38,7 +38,7 @@ weather-fetcher Fetches temperature from - wttr.in API for Dubai + Open-Meteo API for Dubai diff --git a/orchestration-workflow/output.md b/orchestration-workflow/output.md index 0b57c08..dc1de0b 100644 --- a/orchestration-workflow/output.md +++ b/orchestration-workflow/output.md @@ -1,7 +1,7 @@ # Weather Result ## Temperature -22.5°C +25.7°C ## Location Dubai, UAE diff --git a/orchestration-workflow/weather.svg b/orchestration-workflow/weather.svg index 6a50372..b8f1e17 100644 --- a/orchestration-workflow/weather.svg +++ b/orchestration-workflow/weather.svg @@ -1,6 +1,6 @@ Unit: Celsius - 22.5°C + 25.7°C Dubai, UAE diff --git a/presentation/index.html b/presentation/index.html index 863f308..bff615c 100644 --- a/presentation/index.html +++ b/presentation/index.html @@ -884,7 +884,7 @@ When creating or modifying frontend components:

As Subagent

-

Spawned in an isolated context via Task tool.

+

Spawned in an isolated context via Agent tool.

Task( subagent_type="frontend-engineer" prompt="Add a settings page" @@ -1027,7 +1027,7 @@ Review your memory for patterns you've seen before.
# Claude spawns a subagent automatically or you can ask: > Use the frontend-engineer agent to add a settings page -# Claude uses the Task tool internally: +# Claude uses the Agent tool internally: Task( subagent_type="frontend-engineer", prompt="Add a user settings page to the TodoApp" @@ -1152,7 +1152,7 @@ Task(

Using Agents

Main agent: "agent" in settings.json

-

Subagent: Task tool spawns it

+

Subagent: Agent tool spawns it

CLI: --agent name