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

write-agent写 Agent

Agent Skill

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

总安装

1,236

周安装

50

GitHub Stars

10

下载量

388
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/inkeep/team-skills --skill write-agent

简介

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

  • 适用于需要根据关键词或任务场景从来源线索中获取信息的场景。
  • 可通过 npx skills add 命令安装并使用,具体用法需结合原始 README 进一步确认。
  • 安装前建议确认权限范围和维护状态,注意是否触发联网或文件读写操作。
  • 建议在使用前核验来源仓库内容,确保功能与预期一致。

SKILL.md

Write Agent Skill

Design agents that are focused, safe, and reliable without over-constraining them.

Key principle: treat tokens and attention as a shared budget. Prefer small, high-signal prompts plus strong *output contracts* over long prose.


How this skill uses supporting files

This skill includes optional supporting material in references/ and templates/.

  • When a workflow step says Load: path/to/file.md, open that file before continuing.
  • If you feel uncertain about a decision point, jump to the Reference Index at the end to find the right deep-dive.
  • Templates are starting points to customize, not rigid formats.

For non-trivial agent design: Consider reading all files in this skill folder before starting. Partial context can lead to inconsistent agents or missed patterns. This is especially valuable when designing orchestrators, updating existing agents, or working in an unfamiliar domain.


Operating Principles (for the agent designer)

These principles guide *you* as you write agent prompts:

  1. Treat attention as scarce. The model's attention is O(n²) with context length. Every token competes for attention with every other token. Front-load critical instructions; move reference material to references/ files loaded on demand.
  2. Optimize for reliability, not elegance. If a step is fragile or easy to mess up, add guardrails: a checklist, a validation loop, a "do X, not Y" constraint. Don't rely on the model inferring correct behavior.
  3. Default to one strong path, with escape hatches. Provide a recommended default workflow. If alternatives exist, name them explicitly, but avoid option overload.
  4. Write for execution. Use clear imperatives: "Do X. Then do Y." Avoid vague admonitions ("be careful", "be thorough") without concrete steps or outputs.
  5. Match certainty to expression. Use "must" / "never" for hard requirements. Use "should" / "prefer" for strong defaults with exceptions. Use "consider" / "may" for suggestions. The agent parses this calibration.
  6. Make agent prompts standalone. Assume a first-time reader with zero context. Don't rely on the agent inferring from prior conversation or parent state. For subagents specifically: don't reference other agents by name — write each as if it's the only agent that exists. (Orchestrators are the exception; they coordinate subagents by design.) If a subagent needs orchestration context, the parent passes it via handoff, not in the permanent prompt.
  7. Use positive and negative framing appropriately. For routine guidance, positive framing ("Do X") is often clearer than prohibition ("Don't do Y"). But negatives are a valid, complementary tool — especially for exclusions, failure modes, and boundary definitions. When using negatives, make them concrete (not vague), pair with contrastive examples where helpful, and position critical constraints at section boundaries. See references/prompt-structure.md for technique details.

What to Produce When This Skill Is Used

When asked to "create an agent" / "write a subagent" / "make a reviewer" / "make an orchestrator":

  1. Agent Brief (concise) — include assumptions if needed.
  2. A ready-to-paste agent file (.claude/agents/<name>.md).

- If it's a subagent: single-purpose executor/reviewer. - If it's a workflow orchestrator: multi-phase coordinator that uses the Task tool to spawn subagents.

  1. Optional companion artifacts (only if they materially help):

- A skill (reusable workflow/knowledge) - An output contract skill (shared schema for orchestrator aggregation — e.g., all reviewers preload pr-review-output-contract) - A CLAUDE.md /.claude/rules addition (always-on constraints) - A hook (for conditional tool gating / quality gates)

Keep explanation short. Prioritize concrete artifacts (files, templates, checklists).

Workflow

Create workflow tasks (first action)

Before starting any work, create a task for each step using TaskCreate with addBlockedBy to enforce ordering. Derive descriptions and completion criteria from each step's own workflow text.

  1. Write-agent: Route request and build agent brief
  2. Write-agent: Decide mechanism and strictness
  3. Write-agent: Author config and write system prompt
  4. Write-agent: Design handoff and add guardrails

Mark each task in_progress when starting and completed when its step's exit criteria are met. On re-entry, check TaskList first and resume from the first non-completed task.


