Token导航 LogoToken导航

Agent Skill · 研究检索

agent-patterns(Agent 模式)

agent-patterns 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

agent-patterns 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 43,703。

总安装 964周安装 41GitHub Stars 公开资料未说明下载 338核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agent-patterns(Agent 模式)
来源仓库:https://github.com/markpitt/claude-skills
仓库路径:skills/agent-patterns
安装命令:
npx skills add markpitt/claude-skills --skill "agent-patterns"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add markpitt/claude-skills --skill "agent-patterns"

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

agent-patterns 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。适用于代理技能发现、行为模式匹配与最佳实践参考。通过结构化模板与示例库辅助代理能力扩展。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/agent-patterns

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add markpitt/claude-skills --skill "agent-patterns";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

agent-patterns 怎么安装?

在终端执行 npx skills add markpitt/claude-skills --skill "agent-patterns"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

agent-patterns 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

agent-patterns 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

agent-patterns 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

agent-patterns 用的人多吗?

公开数据是累计安装 964 次,近一周安装 41 次,下载 338 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

agent-patterns 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
agent-patterns

Agent 模式 · 本页

964—只读MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
agent-patterns
description
Modular orchestration of agent patterns from Anthropic's engineering guide. Intelligently selects and implements prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, and autonomous agents. Includes pattern combinations and language-specific implementations.
version
2.0

Agent Patterns Orchestration Skill

This skill implements AI agent patterns and workflows from Anthropic's "Building Effective Agents" engineering guide. It uses modular resources to help you select, design, and implement the right patterns for your needs.

Quick Reference: Which Pattern Do I Need?

Task CharacteristicsBest Pattern(s)Load Resource
Fixed sequential steps, each requires different handlingPrompt Chainingcore-patterns.md
Input falls into distinct categoriesRoutingcore-patterns.md
Independent tasks to run in parallelParallelization (Sectioning)core-patterns.md
Same task multiple times for robustness/consensusParallelization (Voting)core-patterns.md
Unpredictable subtasks, determine at runtimeOrchestrator-Workersdynamic-orchestration.md
Fully open-ended exploration neededAutonomous Agentsdynamic-orchestration.md
Need iterative quality improvementEvaluator-Optimizeriterative-refinement.md
Multiple pattern combination neededSee decision tablepattern-combinations.md
Language-specific implementationChoose languagelanguage-implementation.md
Tool design/optimizationInterface designtool-design.md

Pattern Category Index

Core Patterns (Deterministic Workflows)

When to use: Workflow fully predetermined upfront

Patterns:

  1. Prompt Chaining - Sequential LLM calls with checkpoints
  2. Routing - Classify and route to specialized handlers
  3. Parallelization - Concurrent execution (sectioning or voting)

Resource: resources/core-patterns.md (350+ lines)

  • Complete pattern descriptions and architectures
  • When to use / when NOT to use
  • Real-world examples
  • Code skeletons for each pattern

Dynamic Orchestration Patterns (Unpredictable Workflows)

When to use: Workflow cannot be predetermined

Patterns:

  1. Orchestrator-Workers - Central LLM decomposes, workers execute
  2. Autonomous Agents - Open-ended exploration with tool usage

Resource: resources/dynamic-orchestration.md (400+ lines)

  • Detailed pattern descriptions and requirements
  • When to use each approach
  • Critical requirements for agents
  • Comprehensive implementation examples

Iterative Refinement

When to use: Output quality needs improvement through feedback

Pattern:

  1. Evaluator-Optimizer - Generator + Evaluator feedback loop

Resource: resources/iterative-refinement.md (350+ lines)

  • Pattern implementation strategies
  • Evaluation criteria design
  • Stopping conditions
  • Cost and quality trade-offs

Advanced: Pattern Combinations

When to use: Combining multiple patterns for complex problems

Examples:

  • Routing + Prompt Chaining (different routes, different chains)
  • Orchestrator + Evaluator-Optimizer (decompose, then refine)
  • Routing by Complexity (route to appropriate pattern)
  • Parallel Orchestrators (multiple perspectives)

Resource: resources/pattern-combinations.md (400+ lines)

  • 7 major combination patterns
  • Decision framework and tree
  • Cost-complexity trade-offs
  • Testing strategies

Tool Design & Implementation

When to use: Designing tools for agent use

Topics:

  • Poka-yoke (error-proofing) design
  • Natural format selection
  • Parameter design patterns
  • Common pitfalls

Resource: resources/tool-design.md (560+ lines, comprehensive reference)

  • Core principles and best practices
  • Real-world insights from SWE-bench
  • Language-specific considerations
  • Testing tool interfaces

Language-Specific Implementation

When to use: Implementing patterns in your chosen language

Languages:

  • TypeScript/JavaScript
  • Python
  • Rust
  • C#/.NET
  • Go
  • Dart

