---
title: "codes.skill-version@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/codes.skill-version"
updated: null
---

# codes.skill-version@1 · OpenVibe.Services

HTML: [codes.skill-version@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/codes.skill-version)

# CodesSkillVersion `codes.skill-version@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: codes
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/codes/skill-version.v1.json`](/docs/contracts/codes.skill-version.json)

codes.skill-version@1: one immutable version of a codes.skill@1 record in the OpenVibe.Codes skills hub. Every save writes a new version; VERSION starts at 1 and only grows, and SKILL\_ID plus VERSION is the key. BODY and SUMMARY are the content at that version, TOOLS and AUDIENCE the settings it had, and NOTE says why it was written (created, edited, published, or rolled back to N). A rollback never rewrites an old row: it copies the chosen version into a new one, so the history of what every machine synced stays exact and the Link's state can name the version it wrote.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `skill_id` | string | yes |  | - `pattern ^skl_[0-9A-HJKMNP-TV-Z]{26}$` |
| `version` | integer | yes |  | - `minimum 1` |
| `summary` | string | yes |  | - `maxLength 500` |
| `body` | string | yes |  | - `minLength 1`<br>- `maxLength 131072` |
| `tools` | array of enum | yes |  | - `maxItems 8`<br>- `unique items`<br>- `items: one of "claude-code", "codex", "opencode", "command-code", "minimax-code", "aider", "agents"` |
| `audience` | enum | yes |  | - `one of "public", "link", "people", "private"` |
| `created_by` | string | yes |  | - `pattern ^(usr_[0-9A-HJKMNP-TV-Z]{26}\|system)$` |
| `created_at` | string | yes |  | - `format date-time` |
| `note` | string |  | Why this version was written: created, edited, published, or rolled back to N. | - `maxLength 200` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: v1-created

~~~~
{
  "skill_id": "skl_01M4XEV0JT93CAYTXVD6V0QW1E",
  "version": 1,
  "summary": "Open a pull request, wait for CI, and merge only when it is green.",
  "body": "---\nname: ship-a-change\ndescription: Open a PR, wait for CI, and merge only when it is green.\n---\n\n# Ship a change\n",
  "tools": [
    "claude-code"
  ],
  "audience": "private",
  "created_by": "usr_01M4XEV0JT93CAYTXVD6V0QW1F",
  "created_at": "2026-11-07T09:00:00.000Z",
  "note": "created"
}
~~~~

Valid: v4-rollback

~~~~
{
  "skill_id": "skl_01M4XEV0JT93CAYTXVD6V0QW1E",
  "version": 4,
  "summary": "Open a pull request, wait for CI, and merge only when it is green.",
  "body": "---\nname: ship-a-change\ndescription: Open a PR, wait for CI, and merge only when it is green.\n---\n\n# Ship a change\n\nRolled back to the three-step version.\n",
  "tools": [
    "claude-code",
    "codex",
    "opencode"
  ],
  "audience": "public",
  "created_by": "usr_01M4XEV0JT93CAYTXVD6V0QW1F",
  "created_at": "2026-11-07T10:30:00.000Z",
  "note": "rolled back to 1"
}
~~~~

Rejected: bad-author

~~~~
{
  "skill_id": "skl_01M4XEV0JT93CAYTXVD6V0QW1E",
  "version": 2,
  "summary": "",
  "body": "text",
  "tools": [],
  "audience": "public",
  "created_by": "somebody",
  "created_at": "2026-11-07T09:00:00.000Z"
}
~~~~

Rejected: empty-body

~~~~
{
  "skill_id": "skl_01M4XEV0JT93CAYTXVD6V0QW1E",
  "version": 2,
  "summary": "",
  "body": "",
  "tools": [],
  "audience": "private",
  "created_by": "usr_01M4XEV0JT93CAYTXVD6V0QW1F",
  "created_at": "2026-11-07T09:00:00.000Z"
}
~~~~

Rejected: zero-version

~~~~
{
  "skill_id": "skl_01M4XEV0JT93CAYTXVD6V0QW1E",
  "version": 0,
  "summary": "",
  "body": "text",
  "tools": [],
  "audience": "public",
  "created_by": "usr_01M4XEV0JT93CAYTXVD6V0QW1F",
  "created_at": "2026-11-07T09:00:00.000Z"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('codes.skill-version@1', value);   // { valid, errors: [{ path, message }] }
~~~~