0) Identify the request type

Determine which you're doing:

  • Create a new agent from scratch → continue with Steps 1–8 below
  • Update/refactor an existing agent → Load: references/updating-existing-agents.md and follow that procedure

If updating/refactoring an existing agent:

Critical: Before proceeding with any update work, you must complete Step 0: Full context loading from that file. This means reading:

  1. Every file in the write-agent/ folder (SKILL.md + all references/ + all templates/ + all scripts/)
  2. Every file related to the target agent (the agent file + any supporting files)
  3. Any orchestrators that spawn this agent (if applicable)

Do not skip this step. Partial context loading is the primary cause of routing drift, capability creep, and broken output contracts during updates.


1) Choose the agent pattern: subagent vs workflow orchestrator

Quick gate: If you're unsure whether an agent is the right mechanism at all (vs a skill or CLAUDE.md rule), jump to Step 3 first. Otherwise, pick the lightest agent pattern that fits:

NeedChoosePractical effect
One job, one output (review, implement, diagnose, summarize)SubagentSimple scope, easier to validate; usually no Task tool
Multi-phase workflow (research → plan → implement → judge → iterate)Workflow orchestratorNeeds Task tool; coordinates phases, dispatches subagents, aggregates results
Isolation for a single task, but no multi-phase orchestrationSubagent (or a context: fork skill — ⚠️ unreliable for plugins, see Step 3 notes)Avoid writing orchestration logic unless needed

Hard constraint: Subagents cannot spawn other subagents. So a workflow orchestrator must run as the top-level session agent (e.g., claude --agent feature-development …), not as a Task-spawned subagent.

CLI invocation note: Agents can be invoked directly via claude --agent <name> (interactive) or claude --agent <name> -p "prompt" (non-interactive). For spawning Claude Code subprocesses from within a running session (e.g., iteration loops), use the env -u CLAUDECODE -u CLAUDE_CODE_ENTRYPOINT claude -p... pattern — this bypasses the nesting guard. Always set --dangerously-skip-permissions on subprocesses. See references/claude-code-mechanics.md for the full invocation reference including multi-level nesting.

Templates:

  • Subagents: templates/subagent-template.md, templates/subagent-reviewer-template.md, templates/subagent-worker-template.md
  • Orchestrators: templates/workflow-orchestrator-template.md
  • Deep guidance: references/workflow-orchestrators.md

2) Build an Agent Brief (fast, minimal)

Fill these fields. Ask questions only if missing info is *blocking*; otherwise assume sensible defaults and label them.

  • Pattern: Subagent | Workflow orchestrator
  • Job-to-be-done: What should it reliably accomplish?
  • Delegation triggers: What should cause Claude to use it?
  • Inputs: What context/files will it need? What can it assume is available?
  • Outputs: What format, audience, and verbosity?
  • Quality bar: What makes an output "done" vs "needs revision"?
  • Constraints: Hard rules (must/never) vs soft guidance (should/could)
  • Tools & permissions: Least-privilege tool access; permission mode choice
  • Model choice: Cost/speed vs reasoning needs
  • Failure strategy: When to ask vs proceed with assumptions

If it's a workflow orchestrator, also capture: phases, subagent roster, artifact strategy, quality gates, and iteration policy.

Load: references/workflow-orchestrators.md for the full orchestrator checklist.

If useful, copy/paste the brief template from references/prompt-structure.md.

Default starting point: Pick the closest template under templates/ and fill every [TODO] before you return the agent file.

Clarification strategy (when gathering info for the brief)

Use this decision table to reduce both under-asking and over-asking:

SituationDo
Missing info that affects routing (delegation triggers), tool power, side effects, or compatibilityAsk 1-3 targeted questions before drafting.
User says "whatever you think is best" / signals indifferenceProvide a specific recommendation plus 1-2 alternatives, then confirm the non-trivial choice.
Details are low-stakes and reversible (example wording, minor section names)Use sensible defaults; list assumptions briefly so the user can correct if needed.

Question design (when you need human input):

  • Offer 2-4 clearly labeled options (not 5+, which creates decision fatigue).
  • Put your recommended option first and label it "(Recommended)" with a 1-sentence rationale.
  • Include "Other" when your options might not cover reality.
  • Frame questions around what changes based on the answer, not abstract preferences.

If you proceed with assumptions, label them as Assumptions: so they're easy to spot and correct.