Resource: resources/language-implementation.md (450+ lines)

  • Full code examples for each language
  • Language strengths and weaknesses
  • Best practices and idioms
  • Concurrency models

Orchestration Protocol

Phase 1: Identify Your Task

Ask yourself:

1. Is the workflow predetermined?

  • YES → Use Core Patterns (Phase 2A)
  • NO → Use Dynamic Patterns (Phase 2B)

2. Is output quality iteration important?

  • YES → Consider adding Evaluator-Optimizer
  • NO → Direct to execution

3. Are multiple patterns needed?

  • YES → Review Pattern Combinations
  • NO → Single pattern sufficient

Phase 2A: Select Core Pattern (Predetermined Workflow)

Decision: Sequential or Parallel?

Sequential (Fixed Steps in Sequence):

  • Each step depends on previous → Prompt Chaining
  • Example: outline → write → proofread

Classification (Input Categories Determine Handling):

  • Input can be classified → Routing
  • Example: customer service tickets (refund/technical/complaint)

Parallel (Independent Subtasks):

  • Subtasks are independent → Parallelization (Sectioning)
  • Example: evaluate code for security AND performance simultaneously

Parallel (Same Task Multiple Times):

  • Need consensus/robustness → Parallelization (Voting)
  • Example: security review by multiple specialists

→ Load resources/core-patterns.md for implementation

Phase 2B: Select Dynamic Pattern (Unpredictable Workflow)

Decision: Can you predict subtask count?

Predictable Subtasks:

  • Know what needs doing, not how → Orchestrator-Workers
  • Example: code review (need to analyze, generate, test, document)
  • Example: research task (need search, analysis, synthesis)

Unpredictable Everything:

  • Open-ended exploration → Autonomous Agents
  • Example: solve GitHub issue (steps completely unpredictable)
  • Example: computer use task (many decisions and directions possible)

→ Load resources/dynamic-orchestration.md for implementation

Phase 3: Consider Quality & Refinement

Add Evaluator-Optimizer if:

  • Clear evaluation criteria exist
  • Iteration improves quality
  • First attempts often have fixable issues
  • Quality matters more than speed

Patterns to combine with:

  • Core patterns + Evaluator (refine outputs)
  • Orchestrator + Evaluator (refine each component)
  • Routing + Evaluator (route to different refinement strategies)

→ Load resources/iterative-refinement.md for implementation

Phase 4: Handle Complex Patterns

If combining multiple patterns:

  • Follow decision framework in pattern-combinations.md
  • Start simple; add complexity incrementally
  • Monitor costs at each stage
  • Test edge cases thoroughly

Phase 5: Implement in Your Language

Select language and load examples:

  • Load resources/language-implementation.md
  • Find your language section
  • Adapt examples to your use case
  • Reference tool-design.md for interface best practices

Pattern Selection Heuristics

By Problem Structure

Well-Defined, Fixed Workflow → Core Patterns

  • Use Prompt Chaining or Routing
  • Cost: 1-3x single call
  • Risk: Low

Flexible Workflow, Known Decomposition → Orchestrator-Workers

  • Central planner decomposes dynamically
  • Cost: 3-10x single call
  • Risk: Medium

Open-Ended Exploration → Autonomous Agents

  • Agent decides step by step
  • Cost: 10-100x single call
  • Risk: High (requires sandboxing)

Quality Iteration Important → Evaluator-Optimizer

  • Add to any pattern above
  • Cost: Multiplicative by iterations
  • Benefit: 5-15% quality improvement

Multiple Perspectives Valuable → Pattern Combinations

  • Combine patterns strategically
  • Cost: Depends on combination
  • Benefit: Robustness and comprehensiveness

By Domain

Customer Service → Routing (+ Orchestrator-Workers for complex cases) Content Generation → Prompt Chaining (+ Evaluator-Optimizer) Code Changes → Orchestrator-Workers (decompose, parallelize) Research → Orchestrator-Workers (+ Evaluator-Optimizer) Problem Solving → Autonomous Agents (or Routing by Complexity) Design → Parallel Orchestrators (multiple perspectives)


Usage Workflows

Workflow 1: I Don't Know What Pattern to Use

  1. Describe your problem or use case
  2. I'll ask clarifying questions about:

- Workflow predictability - Input variability - Quality/cost trade-offs - Complexity constraints

  1. I'll recommend appropriate pattern(s)
  2. You choose which resource to deep-dive into

Workflow 2: I Know the Pattern, Need Implementation

  1. Tell me:

- Specific pattern needed - Programming language - Any constraints or requirements

  1. I'll generate:

- Production-ready code - Error handling and best practices - Usage examples - Testing recommendations

Workflow 3: I Need to Combine Multiple Patterns

  1. Describe your requirements
  2. I'll consult pattern-combinations.md
  3. Show you how to orchestrate the combination
  4. Provide integrated implementation

