Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

agent-patternsAgent 模式

Agent Skill

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

总安装

955

周安装

39

GitHub Stars

10

下载量

306
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/oakoss/agent-skills --skill agent-patterns

简介

agent-patterns 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 它支持根据关键词、任务场景或来源线索进行信息检索,帮助 Agent 高效获取所需资料。
  • 可通过 npx skills add 命令从指定仓库安装并使用该技能。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Agent Patterns

Multi-agent design, delegation, and orchestration in Claude Code and AI-assisted development. Default to fungible agents for large-scale software dev; use specialized agents only for peer review or discourse-based workflows.

Subagents in Claude Code are specialized AI assistants that run in isolated context windows with custom system prompts, specific tool access, and independent permissions. They preserve main conversation context by keeping exploration, test runs, and verbose operations out of the primary thread.

Key constraint: subagents cannot spawn other subagents. Multi-step orchestration requires chaining subagents from the main conversation.

Quick Reference

PatternDescriptionWhen to Use
Fungible swarmIdentical agents pick tasks from a shared boardLarge-scale software dev, resilient systems
Sequential pipelineEach agent builds on previous outputMulti-step workflows with clear dependencies
HierarchicalManager decomposes, workers execute in parallelComplex tasks with independent subtasks
Peer collaborationAgents iterate until consensusCode review, quality-critical outputs
Orchestrator delegationMain conversation chains subagentsMulti-phase workflows, parallel specialists
Two-stage reviewSpec compliance check, then code quality checkHigh-stakes code, complex requirements
Question-first delegationAgent asks clarifying questions before proceedingAmbiguous tasks, expensive-to-redo work
Review loop enforcementFix-review cycle with max iteration escalationAny review workflow needing convergence
Built-in SubagentModelToolsPurpose
ExploreHaikuRead-onlyFile discovery, code search, codebase exploration
PlanInheritsRead-onlyCodebase research during plan mode
General-purposeInheritsAll toolsComplex research, multi-step operations
BashInheritsTerminalRunning terminal commands in separate context
Claude Code GuideHaikuRead-onlyAnswering questions about Claude Code features
ConfigurationValue
Custom agent location.claude/agents/*.md (project), ~/.claude/agents/*.md (user)
CLI agents--agents '{...}' (session only, JSON format)
Plugin agentsPlugin agents/ directory (lowest priority)
Required fieldsname, description
Optional fieldstools, disallowedTools, model, permissionMode, skills, hooks, color
Model valuessonnet, opus, haiku, inherit (default)
Permission modesdefault, acceptEdits, dontAsk, bypassPermissions, plan
Nesting limitSubagents cannot spawn other subagents (one level only)
Foreground vs backgroundForeground blocks main conversation; background runs concurrently
Batch size5-8 items per agent (standard tasks)
Parallel agents2-4 simultaneously

When to Use Subagents vs Main Conversation

Use Subagents WhenUse Main Conversation When
Task produces verbose output (test suites, logs, API responses)Task needs frequent back-and-forth or iterative refinement
Enforcing specific tool restrictions or permissionsMultiple phases share significant context
Work is self-contained and can return a summaryMaking a quick, targeted change
Parallel independent research pathsLatency matters (subagents start fresh and gather context)

Tool Access Patterns

Agent RoleRecommended ToolsRationale
Read-only reviewerRead, Grep, GlobCannot modify code; safe for audits
File creatorRead, Write, Edit, Glob, GrepNO Bash; avoids heredoc approval spam
Script runnerRead, Write, Edit, Glob, Grep, BashFull access for build/deploy tasks
Research agentRead, Grep, Glob, WebFetch, WebSearchExternal data access for documentation lookup

Subagents inherit all tools by default (including MCP tools). Use tools as an allowlist or disallowedTools as a denylist to restrict access. MCP tools are not available in background subagents.

Common Mistakes

MistakeCorrect Pattern
Expecting subagents to spawn sub-subagentsSubagents cannot nest; chain subagents from the main conversation instead
Giving Bash tool to agents that only create filesUse Write and Edit tools only; Bash causes approval spam from heredoc usage
Omitting disallowedTools for sensitive operationsUse disallowedTools to explicitly deny dangerous tools even when inheriting
Spawning too many agents (5+) for a small taskStart with 2-3 agents; coordination overhead outweighs benefit at higher counts
Burying critical instructions past line 300 of agent promptPut critical rules immediately after frontmatter; models deprioritize late instructions
Using specialized agents for large-scale software devUse fungible agents with a shared task board; specialized agents create single points of failure
Not including "FIX issues found" in delegation promptsWithout explicit action directive, agents only report problems without making changes
Setting model to Haiku for content generationDefault to Sonnet; Haiku only for script execution, fast lookups, or pass/fail checks
Not writing clear descriptions for custom agentsClaude uses the description field to decide when to auto-delegate; vague descriptions prevent delegation
Using MCP tools in background subagentsMCP tools are not available in background subagents; run in foreground instead
Not preloading skills into subagentsSubagents do not inherit skills from the parent; list them explicitly in the skills field

Delegation

  • Explore codebase before designing agent prompts: Claude auto-delegates to the built-in Explore subagent (Haiku, read-only) for file discovery and code search; supports quick, medium, and very thorough modes
  • Plan multi-agent architecture for complex projects: Use plan mode; Claude delegates research to the Plan subagent before presenting a plan
  • Execute batch operations across many files: Chain General-purpose subagents from the main conversation with identical prompts and non-overlapping item lists
  • Isolate high-volume operations: Delegate test runs, log processing, or doc fetching to subagents to keep verbose output out of your main context
  • Run parallel research: Spawn multiple subagents simultaneously for independent investigations; Claude synthesizes findings when all complete
  • Resume interrupted work: Ask Claude to continue a previous subagent; resumed agents retain full conversation history including tool calls and reasoning
For project-level workflow sequencing, phase-gate validation, goal decomposition, and capability scoring, use the orchestration skill.

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.95%
按下载量换算104

Claude

29.72%
按下载量换算91

Cursor

17.8%
按下载量换算54

Gemini CLI

9.97%
按下载量换算31

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/oakoss/agent-skills --skill agent-patterns 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills