Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
fa6ed5d
feat(harness): measure a skill with the skills installed beside it
chrisknvidia Nov 13, 2026
6d4ee7b
feat(harness): flag SKILL.md and files over harness delivery limits
chrisknvidia Nov 13, 2026
2d4f358
feat(harness): flag placeholders other harnesses pass through literally
chrisknvidia Nov 13, 2026
0d86c59
feat(harness): flag invocation fields each harness ignores
chrisknvidia Nov 13, 2026
03b5a47
fix(harness): don't flag disable-model-invocation as ignored when Cod…
chrisknvidia Nov 13, 2026
fbb88ef
fix(harness): drop the pointer to a CC-ALLOWED-TOOLS-HEADLESS rule th…
chrisknvidia Nov 13, 2026
99428bc
fix(harness): tell prices from positional arguments in $N detection
chrisknvidia Nov 13, 2026
a12392e
fix(harness): skip unreadable and binary resources, measure symlinked…
chrisknvidia Nov 13, 2026
8981375
fix(harness): keep each skills folder its own catalog and follow syml…
chrisknvidia Nov 13, 2026
9009157
fix(harness): report the Copilot CLI and OpenCode reload notes
chrisknvidia Nov 13, 2026
09b1489
docs(harness): keep the Accordion closing tag on its own line
chrisknvidia Nov 13, 2026
364ae9e
Merge branch 'feat/christopherk/harness-06-skills-folder' into feat/c…
chrisknvidia Nov 13, 2026
5147151
Merge branch 'feat/christopherk/harness-07-delivery-limits' into feat…
chrisknvidia Nov 13, 2026
ca3a80a
Merge branch 'feat/christopherk/harness-08-placeholders' into feat/ch…
chrisknvidia Nov 13, 2026
c2a8d08
Merge branch 'main' into feat/christopherk/harness-09-invocation-fields
chrisknvidia Nov 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ All notable changes to SkillEvaluator are documented in this file.
comment helpers, and needs no Pages configuration or history branch. Future
generated bundles include the template; archived bundles and the released
onboarding CLI retain their existing hosted publisher setup.
- `harness` rules for invocation fields: `disable-model-invocation`, Codex's
`agents/openai.yaml` policy, `allowed-tools`, Claude Code-only fields and Hermes
project trust. Tier 1 `schema` now reports fields outside the agentskills.io
spec (LOW).
- `harness` rules for placeholders: price-like `$N` text that Claude Code and
OpenCode replace with arguments (with line numbers), and `$ARGUMENTS` and
`${CLAUDE_SKILL_DIR}`, which only Claude Code substitutes.
Expand Down
3 changes: 3 additions & 0 deletions docs/tier1-validation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ For `validate`, the default set is `schema`, `version`, `security`, `pii`, `lice
- A description within 1,024 characters but over 1,024 UTF-16 units is MEDIUM (`description_utf16_length`), and no "Use when ..." trigger in the first 60 characters is LOW (`description_trigger`).
- A symlinked `SKILL.md` (`manifest_symlink`) or a `SKILL.md` nested inside the skill (`nested_manifest`) is MEDIUM.
- `manifest_size` is LOW above 32 KiB, MEDIUM above 50 KiB and HIGH above 256,000 bytes.
- Fields outside the spec are LOW (`unknown_field`).
- `metadata.author` is optional under the `default` profile. Use `Name <email@host>` to include a contact address, or a person, team, or organization name such as `NVIDIA cuOpt Team` or `Jane Doe (@jdoe)`. A value that is malformed or unsafe is a HIGH `author_format` finding: a bare email or an email outside `Name <email@host>`, stray angle brackets, control, private-use, or bidirectional formatting characters (joiners such as ZWNJ and ZWJ, which Persian, Arabic and Devanagari names need, are accepted), no letters or digits, or more than 256 characters. A bare address counts even when its domain has no dot (`root@buildhost`), while a social handle such as `Jane Doe (@jdoe)` does not. The `registry` profile requires the `Name <email@host>` form.
- `metadata.id` is an optional stable skill ID. When present it must be an exact 1–64 character lowercase ASCII slug (`^[a-z0-9]+(-[a-z0-9]+)*$`, no surrounding whitespace); it may differ from `name`. A collection run reports an ID that more than one discovered skill declares; `validate` on a catalog also lists these in `catalog-summary.json` under `metadata_id_conflicts`. Under `registry` a shared ID blocks: the run exits nonzero, and each sharing skill's entry is `"passed": false` with the conflict repeated under `catalog_findings` and counted in its `severity_counts`. A catalog validates each skill on its own, so that skill's own report was written before the catalog-wide check ran and keeps its single-skill verdict, which the entry carries alongside as `report_verdict` beside `report_scope: "single_skill"`. Uniqueness is checked only across the skills validated together, never against a registry, and a single-skill run does not claim it. The ID does not change local catalog identity, which stays keyed by content type and relative path.
- `metadata.domain` accepts one category string or a list of them, such as `domain: [backend, ai-ml]`. Values are trimmed and deduplicated in order; a blank or null scalar means no domain. A list with more than 16 entries, or a non-string, blank, or over-128-character entry, is a HIGH `Field 'metadata.domain'` finding. The 128-character limit also applies to a single string.
Expand Down Expand Up @@ -289,6 +290,8 @@ For `validate`, the default set is `schema`, `version`, `security`, `pii`, `lice
Delivery rules: Claude Code's body cap, OpenCode's 51,200-byte / 2,000-line reads and lines over 2,000 characters, OpenClaw's whole-or-nothing read against its result caps, Hermes's 100,000-character `skill_view` budget, and Codex's ~10K-token cut when the model reads `SKILL.md` through the shell.

