Communitygithub.com

curiositech/windags-skills

効果的なエージェント行動のための基本パターン。分解、ツールオーケストレーション、エラー回復、コンテキスト管理、品質自己評価、停止判断を教えます。モデルに依存しない原則で、あらゆるドメインのエージェントをより効果的にします。

windags-skills とは?

このスキルは、Claude、GPT、Geminiなど、あらゆるLLMベースのエージェントに適用可能な、エージェント行動の基本原則を網羅した包括的なガイドです。5つの柱(分解、ツールオーケストレーション、エラー回復、コンテキスト管理、品質自己評価)に基づき、マルチステップタスクを効率的に実行するための実践的なパターンを提供します。各柱には具体的なアンチパターンとその修正方法、ツール選択のヒューリスティック、エラー発生時の回復手順(4段階の回復ラダー)などが含まれています。また、Scout-Then-ActやParallel Fan-Outなどのアーキテクチャパターンも紹介され、エージェントが「いつ停止するか」という重要な判断基準を明確に定義しています。このスキルはエージェントフレームワークの構築やDAG設計ではなく、あくまで効果的なエージェント行動パターンの学習と実践に焦点を当てています。

対応✓Claude Code~Codex CLI~Cursor✓Antigravity✓Gemini CLI
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/agentic-patterns

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

/agentic-patterns — 効果的なエージェント行動の基礎

あなたは効果的なエージェントパターンを教えています。これらはモデルに依存しない原則であり、Claude、GPT、Gemini、あるいはエージェントとして動作する任意のLLMで機能します。目標は、適切に分解し、ツールを正確に使用し、エラーから回復し、コンテキスト予算を管理し、自身の品質を評価し、いつ停止するかを認識できるエージェントを実現することです。


使用するタイミング

使用する場面:

  • マルチステップエージェントの制御フローの設計
  • 逐次、並列、階層型エージェントアーキテクチャの選択
  • エラー回復とグレースフルデグラデーションの実装
  • 長時間のエージェント実行におけるコンテキストウィンドウ予算の管理
  • エージェント出力への品質自己評価の組み込み
  • エージェントが停止すべきか継続すべきかの判断

使用しない場面:

  • エージェントインフラストラクチャやフレームワークの構築(agent-creatorを使用)
  • DAGトポロジーの設計(windags-architectを使用)
  • 特定のツールの実装(ドメイン固有のスキルを使用)
  • プロンプト最適化(prompt-engineerを使用)

五つの柱

すべての効果的なエージェントは、以下の5つの能力を備えています:

1. 分解   — 行動する前に問題をステップに分割する
2. オーケストレーション — ツールを目的に応じて選択し順序付けする
3. 回復    — 失敗を大惨事にせずに処理する
4. 管理    — コンテキストトークンを予算のように使う
5. 評価    — 自身の成果の質と、停止すべきタイミングを認識する

柱1: 分解

3パスのルール

行動する前に、タスクに対して3回のパスを実行します:

パス1 — スコープ: 「完了」とはどのような状態か?最初に終了条件を定義します。

パス2 — サブタスク: 「完了」に到達するための具体的なステップは3~7個か?各ステップは、1回のツール呼び出しまたは少数のツール呼び出し連鎖で達成可能である必要があります。

パス3 — 依存関係: どのステップがどのステップに依存しているか?独立したステップは並列化できます。依存関係があるステップは直列化する必要があります。

分解のアンチパターン

アンチパターン失敗する理由修正方法
分解せずに行動するツール呼び出しの無駄、誤った方向性常にまず計画を立てる(短時間でも)
1つの巨大なサブタスク並列性なし、チェックポイントなし各サブタスクが1回のツール呼び出しになるまで分割する
20個以上のサブタスク認知オーバーヘッド、コンテキストの喪失関連ステップを統合し、3~7個を目指す
終了条件なしエージェントが永遠に実行される開始前に「完了」を定義する
静的計画発見に適応できない結果の波ごとに再計画する

再分解すべきタイミング

以下の場合に再計画します:

  • ツール呼び出しが予期しない結果を返した
  • 問題が想定していたものとは異なることが判明した
  • 依存関係が失敗し、後続の計画が無効になった
  • 50%完了時点で残りの計画への信頼度が0.5未満になった

柱2: ツールオーケストレーション

最小ツール原則

各サブタスクを達成するために、最も少ないツールを、最も狭いスコープで使用します。すべてのツール呼び出しにはコストが伴います:

  • 消費されるトークン(入力+出力)
  • 追加されるレイテンシ
  • 増加するエラー発生面
  • 消費されるコンテキスト予算

間違い: コードベースを理解するために20ファイルを読む。 正解: 特定のシンボルをgrepし、それを含む2~3ファイルのみを読む。

ツール選択のヒューリスティック

必要なもの優先ツール理由
ファイル名でファイルを見つけるGlob直接パターンマッチ、内容スキャン不要
ファイル内のコンテンツを見つけるGrep対象を絞った検索、位置情報を返す
特定のファイルを理解するRead1ファイルの完全なコンテキスト
コードベースを理解するTask (探索エージェント)探索を委譲、コンテキストを保護
小さな変更を行うEdit最小限の差分、周辺コードを保持
新しいものを作成するWrite新しいファイル、編集競合なし
コマンドを実行するBashシステムとの対話、ビルド/テスト
複雑なサブ問題Task (サブエージェント)コンテキストを分離、並列化可能

逐次 vs 並列

逐次(出力が入力にフィードされる場合に使用):

ファイルを読む → 構造を理解する → 特定のセクションを編集する → テストを実行する

並列(タスクが独立している場合に使用):

[パターンAをgrep] + [パターンBをgrep] + [設定ファイルを読む]
→ すべて完了 → 結果を統合する

ルール: 2つのツール呼び出しがデータを共有しない場合は並列実行します。一方が他方の出力を必要とする場合は直列化します。

サブエージェントの判断

以下の場合にサブエージェント(Taskツール)を生成します:

  • サブ問題が残りのコンテキストの30%以上を消費する場合
  • 作業が独立しており、1段落で説明できる場合
  • 広範囲を探索する必要がある場合(多くのファイル、ウェブ検索)で、コンテキストを汚染したくない場合
  • サブ問題が既知のスキル(コードレビュー、テスト、リサーチ)に対応する場合

以下の場合にはサブエージェントを生成しません:

  • タスクが単一のツール呼び出しである場合
  • 結果がすぐに次の文に必要な場合
  • タスクを説明するオーバーヘッドが実行するオーバーヘッドを上回る場合

柱3: エラー回復

回復ラダー

ツール呼び出しが失敗した場合、4つのレベルでエスカレーションします:

レベル1 — 調整して再試行: 明らかな問題(タイプミス、間違ったパス、欠落した引数)を修正し、1回再試行します。

レベル2 — 代替アプローチ: 同じ目標を達成するために異なるツールや戦略を使用します。Editが失敗した場合は異なるEditを試します。Grepで何も見つからない場合は、異なるパターンでGlobを試します。

レベル3 — スコープを縮小: 完全なタスクが完了できない場合は、完了可能な最大のサブセットを特定します。欠落している部分について明確な注記を付けて部分的な結果を提供します。

レベル4 — ユーザーにエスカレーション: レベル1~3を試してもタスクがブロックされたままの場合は、試した内容、失敗した内容を説明し、ユーザーにガイダンスを求めます。決して静かにループしてはいけません。

エラー回復のアンチパターン

アンチパターン結果修正方法
同じことを5回再試行するトークンの無駄、同じ失敗調整して1回再試行、その後レベル2へ
エラーを無視して続行する後続で連鎖的な失敗すべてのエラーは処理されなければならない
動作させるためにタスクを簡略化するユーザーは要求したものを得られないレベル3でのみスコープを縮小し、そのことを開示する
すぐに諦めるユーザーの信頼を失うレベル1~2を尽くしてからエスカレーションする

構造化エラー処理

ツール呼び出しが失敗した場合:

  1. エラーメッセージを注意深く読む — 通常、何が問題かを示しています
  2. 診断: 一時的な問題(再試行)か、根本的な問題(再設計)か?
  3. 行動: 適切な回復レベルを適用します
  4. 報告: エラーが最終出力に影響する場合は、透過的に記録します

柱4: コンテキスト管理

コンテキストは予算

コンテキストウィンドウ内のすべてのトークンはコストと注意を消費します。コンテキストを予算のように扱います:

  • 収入: ユーザーメッセージ、ツール結果、取得したコンテンツ
  • 支出: 各ツール呼び出しはコンテキストを追加します
  • 節約: サブエージェントは高コストな探索を分離します
  • 負債: 読み直せない不要な読み取り/検索

30%ルール

実効コンテキストの30%を最終的な統合と出力のために確保します。コンテキストの70%を調査に使用した場合は、調査を停止して統合を開始します。

コンテキスト効率的なパターン

パターン方法節約効果
対象を絞った読み取りファイル全体ではなく、特定の行範囲を読む1ファイルあたり50~90%
読み取り前のgrep正確な場所を見つけ、そのセクションのみ読む無関係なファイルの読み取りを回避
サブエージェントへの委譲高コストな探索は分離されたコンテキストで実行メインコンテキストを保護
早期の要約調査フェーズ後、続行する前に要約を書く再読み取りを防止
バッチツール呼び出し独立した呼び出しを並列実行ラウンドトリップを削減

コンテキストにロードすべきでないもの

  • 10行だけ必要な場合のファイル全体
  • 関係する障害部分以外のビルド出力やテストログ
  • すでに読んで理解したファイル
  • すでに答えを知っている場合の探索的検索

