Agent审查
- 作者仓库星标 3,406
- 作者更新于 实时读取
- 作者仓库 claude-octopus
- 领域
- 工程开发
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @nyldn · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-intent-contract
description: Lock in user goals upfront and validate outputs against them — use to prevent scope drift The in…
category: 工程开发
runtime: Node.js
---
# skill-intent-contract 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Purpose / Intent Contract Structure / Job Statement”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Purpose / Intent Contract Structure / Job Statement”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/octo` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Purpose / Intent Contract Structure / Job Statement”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: skill-intent-contract
description: Lock in user goals upfront and validate outputs against them — use to prevent scope drift The in…
category: 工程开发
source: nyldn/claude-octopus
---
# skill-intent-contract
## 什么时候使用
- 把工程方向的常用动作沉淀成 Agent 可调用的技能 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Purpose / Intent Contract Structure / Job Statement」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "skill-intent-contract" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Purpose / Intent Contract Structure / Job Statement
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Node.js | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Host: Codex CLI — This skill was designed for Claude Code and adapted for Codex. Cross-reference commands use installed skill names in Codex rather than
/octo:*slash commands. Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it. For host tool equivalents, seeskills/blocks/codex-host-adapter.md.
Intent Contract System
Purpose
The intent contract creates a persistent record of user intent that:
- Captures what the user is trying to accomplish
- Defines success criteria upfront
- Establishes boundaries and constraints
- Travels through the entire workflow
- Validates final outputs against original intent
This closes the loop between intention and delivery.
Intent Contract Structure
The intent contract is stored in .claude/session-intent.md and follows this format:
# Intent Contract
**Created**: [ISO timestamp]
**Workflow**: [discover/embrace/review/etc.]
**Status**: [active/validating/completed]
## Job Statement
What the user is trying to accomplish (JTBD framework).
[User's goal in plain language]
## Success Criteria
### Good Enough
- [Minimum viable success criterion 1]
- [Minimum viable success criterion 2]
### Exceptional
- [Excellence criterion 1]
- [Excellence criterion 2]
## Boundaries
What this should NOT be:
- [Boundary 1: What to avoid]
- [Boundary 2: What's out of scope]
## Context & Constraints
**Stakeholders**: [Who needs this to work for them]
**Existing Assets**: [What to build on]
**Timeline**: [Time constraints if any]
**Technical Constraints**: [Platform, language, dependencies]
## Clarifying Context
[Any answers from the 3-question pattern]
## Validation Checklist
- [ ] Meets "good enough" criteria
- [ ] Respects all boundaries
- [ ] Works for all stakeholders
- [ ] Builds on existing assets appropriately
Implementation Instructions
When to Create Intent Contract
Create an intent contract when:
- User invokes a major workflow (
/octo:embrace,/octo:discover,/octo:plan) - User explicitly asks to "plan" or "set goals" for a task
- A workflow requires multiple phases and validation
Do NOT create for:
- Quick, single-action commands
- Simple file reads or searches
- Conversational questions
Step 1: Capture Intent
After asking the 3 clarifying questions in a workflow, prompt the user to define:
AskUserQuestion({
questions: [
{
question: "What are you ultimately trying to accomplish?",
header: "Goal",
multiSelect: false,
options: [
{label: "Let me describe it", description: "I'll write my own goal statement"},
{label: "Make a decision", description: "Choose between options"},
{label: "Create deliverable", description: "Build something specific"},
{label: "Understand a problem", description: "Research and learn"}
]
},
{
question: "What defines success for this?",
header: "Success",
multiSelect: true,
options: [
{label: "Clear recommendation", description: "Know what to do next"},
{label: "Working implementation", description: "Code that functions"},
{label: "Team alignment", description: "Everyone understands"},
{label: "Problem solved", description: "Issue is resolved"}
]
},
{
question: "What should this NOT be or do?",
header: "Boundaries",
multiSelect: true,
options: [
{label: "Over-engineered", description: "Keep it simple"},
{label: "Incomplete", description: "Must be production-ready"},
{label: "Disconnected", description: "Must fit our architecture"},
{label: "Risky", description: "Avoid experimental approaches"}
]
}
]
})
If user selects "Let me describe it", follow up with a text prompt for their custom goal.
Step 2: Write Intent Contract File
Use the Write tool to create .claude/session-intent.md:
cat > .claude/session-intent.md <<EOF
# Intent Contract
**Created**: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
**Workflow**: ${WORKFLOW_NAME}
**Status**: active
## Job Statement
${USER_GOAL}
## Success Criteria
### Good Enough
${MIN_SUCCESS_CRITERIA}
### Exceptional
${EXCEPTIONAL_CRITERIA}
## Boundaries
What this should NOT be:
${BOUNDARIES}
## Context & Constraints
**Stakeholders**: ${STAKEHOLDERS}
**Timeline**: ${TIMELINE}
## Clarifying Context
${THREE_QUESTION_ANSWERS}
## Validation Checklist
- [ ] Meets "good enough" criteria
- [ ] Respects all boundaries
- [ ] Works for all stakeholders
EOF
Step 3: Reference During Execution
Throughout the workflow, periodically read .claude/session-intent.md to:
- Stay aligned with user goals
- Make decisions consistent with boundaries
- Keep stakeholders in mind
At key decision points, explicitly say:
Checking against intent contract: [reference specific criterion]
Step 4: Validate at End
When the workflow completes, read .claude/session-intent.md and validate:
Validation Process:
Read the intent contract
Check each success criterion:
- ✓ Met - explain how
- ✗ Not met - explain why and what's needed
- ~ Partially met - explain gaps
Check boundaries:
- ✓ Respected - confirm
- ✗ Violated - explain what happened
Generate validation report:
# Validation Report
## Success Criteria Check
### Good Enough Criteria
- [✓] Criterion 1: [How it was met]
- [✗] Criterion 2: [Why not met, what's needed]
### Exceptional Criteria
- [~] Criterion 1: [Partial progress explanation]
## Boundary Check
All boundaries respected: [Yes/No]
- Boundary 1: [✓/✗] [Explanation]
## Gaps & Next Steps
[If any criteria not met, list concrete next steps]
## Overall Assessment
[Summary: Does this fulfill the original intent?]
- Present to user:
- Show the validation report
- Ask if they want to address any gaps
- Update intent contract status to "completed" or "validating"
Step 5: Update Intent Contract Status
Update the Status field in .claude/session-intent.md:
active→ workflow in progressvalidating→ checking against criteriacompleted→ all criteria met, boundaries respectedincomplete→ some criteria not met, gaps identified
Integration with Workflows
Embrace Workflow
1. Ask 3 clarifying questions (scope, focus, autonomy)
2. Create intent contract
3. DISCOVER phase (reference intent)
4. DEFINE phase (reference intent)
5. DEVELOP phase (reference intent)
6. DELIVER phase (reference intent)
7. Validate against intent contract
8. Present validation report
Discover Workflow
1. Ask 3 clarifying questions (depth, focus, output)
2. Create intent contract
3. Execute multi-provider research
4. Synthesize findings
5. Validate against intent contract
6. Present validation report
Plan Workflow (Future)
1. Capture comprehensive intent
2. Create intent contract
3. Route to appropriate workflows
4. Execute custom sequence
5. Validate against intent contract
6. Present validation report
Example Intent Contract
# Intent Contract
**Created**: 2026-01-21T15:30:00Z
**Workflow**: embrace
**Status**: active
## Job Statement
Build a user authentication system that our team can implement and maintain.
## Success Criteria
### Good Enough
- Team understands what to build
- Clear technical approach selected
- Security considerations documented
- Implementation plan with steps
### Exceptional
- Multiple authentication methods evaluated
- Security audit performed
- Code examples provided
- Integration tests included
## Boundaries
What this should NOT be:
- Over-engineered with unnecessary features
- Disconnected from our existing Node.js/Express stack
- Experimental or unproven technologies
## Context & Constraints
**Stakeholders**: Development team (5 engineers), Product manager
**Existing Assets**: Express.js API, PostgreSQL database
**Timeline**: Need to start implementation next sprint
**Technical Constraints**: Must work with Express.js, PostgreSQL
## Clarifying Context
**Scope**: Medium feature (multiple components)
**Focus Areas**: Security, Architecture design
**Autonomy**: Supervised (review after each phase)
## Validation Checklist
- [ ] Meets "good enough" criteria
- [ ] Respects all boundaries
- [ ] Works for all stakeholders
- [ ] Builds on existing assets appropriately
Benefits
For Users:
- Clear expectations set upfront
- No forgotten requirements
- Validation against original goals
- Closed-loop accountability
For Workflows:
- Clear success criteria to optimize for
- Boundaries to constrain solutions
- Context for better decisions
- Validation framework built-in
Ready to use! Workflows can now create and validate against persistent intent contracts.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核