Placeholder rules: `$ARGUMENTS` and `${CLAUDE_SKILL_DIR}` are substituted only by Claude Code, and price-like `$N` text is replaced with arguments by Claude Code and OpenCode.

Invocation rules: `disable-model-invocation` (ignored by Codex, Hermes and OpenCode), Codex's `agents/openai.yaml` implicit-invocation policy (Codex only), `allowed-tools`, Claude Code-only fields, and Hermes project trust.
</Accordion>

<Accordion title="security — vulnerability scanning">
Expand Down
3 changes: 3 additions & 0 deletions src/skillevaluator/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@
# Skill manifest file name variants (case-insensitive search)
SKILL_MANIFEST_VARIANTS = ("SKILL.md", "skill.md")

# Top-level SKILL.md frontmatter fields defined by the agentskills.io spec.
SPEC_SKILL_FIELDS = frozenset({"name", "description", "license", "compatibility", "metadata", "allowed-tools"})

# SKILL.md size thresholds (bytes) where common agent harnesses start cutting,
# refusing, or skipping the file: 16,000-64,000 character whole-file reads,
# 50 KiB tool-output truncation, and a 256,000-byte discovery cap.
Expand Down
21 changes: 21 additions & 0 deletions src/skillevaluator/harness/overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ def _tab_indent_breaks_yaml(fm_yaml: str) -> bool:
return False


def _is_true(value: Any) -> bool:
return value is True or (isinstance(value, str) and value.strip().lower() == "true")


def _shipped_paths(skill_path: Path) -> list[Path]:
"""Files and symlinks a skill ships, without descending into VCS or cache folders."""
found = []
Expand Down Expand Up @@ -341,6 +345,16 @@ def _dollar_n(body: str, first_line: int) -> dict[str, Any]:
return {"dollar_literal_count": prices, "dollar_literal_lines": shown, "dollar_placeholder_count": placeholders}


def _codex_implicit_disabled(skill_path: Path) -> bool:
policy_file = skill_path / "agents" / "openai.yaml"
try:
data = yaml.safe_load(policy_file.read_text(encoding="utf-8")) if policy_file.is_file() else None
except (OSError, UnicodeDecodeError, yaml.YAMLError):
return False
policy = data.get("policy") if isinstance(data, dict) else None
return isinstance(policy, dict) and policy.get("allow_implicit_invocation") is False


