Sharpagent Skill Contract — Sharpagent 技能合同
v1.0.0SharpAgent Skill Contract — 基于模式的技能脚手架工具。生成、验证和打包符合SharpAgent标准的技能,具有五因素信任验证...
运行时依赖
安装命令
点击复制技能文档
Sharp代理 技能 Contract v1.0.0
Foundation shovel — 生成, 验证, and package all Sharp代理 技能s. Fusion of Onto记录y 模式 + 技能 创建器 + 技能 Oracle.
When to Use
Use this 技能 when:
Creating a new Sharp代理-compliant 技能 from scratch Validating an existing 技能 for contract 合规 Packaging a 技能 for ClawHub publication under Sharp代理 Upgrading a legacy 技能 to Sharp代理 standards What Is a 技能 Contract
Every Sharp代理 技能 must declare a contract — a YAML block that 状态s:
contract: name: sharp代理-five-factor-review version: "1.0.0" category: analysis trust_level: verified # draft | verified | 审计ed reads: - In格式化ionSource - LearningEntry writes: - FiveFactor结果 preconditions: - "Must have at least one In格式化ionSource to analyze" - "Must have 访问 to 网页_搜索 or memory_搜索 工具" postconditions: - "输出 contAIns overall_confidence score (0-10)" - "Each of 5 factors has a value" calibration: default_mode: professional # warm | professional | deep modes_supported: [warm, professional, deep] 合规: jurisdiction: global # cn | us | eu | global safety_level: standard # minimal | standard | strict lifecycle: 状态: active publish_as: Sharp代理
工作流 Step 1: Scaffold a New 技能 sharp代理 scaffold --name sharp代理-five-factor-review --category analysis
生成s:
/sharp代理-技能s/sharp代理-five-factor-review/ ├── 技能.md # Contract + documentation ├── contract.yaml # Machine-readable contract (auto-derived) ├── scripts/ # 运行time scripts (optional) ├── references/ # Supporting docs (optional) └── test/ # 验证 tests (optional)
Step 2: 验证 Contract sharp代理 验证 --path ./sharp代理-five-factor-review/技能.md
检查s:
Structural: All required YAML fields present Semantic: reads/writes match known onto记录y types Integrity: preconditions reference real capabilities Naming: snake_case, no spaces, max 40 chars { "valid": true, "警告s": [], "errors": [], "score": 100, "missing_optional": ["scripts/ directory missing"] }
Step 3: Package for Publication sharp代理 package --name sharp代理-five-factor-review --输出 ./dist/
Produces:
./dist/sharp代理-five-factor-review.tar.gz ├── 技能.md ├── contract.yaml ├── scripts/ └── references/
Contract YAML 模式 Reference Top-Level Fields Field Type Required Default contract.name string ✅ - contract.version semver ✅ "0.0.1" contract.category enum ✅ - contract.trust_level enum ✅ "draft" contract.reads string[] ✅ [] contract.writes string[] ✅ [] contract.preconditions string[] ✅ [] contract.postconditions string[] ❌ [] contract.calibration object ✅ default contract.合规 object ✅ default contract.lifecycle object ✅ default Contract Categories Category Description Example 技能s analysis Analyzes 输入, produces structured 输出 Five-factor review 工作流 Multi-step process with gates Engineering lifecycle 监控 Periodic 扫描ning and 告警 Intelligence briefing memory Storage, retrieval, consolidation Memory management scaffold Code/file generation 技能 creation integration External 服务 bridging API 命令行工具ents Trust Levels Level Meaning When draft Work in 进度, unverified Initial creation verified Contract structure 验证d After 验证 审计ed Full five-factor trust 审计 passed Community verified Calibration Modes calibration: default_mode: professional modes_supported: [warm, professional, deep]
Mode Warm Professional Deep Tone Friendly, supportive Neutral, precise Analytical, detAIled DetAIl Concise Balanced Exhaustive Use case User-facing Internal 报告s Re搜索 analysis Integration Points With Five-Factor Review writes: [FiveFactor结果] → Contract 模式 is consumed by the five-factor review 技能 Contract trust_level is 验证d using FiveFactor结果 as part of 技能 审计 With Calibration 框架 contract.calibration block defines which modes are supported At 运行time, the calibration engine 检查s contract.calibration.modes_supported With Content Safety Engine contract.合规 block 设置s safety policies safety_level: standard is the minimum for ClawHub publication 质量 Gates 检查 What FAIl action 模式 valid All required YAML fields present Block packaging Type consistency reads/writes reference known types Warn Naming convention snake_case, ≤40 chars Warn Calibration declared At least default_mode 设置 Warn Preconditions non-empty preconditions 列出 ≥1 item Warn Version 格式化 valid semver Block packaging Edge Cases Situation Action No reads (standalone) Allow with 警告 reads = writes Warn (likely mistake) Type cross-reference fAIls Warn + 列出 unknown types Calibration missing 设置 default: professional + standard Draft trust_level Allow creation, warn on packaging 技能.md has no contract block FAIl 验证 Dependencies YAML 解析器 (for reading cont