agent-spec

GitHub

用于在构建AI智能体前定义其规范,明确目标、工具权限、控制循环及护栏。确保权限显式化,区分可逆与不可逆操作,设定人类审批节点、预算限制及失败处理机制,优先保障安全而非智能性。

skills/agent-spec/SKILL.md mohitagw15856/pm-claude-skills

Trigger Scenarios

设计AI智能体 定义智能体工具和护栏 编写智能体规格说明书或PRD

Install

npx skills add mohitagw15856/pm-claude-skills --skill agent-spec -g -y
More Options

Use without installing

npx skills use mohitagw15856/pm-claude-skills@agent-spec

指定 Agent (Claude Code)

npx skills add mohitagw15856/pm-claude-skills --skill agent-spec -a claude-code -g -y

安装 repo 全部 skill

npx skills add mohitagw15856/pm-claude-skills --all -g -y

预览 repo 内 skill

npx skills add mohitagw15856/pm-claude-skills --list

SKILL.md

Frontmatter
{
    "name": "agent-spec",
    "description": "Specify an autonomous or tool-using AI agent before building it. Use when asked to design an AI agent, define an agent's tools and guardrails, scope what an agent is allowed to do, or write an agent spec\/PRD. Produces an agent spec — goal & scope, tools with permissions, the control loop, guardrails & approval gates, memory, escalation\/handoff, evaluation, and failure handling."
}

Agent Spec Skill

An agent is a model plus tools plus a loop — and the danger lives in the tools and the loop, not the model. This skill specifies an agent so its authority is explicit: what it can do, what needs a human yes, and what happens when it's wrong. Scope and guardrails first; cleverness second.

Required Inputs

Ask for these only if they aren't already provided:

  • Job to be done — the outcome the agent owns, and the boundary of its authority.
  • Tools/actions — what it can call (read APIs, write actions, code execution), and which are irreversible.
  • Autonomy level — fully autonomous, propose-then-approve, or co-pilot.
  • Risk surface — what's the worst thing a wrong action could do (spend money, send a message, delete data)?
  • Success definition & escalation — how "done" is judged, and when it must hand off to a human.

Output Format

Agent Spec: [name]

1. Goal & scope — the job in one sentence; explicit non-goals and authority limits.

2. Tools / actions — a table; mark each action's reversibility and required permission.

Tool Purpose Reversible? Gate
search_kb read context yes none
send_email notify no human approval

3. Control loop — plan → act → observe → reflect; the stopping condition; and a hard max-steps / max-cost budget so it can't loop forever.

4. Guardrails & approval gates — which actions require a human yes (default: anything irreversible, outbound, or spending), input/output validation, and allow/deny lists. Pair irreversible actions with a dry-run preview (see action-runner).

5. Memory & state — what it remembers within a task vs. across tasks, and where (link a professional-brain for durable memory).

6. Escalation & handoff — the triggers that stop the agent and route to a human (low confidence, repeated failure, out-of-scope request, high-risk action).

7. Evaluation — task success rate, action correctness, and safety (false-action rate). Define with an ai-eval-plan, and test on adversarial/trap tasks.

8. Failure handling — timeouts, tool errors, hallucinated tool calls, and the safe default (stop and ask, never guess on a high-risk action).

Quality Checks

  • Every tool is marked reversible/irreversible, and every irreversible action has a human gate
  • There is a hard max-steps and max-cost budget — the loop cannot run unbounded
  • Escalation triggers are explicit (confidence, repeated failure, out-of-scope, high-risk)
  • The safe default on uncertainty is "stop and ask", not "guess and act"
  • Evaluation includes a safety metric (wrong/unauthorised actions), not just task success
  • Non-goals and authority limits are stated, not implied

Anti-Patterns

  • Do not give an agent irreversible actions without an approval gate — autonomy and irreversibility together is how agents cause real damage
  • Do not omit a step/cost budget — an agent that can loop is an agent that can rack up cost or thrash forever
  • Do not measure only task success — an agent that completes the task by taking a wrong action has failed
  • Do not let the agent invent tool calls or arguments — validate against the schema and fail safe
  • Do not skip the "what's the worst case" analysis — the risk surface determines how many guardrails you need

Based On

Tool-using / agentic design practice — bounded control loops, least-privilege tools, human-in-the-loop approval, and safety evaluation.

Version History

  • a38bc30 Current 2026-07-05 11:29

Same Skill Collection

exports/openclaw/360-feedback-template/SKILL.md
exports/openclaw/401k-plan-decoder/SKILL.md
exports/openclaw/ab-test-planner/SKILL.md
exports/openclaw/ab-test-readout/SKILL.md
exports/openclaw/accessibility-audit/SKILL.md
exports/openclaw/account-plan/SKILL.md
exports/openclaw/acquirer-red-team/SKILL.md
exports/openclaw/ad-copy/SKILL.md
exports/openclaw/aeo-optimizer/SKILL.md
exports/openclaw/agenda-or-cancel/SKILL.md
exports/openclaw/agent-design-review/SKILL.md
exports/openclaw/agent-observability-spec/SKILL.md
exports/openclaw/agent-spec/SKILL.md
exports/openclaw/ai-ethics-review/SKILL.md
exports/openclaw/ai-eval-plan/SKILL.md
exports/openclaw/ai-feature-prd/SKILL.md
exports/openclaw/ai-product-canvas/SKILL.md
exports/openclaw/air-quality/SKILL.md
exports/openclaw/altitude-shifter/SKILL.md
exports/openclaw/ambiguity-resolver/SKILL.md
exports/openclaw/analyst-relations-brief/SKILL.md
exports/openclaw/announcement-card/SKILL.md
exports/openclaw/api-docs-writer/SKILL.md
exports/openclaw/api-test-plan/SKILL.md
exports/openclaw/api-versioning-strategy/SKILL.md
exports/openclaw/apology-letter/SKILL.md
exports/openclaw/architecture-decision-record/SKILL.md
exports/openclaw/architecture-diagram/SKILL.md
exports/openclaw/archive-strategy/SKILL.md
exports/openclaw/assumption-bounty/SKILL.md
exports/openclaw/assumption-mapper/SKILL.md
exports/openclaw/async-update-format/SKILL.md
exports/openclaw/auto-repair-estimate-decoder/SKILL.md
exports/openclaw/autopilot-charter/SKILL.md
exports/openclaw/benefits-decoder/SKILL.md
exports/openclaw/bid-tender-review/SKILL.md
exports/openclaw/board-deck-narrative/SKILL.md
exports/openclaw/board-minutes/SKILL.md
exports/openclaw/board-pre-read/SKILL.md
exports/openclaw/bom-cost-review/SKILL.md
exports/openclaw/bookkeeping-categorization/SKILL.md
exports/openclaw/boolean-search-builder/SKILL.md
exports/openclaw/brag-doc/SKILL.md
exports/openclaw/brainstorming/SKILL.md
exports/openclaw/brief-builder/SKILL.md
exports/openclaw/briefing-note/SKILL.md
exports/openclaw/budget-builder/SKILL.md
exports/openclaw/budget-variance-analysis/SKILL.md
exports/openclaw/bug-diagnosis/SKILL.md
exports/openclaw/bug-report/SKILL.md

Metadata

Files
0
Version
471c606
Hash
dea49279
Indexed
2026-07-05 11:29

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-30 21:48
浙ICP备14020137号-1 $방문자$