def skill_facts(skill_path: Path, catalog: Catalog | None = None) -> dict[str, Any]:
"""Compute the facts profile rules refer to (see profiles README).

Expand All @@ -349,6 +363,7 @@ def skill_facts(skill_path: Path, catalog: Catalog | None = None) -> dict[str, A
"""
manifest, raw, text, fm_yaml, data = _read_manifest(skill_path)
description = data.get("description")
tools = data.get("allowed-tools")
trigger = _TRIGGER_RE.search(description) if isinstance(description, str) else None
root, depth = _install_root(skill_path)
target = "none"
Expand Down Expand Up @@ -395,6 +410,12 @@ def skill_facts(skill_path: Path, catalog: Catalog | None = None) -> dict[str, A
"frontmatter_bom": raw.startswith(b"\xef\xbb\xbf"),
"frontmatter_duplicate_keys": bool(_duplicate_frontmatter_keys(fm_yaml)),
"frontmatter_tab_indent": _tab_indent_breaks_yaml(fm_yaml),
"allowed_tools_shape": "none"
if tools is None
else {str: "string", list: "list", dict: "map"}.get(type(tools), "other"),
"disable_model_invocation": _is_true(data.get("disable-model-invocation")),
"codex_implicit_disabled": _codex_implicit_disabled(skill_path),
"claude_only_fields": ", ".join(f for f in _CLAUDE_ONLY_FIELDS if f in data),
"custom_fields": ", ".join(map(str, custom)),
"custom_field_chars": sum(len(v) if isinstance(v, str) else len(yaml.safe_dump(v)) for v in custom.values()),
"skill_md_chars": len(text),
Expand Down
2 changes: 2 additions & 0 deletions src/skillevaluator/harness/profiles/claude-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ rules:
- {id: CC-DESC-MISSING, when: "description_missing or description_empty or description_type != 'str'", effect: degraded, message: "No usable description: Claude Code shows body text instead.", fix: "Add a non-empty string description."}
- {id: CC-LIST-BUDGET, when: "catalog_desc_chars > list_budget_chars", effect: degraded, outcome: listing shortened, message: "The {catalog_size} skills in this folder have {catalog_desc_chars} description chars; Claude Code's skill list fits {list_budget_chars} (1% of the context window at 4 chars per token; 8,000 if the window is unknown), so descriptions get shortened.", fix: "Shorten descriptions (trigger first) or install fewer skills here."}
- {id: CC-PRECEDENCE, when: "duplicate_name", effect: advisory, message: "Another skill is also named '{skill_name}' ({duplicate_paths}); only one is used, and a user-level copy beats a project copy.", fix: "Give each skill a unique name."}
- {id: CC-ALLOWED-TOOLS, when: "allowed_tools_shape != 'none'", effect: advisory, message: "allowed-tools only pre-approves tools, never restricts, and applies only when the skill is invoked through the Skill tool (e.g. /name), not when the model reads the file.", fix: "Don't rely on allowed-tools to restrict tools; use the harness's permission settings."}
- {id: CC-DUP-KEY, when: "frontmatter_duplicate_keys", effect: advisory, message: "Duplicate keys: Claude Code keeps the last value (four other harnesses drop the skill).", fix: "Remove the duplicate frontmatter key."}
- {id: CC-BODY-CAP, when: "skill_md_bytes > 1048576", effect: not_loaded, outcome: rejected, message: "SKILL.md over 1 MB is rejected (bundle string skill_md_too_large).", fix: "Move detail into references/ files and keep SKILL.md under 1 MB."}
- {id: CC-CASING, when: "not manifest_name_exact", effect: degraded, message: "Non-canonical name (skill.md/Skill.md): loaded on case-insensitive filesystems (macOS default APFS, 3/3), ignored on case-sensitive Linux (3/3). Works or breaks depending on the OS.", fix: "Rename the file to SKILL.md (exact casing)."}
- {id: CC-CODEX-POLICY, when: "codex_implicit_disabled and not disable_model_invocation", effect: degraded, message: "agents/openai.yaml implicit-invocation policy is Codex-only: here the model can still use this skill on its own.", fix: "Also set disable-model-invocation: true (Claude Code, Copilot and OpenClaw honour it)."}
- {id: CC-FM-STRIPPED, when: "custom_field_chars > 200", effect: advisory, message: "Frontmatter is stripped when the skill is used, so the text in {custom_fields} never reaches the model.", fix: "Move instructions from frontmatter into the SKILL.md body."}
notes:
- "Follows symlinked skill folders and symlinked SKILL.md files, inside or outside the root."
Expand Down
3 changes: 3 additions & 0 deletions src/skillevaluator/harness/profiles/codex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ rules:
- {id: CX-SYMLINK-FILE, when: "skill_md_symlink", effect: not_loaded, message: "Symlinked SKILL.md files are skipped (codex#15756).", fix: "Copy SKILL.md into the folder instead of symlinking the file (a symlinked folder works)."}
- {id: CX-LIST-BUDGET, when: "catalog_desc_chars > list_budget_chars", effect: degraded, outcome: listing shortened, message: "The {catalog_size} skills in this folder have {catalog_desc_chars} description chars; Codex's skill list fits about {list_budget_chars} (2% of the context window at 4 bytes per token; 8,000 chars if unknown), so descriptions get shortened, then removed, then skills left out.", fix: "Shorten descriptions (trigger first) or install fewer skills here."}
- {id: CX-DUP-NAME, when: "duplicate_name", effect: advisory, message: "Another skill is also named '{skill_name}' ({duplicate_paths}); Codex lists both, so the model sees two.", fix: "Give each skill a unique name."}
- {id: CX-ALLOWED-TOOLS, when: "allowed_tools_shape != 'none'", effect: advisory, message: "allowed-tools is ignored by Codex.", fix: "Don't rely on allowed-tools to restrict tools; use the harness's permission settings."}
- {id: CX-CASING, when: "not manifest_name_exact", effect: not_loaded, message: "Non-canonical name (skill.md/Skill.md): never loaded, on Linux or macOS (3/3 each).", fix: "Rename the file to SKILL.md (exact casing)."}
- {id: CX-DMI-IGNORED, when: "disable_model_invocation and not codex_implicit_disabled", effect: degraded, message: "disable-model-invocation is ignored: the model still sees this skill and can use it on its own.", fix: "For Codex, add agents/openai.yaml with policy: {allow_implicit_invocation: false}."}
- {id: CX-ARGUMENTS, when: "uses_arguments_placeholder", effect: degraded, message: "$ARGUMENTS is not substituted: the model sees the literal text.", fix: "Describe the expected input in words instead of $ARGUMENTS."}
- {id: CX-SKILL-DIR, when: "uses_claude_skill_dir", effect: degraded, message: "${CLAUDE_SKILL_DIR} is not substituted: the model sees the literal text.", fix: "Use paths relative to SKILL.md."}
- {id: CX-CLAUDE-ONLY, when: "claude_only_fields != ''", effect: advisory, message: "Ignored here (Claude Code only): {claude_only_fields}.", fix: "Fine to keep for Claude Code; don't depend on them elsewhere."}
notes:
- "Explicit $skill injects the whole SKILL.md (145 KB tested)."
- "Follows symlinked skill folders (inside or outside the root)."
Expand Down
4 changes: 4 additions & 0 deletions src/skillevaluator/harness/profiles/copilot-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ rules:
- {id: CP-ROOT, when: "install_root not in roots", effect: not_loaded, outcome: not found, message: "Copilot reads .github/.agents/.claude skills (project) and ~/.copilot or ~/.agents skills (user).", fix: "Install it under .github/skills, .agents/skills or .claude/skills."}
- {id: CP-DESC-LIMIT, when: "description_utf16_units > 1024", effect: not_loaded, outcome: rejected, message: "Skill dropped: description is {description_utf16_units} UTF-16 units, {utf16_over} over the 1,024 limit (an emoji counts as 2).", fix: "Cut the description by at least {utf16_over} UTF-16 units."}
- {id: CP-STRICT-YAML, when: "frontmatter_tab_indent or frontmatter_duplicate_keys or description_type not in ['str', 'none']", effect: not_loaded, message: "Skill dropped: Copilot's YAML parsing is strict.", fix: "Use spaces, not tabs, remove duplicate keys, and make the description a string."}
- {id: CP-ALLOWED-TOOLS-MAP, when: "allowed_tools_shape == 'map'", effect: not_loaded, message: "Skill dropped: allowed-tools given as a map.", fix: "Give allowed-tools as a list or a space-separated string."}
- {id: CP-NO-FRONTMATTER, when: "frontmatter_missing", effect: not_loaded, outcome: not found, message: "Skill dropped: a SKILL.md with no front matter, or an unclosed one, is not registered ('Skill not found'; canary pair 3/3, drift NOCLOSE canary in 4 releases, Trial I 2/2).", fix: "Add front matter with a name and a description."}
- {id: CP-DESC-MISSING, when: "description_missing", effect: degraded, message: "No description: Copilot shows body text instead.", fix: "Add a non-empty string description."}
- {id: CP-LIST-BUDGET, when: "catalog_size > 32", effect: advisory, outcome: listing shortened, message: "{catalog_size} skills here: Copilot gives full descriptions to the first 32 only; the rest are listed by name.", fix: "Keep 32 or fewer skills in one place, or make names self-explanatory."}
- {id: CP-NESTED, when: "nested_skill_md", effect: advisory, message: "Nested SKILL.md is ignored.", fix: "Move the nested skill to its own folder under the skills root, or rename its SKILL.md."}
- {id: CP-RELOAD, when: "always", effect: advisory, message: "New skills appear only after `/skills reload` or a restart; edits to existing skills apply at once."}
- {id: CP-ALLOWED-TOOLS, when: "allowed_tools_shape in ['string','list']", effect: advisory, message: "allowed-tools is ignored in -p (headless) mode; interactive behaviour unverified.", fix: "Don't rely on allowed-tools to restrict tools; use the harness's permission settings."}
- {id: CP-CASING, when: "not manifest_name_exact", effect: degraded, message: "Non-canonical name (skill.md/Skill.md): loaded on case-insensitive filesystems (macOS default APFS, 3/3), ignored on case-sensitive Linux (3/3). Works or breaks depending on the OS.", fix: "Rename the file to SKILL.md (exact casing)."}
- {id: CP-DUP-NAME, when: "duplicate_name", effect: advisory, message: "Another skill is also named '{skill_name}' ({duplicate_paths}); Copilot uses one, and the project copy wins.", fix: "Give each skill a unique name."}
- {id: CP-CODEX-POLICY, when: "codex_implicit_disabled and not disable_model_invocation", effect: degraded, message: "agents/openai.yaml implicit-invocation policy is Codex-only: here the model can still use this skill on its own.", fix: "Also set disable-model-invocation: true (Claude Code, Copilot and OpenClaw honour it)."}
- {id: CP-ARGUMENTS, when: "uses_arguments_placeholder", effect: degraded, message: "$ARGUMENTS is not substituted: the model sees the literal text.", fix: "Describe the expected input in words instead of $ARGUMENTS."}
- {id: CP-SKILL-DIR, when: "uses_claude_skill_dir", effect: degraded, message: "${CLAUDE_SKILL_DIR} is not substituted: the model sees the literal text.", fix: "Use paths relative to SKILL.md."}
- {id: CP-CLAUDE-ONLY, when: "claude_only_fields != ''", effect: advisory, message: "Ignored here (Claude Code only): {claude_only_fields}.", fix: "Fine to keep for Claude Code; don't depend on them elsewhere."}
- {id: CP-FM-STRIPPED, when: "custom_field_chars > 200", effect: advisory, message: "Frontmatter is stripped when the skill is used, so the text in {custom_fields} never reaches the model.", fix: "Move instructions from frontmatter into the SKILL.md body."}
- {id: CP-DESC-ESCAPED, when: "description_has_quote", effect: advisory, outcome: text rewritten, message: "Double quotes in the description are shown to the model as &quot; in the skill list.", fix: "Use single quotes in the description if the exact text matters."}
notes:
Expand Down
Loading
Loading