3) Decide: agent vs skill vs always-on rules

Choose the *lightest* mechanism that reliably achieves the goal.

If you need…PreferWhy
Always-on repo constraints (commands, conventions, non-negotiables)CLAUDE.md /.claude/rulesApplied everywhere; no routing needed
Reusable instructions that should run in the main conversation contextSkillReuse without context isolation; easy to invoke interactively
A single specialized worker/reviewer with tool restrictionsSubagentIsolated context + least-privilege tools
A multi-phase pipeline that coordinates other agentsWorkflow orchestratorEncodes phase order, dispatch, aggregation, iteration

Notes:

  • Subagents cannot spawn other subagents. If you need multi-step specialization, orchestration must live in the top-level agent/session.
  • If you want a reusable workflow that runs "out of band", prefer: ⚠️ context: fork is unreliable (Issue #16803 — OPEN). Skills frequently run inline instead of forking, especially plugin skills (95%+ failure rate reported). If you need reliable isolation, use the Agent tool + Skill load pattern instead: spawn a general-purpose subagent and start its prompt with "Before doing anything, load /skill-name". The subagent loads the skill via its Skill tool and executes in isolation.

- a skill with context: fork, or - a workflow orchestrator agent invoked as the session agent.

4) Pick the right strictness level (the "Goldilocks zone")

Agent prompts should hit the right altitude — specific enough to guide, general enough to generalize:

Failure modeSymptomExample
Too rigidBrittle enumeration; breaks on unexpected inputs"If.ts do X. If.tsx do Y. If.js do Z..."
Too vagueAbstract principles without concrete signals"Be helpful and thorough."
Just rightHeuristics that generalize + clear escalation"Prioritize correctness over style. When uncertain, ask."

Map task characteristics to strictness:

  • High freedom: heuristics + output contract (reviews, audits, brainstorming)
  • Medium: step sequence + required checks (refactors, migrations)
  • Low: scripts/commands + strict validation loops (fragile ops)

5) Author the agent configuration (frontmatter)

Set (verify each is present before moving on):

  • name: stable, hyphen-case, descriptive
  • description: concrete triggers + examples; avoid over-broad routing
  • tools / disallowedTools: least privilege
  • permissionMode: default unless you have a reason
  • model: haiku/sonnet/opus/inherit (choose intentionally)
  • skills: preload needed skills explicitly (don't assume inheritance)

CRITICAL: routing uses <example> blocks. Include 2–4 <example> blocks with <commentary> that teaches *why* delegation should (or should not) happen.

Subagents (recommended defaults):

  • Do not include the Task tool (no nested spawning).
  • Preload domain skills they use to judge/implement (e.g., skills: [write-docs]).
  • Strong output contract so an orchestrator can aggregate reliably.

Workflow orchestrators (recommended defaults):

  • Include the Task tool (plus minimum tools for repo inspection).
  • Do not assume spawned subagents inherit your skills: (they do not).
  • See references/workflow-orchestrators.md for dispatch, aggregation, and iteration patterns.

Minimal pattern (copy/paste and customize):

---
name: my-agent
description: Use this agent when <trigger conditions>. Avoid using it when <exclusions>.

<example>
Context: <situation that SHOULD delegate>
user: "<user message>"
assistant: "<assistant response before delegating>"
<commentary>
Why this matches the trigger conditions.
</commentary>
assistant: "I'll use the my-agent agent to…"
</example>

<example>
Context: <near-miss that SHOULD NOT delegate>
user: "<user message>"
assistant: "<assistant response that stays in the main thread>"
<commentary>
Why this is a near-miss / exclusion.
</commentary>
assistant: "<continue without delegating>"
</example>

# Optional:
# tools: Read, Grep
# model: sonnet
# permissionMode: default
---

# My Agent
...

Load: references/claude-code-mechanics.md for subagent constraints, permission modes, and skills composition patterns.

6) Write the system prompt body

Use a structure that optimizes for correct execution:

  1. Role & mission (2–4 sentences) — includes personality statement
  2. Scope and non-goals (avoid accidental overreach)
  3. Operating principles (directness vs suggestions)
  4. Workflow checklist (copy/paste-able)
  5. Tool-use policy (what to read/grep/run; how to keep noise down)
  6. Output contract (exact headings; verbosity limits; evidence expectations)
  7. Handoff protocol (what to pass to subagents; what to return)
  8. Questions/escalation (when to ask; when to proceed)