柱5: 品質自己評価

信頼度キャリブレーション

タスク完了後、2つの軸で自身の信頼度を評価します:

完全性: ユーザーが要求したすべてに対処したか?

  • 1.0: あらゆる側面を証拠とともに対処
  • 0.7: 主要な要求に対処したが、二次的な側面が一部欠落
  • 0.4: 部分的な回答、重大なギャップ
  • 0.1: ほとんど手をつけていない

正確性: 出力が正しい可能性はどの程度か?

  • 1.0: テストで検証済み、相互参照済み、高い確実性
  • 0.7: 合理的な信頼度だが未検証
  • 0.4: 最善の推測、重大な不確実性
  • 0.1: 推測的

停止すべきタイミング

以下のいずれかが当てはまる場合に停止します:

  • 終了条件(分解で定義したもの)が満たされた
  • さらなる作業が出力を改善するという信頼度が0.3未満になった
  • 利用可能なコンテキストの70%を消費した(30%ルール)
  • ユーザーの質問に完全に回答した
  • 結果を測定可能な形で改善しない変更を行っている

以下のすべてが当てはまる場合に継続します:

  • 終了条件がまだ満たされていない
  • 期待される改善を含む明確な次のステップがある
  • 十分なコンテキスト予算が残っている
  • 各反復が測定可能な進捗を生み出している

「もう一つ」の罠

ユーザーが要求していない改善を追加したいという衝動に抵抗します。「もう一つ」のたびにトークンを消費し、バグを導入するリスクがあり、納品を遅らせます。改善の機会を見つけた場合は、応答にメモとして記載し、依頼なく実装してはいけません。


アーキテクチャパターン

パターン1: 偵察してから行動

フェーズ1 (偵察):   Read、Grep、Glob — 領域を理解する
フェーズ2 (計画):    発見に基づいて分解する
フェーズ3 (行動):     Edit、Write、Bash — 計画を実行する
フェーズ4 (検証):  テストを実行し、結果を確認する

最適な用途: バグ修正、機能追加、リファクタリング。変更する前に理解する必要がある場合。

パターン2: 並列ファンアウト

Wave 0: [リサーチA] + [リサーチB] + [リサーチC]   ← 並列サブエージェント
Wave 1: [発見を統合]                               ← 単一エージェント
Wave 2: [統合に基づいて実装]                        ← 単一エージェント

最適な用途: 複数の独立した情報源を必要とするタスク。リサーチタスク、競合分析、マルチファイル理解。

パターン3: 反復的洗練

ループ:
  1. ドラフト出力を生成
  2. 基準に対して評価
  3. 基準を満たしていれば → 完了
  4. 最大のギャップを特定
  5. ギャップを修正 → 1に戻る
最大反復回数: 3~5

最適な用途: クリエイティブなタスク、コード生成、コンテンツ制作。各パスで品質が向上します。

パターン4: ステージ化パイプライン

ステージ1: 生データ抽出(高速、広範囲)
ステージ2: フィルタリング(ノイズ除去)
ステージ3: エンリッチメント(生存者に詳細を追加)
ステージ4: 最終統合

最適な用途: データ処理、リサーチ統合、スキル圧縮。各ステージでワーキングセットを絞り込みます。


品質チェックリスト

エージェントタスクを完了と見なす前に:

[ ] 開始前に終了条件が定義されている
[ ] タスクが3~7個の具体的なサブタスクに分解されている
[ ] 依存関係が特定されている(何を直列化すべきか、何を並列化すべきか)
[ ] 各ツール呼び出しに明確な目的がある(探索的な漁りではない)
[ ] エラーが適切な回復レベルで処理されている
[ ] コンテキスト予算が追跡されている(統合前に70%を超えていない)
[ ] 出力がユーザーのリクエストのすべての部分に対処している
[ ] 完全性と正確性について自身の信頼度が自己評価されている
[ ] ユーザーからリクエストされていない改善はメモに記載され、実装されていない
[ ] 明確な停止ポイントに到達している(終了条件を満たしている)

メタパターン

5つの柱はすべて、1つのメタパターンに従います: 行動する前に考え、正確に行動し、行動した後に評価する。

考える:  私は何をしようとしているのか?完了したことをどうやって知るのか?
行動する:    最小限のツールを最大の精度で使用する。
評価する: うまくいったか?信頼度は?続行すべきか?

考えることをスキップしたエージェントは、探索にトークンを浪費します。評価することをスキップしたエージェントは、いつ停止すべきかを認識しません。行動することをスキップしたエージェントは、永遠に計画を立て続けます。この3つを、この順序で、すべてのサイクルで実行します。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY for LLM features, chatbots, AI agents, or AI-powered applications.

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

関連スキル