← 返回
未分类

Sharpagent Skill Contract

SharpAgent Skill Contract — Schema-driven skill scaffolding tool. Generates, validates, and packages SharpAgent-compliant skills with five-factor trust verif...
SharpAgent 技能合约 — 基于 Schema 的技能脚手架工具。生成、验证并打包符合 SharpAgent 规范的技能,具备五因素信任验证。
yezhaowang888-stack
未分类 clawhub v1.0.0 1 版本 99465.2 Key: 无需
★ 0
Stars
📥 186
下载
💾 0
安装
1
版本
#latest#scaffolding#schema#sharpagent#validation

概述

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

FieldTypeRequiredDefault
--------------------------------
contract.namestring-
contract.versionsemver"0.0.1"
contract.categoryenum-
contract.trust_levelenum"draft"
contract.readsstring[][]
contract.writesstring[][]
contract.preconditionsstring[][]
contract.postconditionsstring[][]
contract.calibrationobjectdefault
contract.complianceobjectdefault
contract.lifecycleobjectdefault

Contract Categories

CategoryDescriptionExample Skills
---------------------------------------
analysisAnalyzes input, produces structured outputFive-factor review
workflowMulti-step process with gatesEngineering lifecycle
monitorPeriodic scanning and alertingIntelligence briefing
memoryStorage, retrieval, consolidationMemory management
scaffoldCode/file generationSkill creation
integrationExternal service bridgingAPI clients

Trust Levels

LevelMeaningWhen
----------------------
draftWork in progress, unverifiedInitial creation
verifiedContract structure validatedAfter validation
auditedFull five-factor trust audit passedCommunity verified

Calibration Modes

calibration:
  default_mode: professional
  modes_supported: [warm, professional, deep]
ModeWarmProfessionalDeep
-------------------------------
ToneFriendly, supportiveNeutral, preciseAnalytical, detailed
DetailConciseBalancedExhaustive
Use caseUser-facingInternal reportsResearch 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.calibration block defines which modes are supported
  • At runtime, the calibration engine checks contract.calibration.modes_supported

With Content Safety Engine

  • contract.compliance block sets safety policies
  • safety_level: standard is the minimum for ClawHub publication

Quality Gates

CheckWhatFail action
--------------------------
Schema validAll required YAML fields presentBlock packaging
Type consistencyreads/writes reference known typesWarn
Naming conventionsnake_case, ≤40 charsWarn
Calibration declaredAt least default_mode setWarn
Preconditions non-emptypreconditions list ≥1 itemWarn
Version formatvalid semverBlock packaging

Edge Cases

SituationAction
-------------------
No reads (standalone)Allow with warning
reads = writesWarn (likely mistake)
Type cross-reference failsWarn + list unknown types
Calibration missingSet default: professional + standard
Draft trust_levelAllow creation, warn on packaging
SKILL.md has no contract blockFail 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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-12 05:48 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

智能文档处理Skill

yezhaowang888-stack
基于DeepSeek v4技术,支持PDF、Word、Excel等文档的智能解析、信息提取、内容分析与格式转换,准确率99%。
★ 1 📥 542

📝 论文写作指导

yezhaowang888-stack
论文结构模板、引用规范、写作技巧——从开题到终稿全程陪伴。
★ 1 📥 493

学术研究助手

yezhaowang888-stack
学术研究全流程助手,提供论文写作指导、文献检索方法、学术工具推荐、期刊投稿指南、学术会议信息、科研项目管理等。适用于大学生、研究生和科研人员。支持家庭(知识库)和商业(API扩展)双模式。触发条件:用户提出与论文、文献、期刊、投稿、学术、科
★ 1 📥 764