Writing the Role & mission section:

The Role & mission sets the agent's identity and judgment frame. It should:

  • Declare what excellence looks like for this role (not just what it does)
  • Describe behaviors the best humans in this role would exhibit
  • Avoid escape hatches that could license poor judgment

Load: references/personality-and-intent.md for patterns on writing effective personality statements.

Quick guidance:

  • ✅ "You catch the issues that matter most — correctness, security, data integrity"
  • ✅ "You focus on high-impact areas over cosmetic nitpicks" (safe tradeoff: nitpicks are anti-pattern)
  • ❌ "You ship working code over perfect code" (risky: "perfect code" isn't an anti-pattern)
  • ❌ "You are pragmatic and fast" (vague; can excuse poor work)

Orchestrator additions: If writing a workflow orchestrator, add explicit sections for phase plan, dispatch rules, aggregation rules, iteration policy, and artifact passing. See references/workflow-orchestrators.md and references/prompt-structure.md.

Style constraint: Write in second person ("You are…", "Do…"). Avoid first-person commitments ("I will edit files…") unless the agent is allowed and expected to do so.

Including failure mode awareness:

Good agent prompts don't just say what to do — they explicitly name the failure modes most likely to occur given the agent's task. This gives the agent self-correction targets.

Load: references/failure-modes.md for the full catalog of common LLM failure modes.

Include failure modes either:

  • As a dedicated "Failure modes to avoid" section (explicit, scannable), OR
  • Woven into operating principles ("Do X. Avoid the tendency to Y.")

Pick the 3-5 most relevant for the agent's context — don't include all of them.

Quick selection guide:

Agent typeCommonly relevant
ReviewerFlattening nuance, Source authority, Asserting when uncertain, Padding/burying lede
ImplementerPlowing through ambiguity, Downstream effects, Instruction rigidity, Assuming intent
OrchestratorPlowing through ambiguity, Never escalating, Assuming intent, Over-indexing on recency

The interpretation test (run on every instruction):

Before finalizing the prompt, verify each instruction passes these four checks:

  1. Could this be read two ways? — If yes, add a clarifying example or "do X, not Y" constraint.
  2. Does this assume context the reader won't have? — Agent prompts should be standalone; make implicit assumptions explicit.
  3. Would a different model or instance interpret this the same way? — If you're relying on a specific interpretation that isn't explicit, make it explicit.
  4. Is the directive strength clear? — Distinguish "must" (non-negotiable) from "should" (strong default) from "consider" (suggestion). Don't use vague "be careful" language.

Don't draft loosely and fix later — tighten language as you write.

Load: references/prompt-structure.md for the full prompt section breakdown.

Prompting technique notes:

  • Few-shot examples: 2–3 well-chosen examples outperform more. Order matters: place the most representative example last (recency effect). One weak example degrades all examples.
  • Positive framing: See Operating Principle #7. When possible, reframe "Don't respond when uncertain" as "Respond only when confident."
  • Effective negatives: Negative instructions work well when supported correctly. Use contrastive examples (incorrect vs correct), make constraints concrete (not vague), and position critical constraints at section boundaries. Note: caps/bold emphasis does NOT help — use structural techniques instead. See references/prompt-structure.md for details.

7) Design bi-directional context handoff

Subagents start "fresh," so don't rely on them remembering the parent chat.

  • Parent/orchestrator → subagent: provide a handoff packet (goal, constraints, target files, what "good" looks like).
  • Subagent → parent/orchestrator: return a return packet (TL;DR, findings, evidence, next actions, open questions).

Orchestrator artifact rule of thumb:

  • If a phase output is small (< ~2–3 KB), pass it forward in the next handoff packet.
  • If a phase output is large (plans, research notes, many findings), write it to a file and pass the path forward. This prevents token bloat and enables resume/fork workflows.

Error retention: When a subagent action fails, keep the failed action and error in the handoff context. This enables implicit belief updating — the agent learns what doesn't work without explicit "don't do X" instructions. Summarize patterns if errors accumulate, but don't strip them entirely.

Load: references/handoff-protocol.md for packet templates and iteration patterns.

8) Add guardrails that pay for themselves