Workflow 4: I Need Tool Interface Design

  1. Describe your tool's purpose
  2. I'll review against best practices in tool-design.md
  3. Suggest improvements using poka-yoke principles
  4. Provide refined tool schema

Resource Navigation Guide

I Want To...Load ThisTimeframe
Understand basic patternscore-patterns.md15 min
Learn dynamic orchestrationdynamic-orchestration.md20 min
Understand iterative refinementiterative-refinement.md15 min
Design tool interfacestool-design.md20 min
Combine multiple patternspattern-combinations.md20 min
Implement in specific languagelanguage-implementation.md20-30 min
Quick reference for all patternsRead this SKILL.md10 min

Core Principles (All Patterns)

  1. Start Simple – Use simplest pattern that meets requirements
  2. Measure Complexity – Only add complexity if demonstrably beneficial
  3. Tool Design First – Invest in tool quality more than prompt engineering
  4. Transparency – Show planning and decisions to enable debugging
  5. Test Rigorously – Especially important for agents in production

Validation Checklist

Before implementing your chosen pattern:

Design Phase:

  • [ ] Workflow complexity justified by requirements
  • [ ] Pattern selection makes sense for problem
  • [ ] Cost implications understood and acceptable
  • [ ] Success metrics defined

Implementation Phase:

  • [ ] Error handling at each step
  • [ ] Tool interfaces follow poka-yoke principles
  • [ ] Stopping conditions defined (especially for agents)
  • [ ] Monitoring and logging planned

Testing Phase:

  • [ ] Happy path tested thoroughly
  • [ ] Edge cases identified and handled
  • [ ] Cost tracking implemented
  • [ ] Production readiness verified

Key Files Reference

FilePurposeLinesRead When
SKILL.md (this file)Orchestration hub and decision guide280First (overview)
resources/augmented-llm.mdThe foundational building block300+Before any pattern
resources/core-patterns.mdPrompt Chaining, Routing, Parallelization350+Need basic patterns
resources/dynamic-orchestration.mdOrchestrator-Workers, Autonomous Agents400+Need dynamic patterns
resources/iterative-refinement.mdEvaluator-Optimizer pattern350+Need quality iteration
resources/tool-design.mdTool interface design and optimization560+Designing tools
resources/pattern-combinations.mdComplex multi-pattern workflows400+Combining patterns
resources/language-implementation.mdLanguage-specific code examples450+Need implementation
resources/patterns-reference.mdOriginal comprehensive reference500+Deep dive reference

Examples

Example 1: Customer Support System

Use Case: Support tickets routed to appropriate handlers

Solution:

  1. Route by category (routing pattern)
  2. Different handlers for each type:

- General → FAQ lookup (prompt chaining) - Refunds → Policy check + response generation (prompt chaining) - Technical → Diagnosis → Solution search → Response (orchestrator-workers)

Resources to load:

  1. Start: core-patterns.md (routing)
  2. Then: pattern-combinations.md (routing + chaining combination)
  3. Finally: language-implementation.md (your language)

Example 2: High-Quality Content Generation

Use Case: Marketing copy that meets strict quality criteria

Solution:

  1. Generator creates content (simple LLM call)
  2. Evaluator checks against criteria
  3. If not passing: Generator refines based on feedback
  4. Iterate until criteria met

Resources to load:

  1. Start: iterative-refinement.md (evaluator-optimizer)
  2. Then: language-implementation.md (your language)

Example 3: Complex Code Changes

Use Case: Handle multi-file code modifications

Solution:

  1. Orchestrator analyzes requirements
  2. Workers decompose into: analyze codebase → generate code → write tests → document
  3. All workers run in parallel
  4. Orchestrator synthesizes into coherent changeset
  5. Evaluator validates functionality

Resources to load:

  1. Start: dynamic-orchestration.md (orchestrator-workers)
  2. Then: pattern-combinations.md (orchestrator + evaluation)
  3. Then: tool-design.md (design tools for code modification)
  4. Finally: language-implementation.md (your language)

Next Steps

  1. Identify Your Task Type → Use Quick Reference table above
  2. Load Appropriate Resource → Read focused guide (15-30 min)
  3. Choose Implementation Language → Load language examples
  4. Start with Simple Version → Add complexity only if needed
  5. Iterate and Test → Measure quality and cost continuously

Version History

  • 2.0 - Refactored to modular orchestration pattern with focused resource files
  • 1.0 - Original monolithic skill with all patterns in one document

平台分布

Claude Code

31.09%
按下载量换算105

OpenCode

24.42%
按下载量换算83

Codex

17.75%
按下载量换算60

Antigravity

11.89%
按下载量换算40

windsurf

7.09%
按下载量换算24

trae

3.84%
按下载量换算13

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills