JSON Schema
スキーマ
skill.contract.json とハーネスポリシーの JSON Schema(draft 2020-12)。下の一覧は最新の v0.8 から自動で生成しています。各ファイルは $id の URL でそのまま公開しています。
ファイル
| 版 | 契約 | ポリシー |
|---|---|---|
| 0.8最新 | v0.8.json | policy-v0.8-r1.json |
| 0.7 | v0.7.json | policy-v0.7.json |
| 0.6 | v0.6.json | — |
| 0.5 | v0.5.json | — |
| 0.4 | v0.4.json | — |
| 0.3 | v0.3.json | policy-v0.3.json |
| 0.2 | v0.2.json | — |
| 0.1 | v0.1.json | — |
契約 · v0.8
$id https://kajisho5.github.io/skillpact/schema/v0.8.json
項目型必須値・制約
$schemastring
contract_versionenum必須"0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8"
skillobject必須
skill.namestring必須pattern ^[a-z0-9]+(-[a-z0-9]+)*$ · maxLength 64
skill.versionstring必須pattern ^\d+\.\d+\.\d+([-+][0-9A-Za-z.-]+)?$
skill.licensestring
skill.homepagestring
skill.sourcestring
skill.authorsstring[]
skill.native_contractobject
skill.native_contract.clicommand
skill.native_contract.schemastring
compatobject
compat.agentsobjectvalues: agentCompat
compat.osenum[]"linux", "macos", "windows", "ios", "android"
compat.interfacesenum[]"skill-md", "cli", "mcp-stdio", "mcp-http"
requirementsobject
requirements.binariesbinary[]
requirements.runtimesbinary[]
requirements.envobject[]
requirements.env[].namestring必須
requirements.env[].requiredboolean
requirements.env[].secretboolean
requirements.env[].descriptionstring
requirements.skillsobject[]
requirements.skills[].namestring必須
requirements.skills[].versionstring
requirements.skills[].envstringenv var the skill reads to locate it
requirements.skills[].optionalboolean
requirements.skills[].whenstring
requirements.packagesobject[]
requirements.packages[].ecosystemenum必須"pypi", "npm", "cargo", "go", "gem"
requirements.packages[].namestring必須
requirements.packages[].versionstring
requirements.packages[].importstring
requirements.packages[].optionalboolean
permissionspermissions必須
capabilitiescapability[]必須minItems 1
testsobject
tests.setupcommand[]
tests.casestestCase[]
integrityobject
integrity.algorithmconst"sha256"
integrity.filesobjectvalues: string0.8+: every regular file in the skill directory except skill.contract.json, the default excludes and integrity.exclude (spec s11.2). Keys are relative POSIX paths without ".", ".." or empty segments.
integrity.signaturesobject[]
integrity.signatures[].typeenum必須"ed25519", "sigstore"
integrity.signatures[].keystring
integrity.signatures[].sigstring
integrity.signatures[].signerstring
integrity.signatures[].identitystring
integrity.signatures[].issuerstring
integrity.signatures[].bundleobject
integrity.signatures[].instanceenum"production", "staging"Sigstore instance; staging signatures are for testing and never satisfy a production trust entry
integrity.signatures[].roleenum"author", "reviewer", "scanner"author (default) makes L3 possible; reviewer / scanner are attestations by others. From 0.8 the role is part of the signed bytes (spec s11.1).
integrity.canonicalizationenum"jcs", "legacy-sorted"informative; verifiers derive it from contract_version (>=0.4: jcs, RFC 8785)
integrity.excludestring[]0.8+: extra glob patterns (spec s6.1) of files that need no hash, e.g. caches. Default excludes: .git/**, **/__pycache__/**, **/*.pyc, **/.DS_Store. Protected files (SKILL.md, CLAUDE.md, AGENTS.md, GEMINI.md, .mcp.json, .claude-plugin/**, .claude/**, .cursor/**, .codex/**, .gemini/**, .agents/**, hooks/**, package.json, pyproject.toml, entry scripts) are never excluded.
xobjectvendor extensions: x.<vendor>.<key>
kindenum"tool", "instructions"instructions = SKILL.md-only skill with no executable entry
$defs/agentCompat object
項目型必須値・制約
statusenum"tested", "expected", "unsupported"
versionstring
notesstring
tested_atstring
$defs/binary object
項目型必須値・制約
namestring必須
versionstring
checkcommand
version_regexstring
optionalboolean
whenstring
features_checkobjectvalues: commandfeature kind -> command whose output lists that kind (e.g. filter -> ffmpeg -filters)
alternativesstring[]any one of these binaries satisfies the requirement (e.g. magick | sips)
$defs/level enum
"none", "scoped", "any"
$defs/permissions object
項目型必須値・制約
readpermEntry必須
writepermEntry必須
networkpermEntry必須
execpermEntry必須
spendpermEntry必須
sendpermEntry必須
$defs/permEntry object
項目型必須値・制約
levellevel必須
scopestring[]paths ($INPUT, $OUTPUT, $WORKDIR, $SKILL_DIR), hosts, commands, or recipients
whystring
confirmenum"never", "each", "session"
$defs/capability object
項目型必須値・制約
idstring必須pattern ^[a-z0-9]+([._-][a-z0-9]+)*$
summarystring必須maxLength 300
entryobject
entry.clicommand
entry.mcp_toolstring
entry.docstring
effectsenum[]必須"read", "write", "network", "exec", "spend", "send"
destructiveboolean
idempotentboolean
dry_runobject
dry_run.supportedboolean
dry_run.flagstring
dry_run.effectsstring[]
inputsobjectJSON Schema
outputsobjectJSON Schema of the machine-readable result (e.g. --json stdout)
requiresstring[]names from requirements.binaries/runtimes
requires_featuresstring[]
optional_featuresobject[]
optional_features[].featurestring必須
optional_features[].whenstring
conditional_effectsobject[]
conditional_effects[].effectenum必須"read", "write", "network", "exec", "spend", "send"
conditional_effects[].whenstring必須
conditional_effects[].scopestring[]
rolestring
mcp_annotationsobjectoverride of the derived MCP tool annotations
mcp_annotations.readOnlyHintboolean
mcp_annotations.destructiveHintboolean
mcp_annotations.idempotentHintboolean
mcp_annotations.openWorldHintboolean
xobject
effect_scopesobjectvalues: string[]narrower per-capability scope; MUST be within permissions.<effect>.scope
$defs/command string[]
minItems 1
$defs/testCase object
項目型必須値・制約
idstring必須
capabilitystring
runcommand必須
timeout_snumber
networkboolean
expectobject必須
expect.exit_codeinteger
expect.stdout_json_schemaobject
expect.stdout_jsonobject[]
expect.stdout_json[].pathstring必須
expect.stdout_json[].equalsany
expect.stdout_json[].minnumber
expect.stdout_json[].maxnumber
expect.stdout_json[].existsboolean
expect.stdout_containsstring
expect.filesobject[]
expect.files[].pathstring必須
expect.files[].existsboolean
expect.files[].min_bytesinteger
expect.no_writes_outsidestring[]
expect.stderr_containsstring
expect.validate_outputsbooleanvalidate stdout JSON against the capability's outputs schema
expect.stdout_json_modeenum"strict", "last"last = parse the last top-level JSON value in stdout (tolerates leading log lines); strict is the default and the conformant behaviour
envobjectvalues: string
skip_unless_envstring[]
tagsstring[]
ポリシー · policy-v0.8
$id https://kajisho5.github.io/skillpact/schema/policy-v0.8-r1.json
項目型必須値・制約
policy_versionenum必須"0.8", "0.1""0.8" (current). "0.1" is the legacy name of the same format and is still accepted (erratum 0.8.x).
defaultsobject必須
defaults.readd必須
defaults.writed必須
defaults.networkd必須
defaults.execd必須
defaults.spendd必須
defaults.sendd必須
rulesobject[]
rules[].idstring
rules[].effectenum必須"read", "write", "network", "exec", "spend", "send"
rules[].scopestring[]glob patterns matched against the contract's declared scope
rules[].decisiond必須
skillsobject
skills.allowstring[]
skills.denystring[]
require_signatureboolean
trusted_keysstring[]
ask_on_destructiveboolean
allowlist_overrides_askboolean
never_auto_allow_anystring[]
limitsobject
limits.max_turnsinteger
limits.max_tool_callsinteger
limits.max_wall_secondsinteger
limits.max_cost_usdnumber
limits.max_tokensinteger
sandboxobject
sandbox.filesystemenum"read-only", "workdir", "repo", "any"
sandbox.networkenum"off", "allowlist", "on"
sandbox.egress_allowliststring[]
hooksobject
hooks.pre_actionstring[][]
hooks.post_actionstring[][]
auditobject
audit.otel_genaiboolean
audit.log_pathstring
xobject
min_contract_versionstringpattern ^\d+\.\d+$deny contracts older than this contract_version (spec 0.8 s13.1); e.g. "0.8" so that roles are signed and integrity covers every file
$defs/d enum
"allow", "ask", "deny"