Prefer guardrails that are:

  • Observable (checklists, validations, concrete criteria)
  • Specific ("run X and report Y")
  • Low-cost (don't burn tokens on generic admonitions)

Avoid:

  • huge encyclopedic prompts,
  • many parallel options with no default,
  • vague "be careful" language without steps or outputs.

Quality bar

Before returning an agent file, confirm:

  • Frontmatter includes: name, description with 2–4 <example> blocks, and the intended tools/disallowedTools.
  • description is neither too broad nor too narrow; examples include at least one near-miss exclusion.
  • Role & mission describes what excellence looks like (not just what it does); no risky escape hatches.
  • Failure modes: 3-5 contextually relevant failure modes are addressed (dedicated section or woven into principles).
  • Instructions pass the interpretation test: no ambiguous phrasing; no assumed context; explicit "do X, not Y" where needed; directive strength is clear.
  • Prompt body includes: mission, scope/non-goals, workflow, tool policy, output contract, and escalation rules.
  • Handoff + return packet formats are explicit (or referenced).

If workflow orchestrator, also confirm:

  • Includes phase plan, dispatch rules, aggregation rules, and iteration policy.
  • Acknowledges no-nesting constraint (must run as top-level session agent).

Designer self-check (before delivering):

  • Did I write any instruction that could be read two ways in a different context?
  • Did I assume context the agent won't have?
  • Are there places where I used vague language ("be careful", "be thorough") instead of concrete steps?
  • Did I mix up directive strengths (using "should" where I meant "must", or vice versa)?

If any answer is "yes," fix before delivering. Most agent underperformance traces to designer errors, not model limitations.

Implementation Output Format

When emitting files, output them like this (paths + code blocks):

  • path/to/file.md
  • (contents in a fenced code block)

Do not embed additional markdown prose inside the file unless it's part of the file's content.


Reference Index

This index helps you quickly find the right deep-dive. In the main workflow, follow the Load: pointers.

Priority legend:

  • P0 = must for correctness/reliability
  • P1 = improves quality and consistency
  • P2 = optional depth

References

PathPriorityUse whenImpact if skipped
references/updating-existing-agents.mdP0"Update" or "refactor" requests for existing agentsIntent drift; broken routing; capability creep; downstream orchestrator failures
references/claude-code-mechanics.mdP0Configuring frontmatter, understanding constraints, permissions, composition, CLI invocation patterns (--agent, -p, --resume), and recursive invocation limitsBroken routing, permission errors, failed spawning, blocked recursive calls
references/prompt-structure.mdP0Structuring the system prompt body; writing Role & mission, tool policies, output contractsMissed steps, inconsistent outputs, unclear escalation
references/failure-modes.mdP1Selecting which failure modes to guard against for this agent typeAgents exhibit predictable LLM blind spots
references/personality-and-intent.mdP1Writing effective Role & mission statements; avoiding escape hatchesVague identity, risky tradeoff framing
references/workflow-orchestrators.mdP1Designing multi-phase orchestrators; dispatch, aggregation, iterationOrchestrator missing key coordination patterns
references/handoff-protocol.mdP1Designing handoff packets; structuring return packets; multi-phase chainingSubagents lack needed context or return unusable results
references/evaluation-and-iteration.mdP1Tuning delegation behavior; debugging over/under-triggeringAgents stay miscalibrated
references/procedural-patterns.mdP2Writing validation loops, iteration policies, or error handlingAgents may infinite-loop, skip validation, or fail ungracefully
references/designer-failure-modes.mdP2Debugging agent underperformance; reviewing prompts before deliveryBlame model for designer errors

Templates

PathUse when
templates/subagent-template.mdStarting a generic subagent
templates/subagent-reviewer-template.mdRead-only reviewer (disallows Write/Edit)
templates/subagent-worker-template.mdImplementation-focused worker
templates/workflow-orchestrator-template.mdMulti-phase orchestrator (uses Task tool)
templates/skill-fork-template.mdSkill that runs in a forked subagent context

Scripts

PathPurpose
scripts/validate-agent.shValidate agent file structure; catches missing name/description and warns on missing <example> blocks

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.91%
按下载量换算143

Claude

30.14%
按下载量换算117

Cursor

20.15%
按下载量换算78

Gemini CLI

9.02%
按下载量换算35

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

执行命令

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

安装前确认

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

来源信息

继续浏览同类 Skills