Sharpagent Skill Contract
/install sharpagent-skill-contract
SharpAgent Skill Contract v1.0.0
Foundation shovel — Generate, validate, and package all SharpAgent skills. Fusion of Ontology Schema + Skill Creator + Skill Oracle.
When to Use
Use this skill when:
- Creating a new SharpAgent-compliant Skill from scratch
- Validating an existing Skill for contract compliance
- Packaging a Skill for ClawHub publication under
SharpAgent - Upgrading a legacy Skill to SharpAgent standards
What Is a Skill Contract
Every SharpAgent Skill must declare a contract — a YAML block that states:
contract:
name: sharpagent-five-factor-review
version: "1.0.0"
category: analysis
trust_level: verified # draft | verified | audited
reads:
- InformationSource
- LearningEntry
writes:
- FiveFactorResult
preconditions:
- "Must have at least one InformationSource to analyze"
- "Must have access to web_search or memory_search tool"
postconditions:
- "Output 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]
compliance:
jurisdiction: global # cn | us | eu | global
safety_level: standard # minimal | standard | strict
lifecycle:
status: active
publish_as: SharpAgent
Workflow
Step 1: Scaffold a New Skill
sharpagent scaffold --name sharpagent-five-factor-review --category analysis
Generates:
/sharpagent-skills/sharpagent-five-factor-review/
├── SKILL.md # Contract + documentation
├── contract.yaml # Machine-readable contract (auto-derived)
├── scripts/ # Runtime scripts (optional)
├── references/ # Supporting docs (optional)
└── test/ # Validation tests (optional)
Step 2: Validate Contract
sharpagent validate --path ./sharpagent-five-factor-review/SKILL.md
Checks:
- Structural: All required YAML fields present
- Semantic: reads/writes match known ontology types
- Integrity: preconditions reference real capabilities
- Naming: snake_case, no spaces, max 40 chars
{
"valid": true,
"warnings": [],
"errors": [],
"score": 100,
"missing_optional": ["scripts/ directory missing"]
}
Step 3: Package for Publication
sharpagent package --name sharpagent-five-factor-review --output ./dist/
Produces:
./dist/sharpagent-five-factor-review.tar.gz
├── SKILL.md
├── contract.yaml
├── scripts/
└── references/
Contract YAML Schema 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.compliance |
object | ✅ | default |
contract.lifecycle |
object | ✅ | default |
Contract Categories
| Category | Description | Example Skills |
|---|---|---|
analysis |
Analyzes input, produces structured output | Five-factor review |
workflow |
Multi-step process with gates | Engineering lifecycle |
monitor |
Periodic scanning and alerting | Intelligence briefing |
memory |
Storage, retrieval, consolidation | Memory management |
scaffold |
Code/file generation | Skill creation |
integration |
External service bridging | API clients |
Trust Levels
| Level | Meaning | When |
|---|---|---|
draft |
Work in progress, unverified | Initial creation |
verified |
Contract structure validated | After validation |
audited |
Full five-factor trust audit 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 reports | Research analysis |
Integration Points
With Five-Factor Review
writes: [FiveFactorResult]→ Contract schema is consumed by the five-factor review skill- Contract trust_level is validated using FiveFactorResult as part of skill audit
With Calibration Framework
contract.calibrationblock defines which modes are supported- At runtime, the calibration engine checks
contract.calibration.modes_supported
With Content Safety Engine
contract.complianceblock sets safety policiessafety_level: standardis the minimum for ClawHub publication
Quality Gates
| Check | What | Fail action |
|---|---|---|
| Schema 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 set | Warn |
| Preconditions non-empty | preconditions list ≥1 item | Warn |
| Version format | valid semver | Block packaging |
Edge Cases
| Situation | Action |
|---|---|
| No reads (standalone) | Allow with warning |
| reads = writes | Warn (likely mistake) |
| Type cross-reference fails | Warn + list unknown types |
| Calibration missing | Set default: professional + standard |
| Draft trust_level | Allow creation, warn on packaging |
| SKILL.md has no contract block | Fail validation |
Dependencies
- YAML parser (for reading contract blocks)
- jq or Python 3 (for validation scripts)
- tar (for packaging)
Version History
- v1.0.0 — Initial release. Skill Contract scaffolding + validation + packaging.
SharpAgent · MIT-0 · 2026-05-11
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install sharpagent-skill-contract - 安装完成后,直接呼叫该 Skill 的名称或使用
/sharpagent-skill-contract触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Sharpagent Skill Contract 是什么?
SharpAgent Skill Contract — Schema-driven skill scaffolding tool. Generates, validates, and packages SharpAgent-compliant skills with five-factor trust verif... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 23 次。
如何安装 Sharpagent Skill Contract?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install sharpagent-skill-contract」即可一键安装,无需额外配置。
Sharpagent Skill Contract 是免费的吗?
是的,Sharpagent Skill Contract 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Sharpagent Skill Contract 支持哪些平台?
Sharpagent Skill Contract 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Sharpagent Skill Contract?
由 yezhaowang888-stack(@yezhaowang888-stack)开发并维护,当前版本 v1.0.0。