State every enforced frontmatter and layout rule in the contract
Check instruction packages / check (push) Successful in 5s
Check instruction packages / check (pull_request) Successful in 4s

Add the frontmatter placement, two-space indent, no blank or comment
lines, and real-directory rules; move the example's comment out of its
value line so the example passes; name the code-point sort; and note that
archive digests depend on a POSIX build host. Split the frontmatter line
check into a named condition.

Refs #20

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-11-25 18:56:09 -05:00
1 parent 1e9e46bc09
commit ddf95ded04
2 files changed
+18 -10

No files matched your search

@@ -48,6 +48,8 @@ lower-case 64-hex SHA-256 digests. Any additional field — such as `tools`,
- Every file in the directory except the sidecar is declared, and every
declared file is present with exactly its declared SHA-256.
- The package directory is a real directory, not a symbolic link, and the
sidecar is a regular file.
- No symbolic links, executable bits, or non-regular files; at most 64 entries
(files and directories), and no relative path longer than 8 segments
including the file name.
@@ -56,34 +58,39 @@ lower-case 64-hex SHA-256 digests. Any additional field — such as `tools`,
## `SKILL.md` frontmatter
The frontmatter allows only these keys, each at most once:
`SKILL.md` opens with a frontmatter block between `---` lines. The block
allows only these keys, each at most once:
```yaml
name: <the directory name: hyphen-separated lower-case letters and digits, at most 64 characters>
description: <non-empty, at most 1024 characters>
disable-model-invocation: true # optional; true or false; true makes the package manual-only
disable-model-invocation: true
metadata:
relayview-display-name: <at most 128 characters>
relayview-version: <major.minor.patch>
```
Every key other than `metadata` is written `key: value` with a non-empty
value. `metadata:` stands alone on its line, followed by exactly those two
indented keys. Any other key, such as `tools` or `allowed-tools`, fails the
check.
`disable-model-invocation` is optional and is exactly `true` or `false`; `true`
makes the package manual-only. Every key other than `metadata` is written
`key: value` with a non-empty value. `metadata:` stands alone on its line,
followed by exactly those two keys, each indented two spaces. The block has no
blank or comment lines. Any other key, such as `tools` or `allowed-tools`,
fails the check.
## Identity and archive
The package identity is the SHA-256 of `relayview-instruction-package-v1\0`
followed by length-framed parts (a 4-byte big-endian length, then the bytes):
the raw sidecar bytes, then for each declared path, sorted as whole strings,
the UTF-8 path and the file bytes.
the raw sidecar bytes, then for each declared path, sorted as whole strings
by Unicode code point, the UTF-8 path and the file bytes.
The release archive is an uncompressed ZIP containing the repository
`LICENSE` and `NOTICE.md`, then every package file under `<package-name>/`,
sorted segment by segment (so `a/b.md` precedes `a-b/c.md`, unlike the
whole-string order the identity uses). Every entry carries the timestamp 1980-01-01 00:00:00 and
mode `0644`, so the archive digest depends only on those bytes.
mode `0644`. ZIP headers also record the creating system, so release
digests are computed on a POSIX host, as this repository's CI does; on such a
host the archive digest depends only on those bytes.
RelayView's `scripts/verify-first-party-skills-source.py` recomputes both
values from a tagged release and compares them with its
+2 -1
View File
@@ -144,7 +144,8 @@ def check_package(path):
top_keys.append(key)
in_metadata = key == "metadata"
# metadata stands alone; every other key carries an inline value.
if (line != "metadata:") if in_metadata else not re.fullmatch(r"[a-z-]+: .+", line):
valid_line = line == "metadata:" if in_metadata else re.fullmatch(r"[a-z-]+: .+", line)
if not valid_line:
_fail(f"{path}: unsupported skill metadata")
else:
_fail(f"{path}: unsupported skill metadata")