Multi-tier framework for evaluating AI agent skills and plugins with quality gates, security scanning, harness compatibility checks, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior. Ships reusable CI templates that bring every check to any repository.
Python agent-evaluationagent-pluginsagent-securityagent-skillsagentic-aibenchmarkci-templatesclaude-codecodexevaluateevaluationharnesspluginplugin-evaluationsecurity-scannerskill-evalskill-evaluationskill-evaluatorskill-gap-analysisskills
feat(harness): measure a skill with the skills installed beside it (#531)
Christopher Kevinf0e1beec4f74
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex fff64e8f..71b87ba2 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -12,6 +12,11 @@ All notable changes to SkillEvaluator are documented in this file.comment helpers, and needs no Pages configuration or history branch. Futuregenerated bundles include the template; archived bundles and the releasedonboarding CLI retain their existing hosted publisher setup.+- The `harness` check measures a skill together with the skills installed beside+ it: list budgets (scaled by the context window), duplicate names and which copy+ each harness uses, and OpenClaw's prompt cap and compact list. A `catalog` line+ in the panel names the folder measured. Skills in separate folders are measured+ separately, and Copilot CLI and OpenCode get an advisory reload note.- `harness` rules for where `SKILL.md` lives: casing, nested manifests, symlinkedmanifests and resources, OpenClaw symlink escapes, Codex scan depth, and filesHermes leaves out of its file list. Tier 1 `schema` now reports a symlinked ordiff --git a/docs/tier1-validation.mdx b/docs/tier1-validation.mdxindex 115dff46..09a3bf38 100644--- a/docs/tier1-validation.mdx+++ b/docs/tier1-validation.mdx@@ -282,6 +282,8 @@ For `validate`, the default set is `schema`, `version`, `security`, `pii`, `liceDescription rules: missing or empty descriptions, Claude Code and Codex listing cuts, Copilot CLI's 1,024 UTF-16 unit limit, quotes escaped in the Copilot CLI and OpenClaw lists, and Hermes's 60-character listing. `-v` also shows the description each harness puts in the model's skill list.Location rules: `SKILL.md` casing, nested manifests, symlinked manifests and resources, OpenClaw symlink escapes, Codex scan depth, and files Hermes leaves out of its file list (outside `references/`, `templates/`, `assets/` and `scripts/`).++ The check measures the skill together with the skills installed next to it. A single skill under a harness root such as `.claude/skills`, or in a workspace `skills/` folder, is counted with everything in that folder (symlinked skill folders included). Skills in different folders are separate installations, and a folder of skills is its own catalog. That drives the list-budget rules (Claude Code and Codex ~8,000 description chars, Copilot 32 full descriptions, OpenClaw 150 skills or 18,000 chars) and a duplicate-name rule per harness that says which copy wins. A `catalog` line in the panel names the folder. Copilot CLI and OpenCode also get an advisory note on when new or edited skills are picked up.</Accordion><Accordion title="security — vulnerability scanning">diff --git a/src/skillevaluator/harness/__init__.py b/src/skillevaluator/harness/__init__.pyindex 07472d2c..7ae4771d 100644--- a/src/skillevaluator/harness/__init__.py+++ b/src/skillevaluator/harness/__init__.py@@ -10,6 +10,7 @@ advisory: it never changes Tier 1 findings or the exit code.from skillevaluator.harness.overlay import (HARNESS_STATUSES,+ Catalog,HarnessResult,evaluate_harnesses,evaluate_profile,@@ -22,6 +23,7 @@ from skillevaluator.harness.overlay import (__all__ = ["HARNESS_STATUSES",+ "Catalog","HarnessResult","evaluate_harnesses","evaluate_profile",diff --git a/src/skillevaluator/harness/overlay.py b/src/skillevaluator/harness/overlay.pyindex 515f6de2..1878bd6c 100644--- a/src/skillevaluator/harness/overlay.py+++ b/src/skillevaluator/harness/overlay.py@@ -13,7 +13,12 @@ from typing import Anyimport yaml-from skillevaluator.constants import DESCRIPTION_TRIGGER_PATTERN, SKILL_MANIFEST_VARIANTS, SKILL_NOT_SHIPPED_DIRS+from skillevaluator.constants import (+ DESCRIPTION_TRIGGER_PATTERN,+ SCAN_EXCLUDED_DIRS,+ SKILL_MANIFEST_VARIANTS,+ SKILL_NOT_SHIPPED_DIRS,+)from skillevaluator.validators.frontmatter_parser import FRONTMATTER_PATTERNfrom skillevaluator.validators.schema import _duplicate_frontmatter_keys@@ -70,6 +75,7 @@ class HarnessResult:verified_date: strfindings: list[dict[str, str]] = field(default_factory=list)listed: dict[str, Any] = field(default_factory=dict)+ catalog: dict[str, Any] = field(default_factory=dict)def to_dict(self) -> dict[str, Any]:return {@@ -80,6 +86,7 @@ class HarnessResult:"verified_version": self.version,"verified_date": self.verified_date,"findings": self.findings,+ "catalog": self.catalog,}@@ -205,8 +212,12 @@ def _bundle_facts(skill_path: Path, manifest: Path) -> dict[str, Any]:}-def skill_facts(skill_path: Path) -> dict[str, Any]:- """Compute the facts profile rules refer to."""+def skill_facts(skill_path: Path, catalog: Catalog | None = None) -> dict[str, Any]:+ """Compute the facts profile rules refer to (see profiles README).++ ``catalog`` describes the other skills installed alongside this one; without it the+ catalog facts are zero and catalog rules are skipped.+ """manifest, raw, text, fm_yaml, data = _read_manifest(skill_path)description = data.get("description")trigger = _TRIGGER_RE.search(description) if isinstance(description, str) else None@@ -224,6 +235,7 @@ def skill_facts(skill_path: Path) -> dict[str, Any]:)custom = {k: v for k, v in data.items() if str(k) not in _KNOWN_FIELDS}name = _skill_name(skill_path, data)+ duplicates = catalog.duplicates(skill_path, name) if catalog else []return {"skill_name": name,"description_text": description if isinstance(description, str) else "",@@ -251,12 +263,87 @@ def skill_facts(skill_path: Path) -> dict[str, Any]:"description_over": max(0, (len(description) if isinstance(description, str) else 0) - 1024),"utf16_over": max(0, (_utf16_units(description)) - 1024),**_bundle_facts(skill_path, manifest),+ "catalog_size": catalog.size if catalog else 0,+ "catalog_desc_chars": catalog.desc_chars if catalog else 0,+ "catalog_base": str(catalog.base) if catalog and catalog.base else "",+ "duplicate_name": bool(duplicates),+ "duplicate_paths": ", ".join(duplicates[:3]),}+@dataclass+class Catalog:+ """The skills installed together in one folder: what list budgets and name clashes depend on."""++ names: dict[Path, str]+ size: int+ desc_chars: int+ base: Path | None = None++ @classmethod+ def of(cls, skills: list[Path], base: Path | None = None) -> Catalog:+ names, chars = {}, 0+ for skill in skills:+ _, _, _, _, data = _read_manifest(skill)+ names[skill.resolve()] = _skill_name(skill, data)+ description = data.get("description")+ chars += len(description) if isinstance(description, str) else 0+ return cls(names=names, size=len(skills), desc_chars=chars, base=base)++ def duplicates(self, skill: Path, name: str) -> list[str]:+ own = skill.resolve()+ return [self._display(other) for other, other_name in self.names.items() if other != own and other_name == name]++ def _display(self, path: Path) -> str:+ base = (self.base or path.parent).resolve()+ return path.relative_to(base).as_posix() if base in path.parents else str(path)+++def _find_skills(folder: Path) -> list[Path]:+ """Skill folders under ``folder``, symlinked ones included (Claude Code and Codex load those)."""+ found: set[Path] = set()+ for here, dirs, files in os.walk(folder, followlinks=True):+ path = Path(here).absolute()+ if path.is_symlink() and path.resolve() in {parent.resolve() for parent in path.parents}:+ dirs.clear() # a link back to one of its own parent folders+ continue+ dirs[:] = [d for d in dirs if d not in SCAN_EXCLUDED_DIRS]+ if any(n in files for n in SKILL_MANIFEST_VARIANTS):+ found.add(Path(here))+ return sorted(s for s in found if not any(parent in found for parent in s.parents))+++def _catalog_base(skill: Path) -> Path | None:+ """The skills folder a skill is installed in: a harness root, or a workspace ``skills/`` folder (OpenClaw)."""+ root, depth = _install_root(skill)+ if root is not None:+ return skill.absolute().parents[depth]+ parent = skill.absolute().parent+ return parent if parent.name == "skills" else None+++def _catalog_of(group: list[Path]) -> Catalog:+ base = _catalog_base(group[0])+ if base is not None:+ return Catalog.of(_find_skills(base) or group, base)+ return Catalog.of(group, Path(os.path.commonpath([s.resolve() for s in group])) if len(group) > 1 else None)++def facts_for(skills: list[Path]) -> dict[Path, dict[str, Any]]:- """Facts per skill."""- return {skill: skill_facts(skill) for skill in skills}+ """Facts per skill, with the catalog they are installed in.++ A skill installed in a skills folder (e.g. ``.claude/skills``, or an OpenClaw workspace ``skills/``) is+ measured against everything installed in that folder, and skills in different folders are separate+ installations. Skills outside any skills folder that are given together form their own catalog.+ """+ groups: dict[Path | None, list[Path]] = {}+ for skill in skills:+ base = _catalog_base(skill)+ groups.setdefault(base.resolve() if base else None, []).append(skill)+ catalogs: dict[Path, Catalog] = {}+ for group in groups.values():+ catalogs.update(dict.fromkeys(group, _catalog_of(group)))+ return {skill: skill_facts(skill, catalogs[skill]) for skill in skills}def _utf16_units(value: Any) -> int:@@ -267,12 +354,19 @@ def listed_description(profile: dict[str, Any], facts: dict[str, Any]) -> dict[s"""What the profile says this harness puts in the model's skill list for the description."""listing = profile.get("listing") or {}text = facts["description_text"]+ budget = listing.get("budget") or {}+ over_budget = facts["catalog_size"] and (+ facts["catalog_desc_chars"] > (facts.get("list_budget_chars") or budget.get("desc_chars", float("inf")))+ or facts["catalog_size"] > budget.get("skills", float("inf"))+ )limit = listing.get("drop_over_utf16")if limit and facts["description_utf16_units"] > limit:return {"mode": "dropped", "text": ""}if not text or (listing.get("name_only_over") and len(text) > listing["name_only_over"]):return {"mode": "name_only", "text": ""}- cut = listing.get("cut")+ cut = budget.get("cut") if over_budget else listing.get("cut")+ if over_budget and not cut:+ return {"mode": "shortened", "text": ""}if cut and len(text) > cut:return {"mode": "cut", "text": text[:cut], "limit": cut}return {"mode": "full", "text": text}@@ -378,6 +472,16 @@ def model_config(profile: dict[str, Any], config: dict[str, Any] | None = None)}+def listing_budget_chars(profile: dict[str, Any], context_tokens: int) -> int:+ """Characters the harness reserves for the skill list: a share of the context window when the profile+ gives ``chars_per_context_token`` and the window is known, else the fixed ``desc_chars`` (0 = no budget)."""+ budget = (profile.get("listing") or {}).get("budget") or {}+ per_token = budget.get("chars_per_context_token")+ if per_token and context_tokens:+ return int(context_tokens * per_token)+ return int(budget.get("desc_chars", 0))++def evaluate_profile(profile: dict[str, Any], facts: dict[str, Any], config: dict[str, Any] | None = None) -> HarnessResult:@@ -390,6 +494,7 @@ def evaluate_profile(roots = profile.get("roots", {})all_roots = [*roots.get("project", []), *roots.get("user", [])]setup = model_config(profile, config)+ facts = {**facts, "list_budget_chars": listing_budget_chars(profile, setup["context_tokens"])}names = {**facts, **setup, "always": True, "roots": _RootList(all_roots, roots)}findings: list[dict[str, str]] = []worst = -1@@ -397,9 +502,9 @@ def evaluate_profile(expression = str(rule["when"])if "install_root" in expression and (facts["install_root"] is None or names["native_root"]):continue- if expression != "always" and not _Rule.evaluate(expression, names):+ if "catalog_" in expression and not facts["catalog_size"]:continue- if expression == "always" and rule["effect"] == "advisory":+ if expression != "always" and not _Rule.evaluate(expression, names):continuefinding = {"id": rule["id"], "effect": rule["effect"], "message": _fill(rule["message"], facts)}for key in ("fix", "outcome"):@@ -417,6 +522,11 @@ def evaluate_profile(verified_date=str(verified.get("date", "")),findings=findings,listed=listed_description(profile, facts),+ catalog={+ "size": facts["catalog_size"],+ "desc_chars": facts["catalog_desc_chars"],+ "folder": facts["catalog_base"],+ },)diff --git a/src/skillevaluator/harness/profiles/claude-code.yaml b/src/skillevaluator/harness/profiles/claude-code.yamlindex 3099d755..d061008d 100644--- a/src/skillevaluator/harness/profiles/claude-code.yaml+++ b/src/skillevaluator/harness/profiles/claude-code.yaml@@ -5,11 +5,14 @@ roots:project: [.claude/skills]user: [~/.claude/skills]not_scanned: [.agents/skills, ~/.agents/skills]-listing: {cut: 1536}+listing: {cut: 1536, budget: {desc_chars: 8000, chars_per_context_token: 0.04}}rules:- {id: CC-ROOT, when: "install_root not in roots", effect: not_loaded, outcome: not found, message: "Claude Code reads only .claude/skills and ~/.claude/skills; .agents/skills is not scanned.", fix: "Install it under .claude/skills or ~/.claude/skills (a symlink from .agents/skills works)."}+ - {id: CC-GROUPING, when: "grouping_depth > 0", effect: not_loaded, outcome: not found, message: "Claude Code finds skills only directly under the skills folder; grouping folders are not searched.", fix: "Move the skill folder directly under .claude/skills."}- {id: CC-DESC-CUT, when: "description_codepoints > 1536", effect: degraded, outcome: listing shortened, message: "Description cut at 1,536 characters.", fix: "Keep the description at or under 1,536 characters."}- {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-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-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-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."}diff --git a/src/skillevaluator/harness/profiles/codex.yaml b/src/skillevaluator/harness/profiles/codex.yamlindex 3a13ee90..9c9ecb27 100644--- a/src/skillevaluator/harness/profiles/codex.yaml+++ b/src/skillevaluator/harness/profiles/codex.yaml@@ -5,7 +5,7 @@ roots:project: [.agents/skills, .codex/skills]user: [~/.agents/skills, ~/.codex/skills]limits: {scan_depth: 6, skips_hidden_dirs: true, catalog_desc_codepoints: 1024, list_budget: "2% of context, 8,000 chars if unknown, max 10,000 tokens"}-listing: {cut: 1024}+listing: {cut: 1024, budget: {desc_chars: 8000, chars_per_context_token: 0.08}}rules:- {id: CX-ROOT, when: "install_root not in roots", effect: not_loaded, outcome: not found, message: "Codex reads .agents/skills and .codex/skills (project and user).", fix: "Install it under .agents/skills or .codex/skills."}- {id: CX-DESC-CUT, when: "description_codepoints > 1024", effect: degraded, outcome: listing shortened, message: "Description cut to 1,021 chars + '...' in the skill list ({description_codepoints} chars, {description_over} over 1,024).", fix: "Cut the description by at least {description_over} characters."}@@ -15,6 +15,8 @@ rules:- {id: CX-NESTED, when: "nested_skill_md_exact", effect: degraded, message: "The nested SKILL.md is loaded as a second, separate skill.", fix: "Move the nested skill to its own folder under the skills root, or rename its SKILL.md."}- {id: CX-DEPTH, when: "grouping_depth > 5", effect: not_loaded, outcome: not found, message: "Beyond Codex's scan depth of 6.", fix: "Install the skill at most 5 folders below the skills root."}- {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-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)."}notes:- "Explicit $skill injects the whole SKILL.md (145 KB tested)."diff --git a/src/skillevaluator/harness/profiles/copilot-cli.yaml b/src/skillevaluator/harness/profiles/copilot-cli.yamlindex d54dec53..ae73da7c 100644--- a/src/skillevaluator/harness/profiles/copilot-cli.yaml+++ b/src/skillevaluator/harness/profiles/copilot-cli.yaml@@ -11,8 +11,11 @@ rules:- {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-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-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-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 " in the skill list.", fix: "Use single quotes in the description if the exact text matters."}notes:diff --git a/src/skillevaluator/harness/profiles/hermes.yaml b/src/skillevaluator/harness/profiles/hermes.yamlindex 41a6c518..fe2d5c4b 100644--- a/src/skillevaluator/harness/profiles/hermes.yaml+++ b/src/skillevaluator/harness/profiles/hermes.yaml@@ -16,6 +16,7 @@ rules:- {id: HM-SYMLINK-FILE, when: "skill_md_symlink", effect: not_loaded, message: "Symlinked SKILL.md files are not loaded.", fix: "Copy SKILL.md into the folder instead of symlinking the file (a symlinked folder works)."}- {id: HM-DUP-KEY, when: "frontmatter_duplicate_keys", effect: advisory, message: "Duplicate keys: last value wins.", fix: "Remove the duplicate frontmatter key."}- {id: HM-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: HM-DUP-NAME, when: "duplicate_name", effect: advisory, message: "Another skill is also named '{skill_name}' ({duplicate_paths}); Hermes uses one: project, then ~/.hermes/skills.", fix: "Give each skill a unique name."}- {id: HM-RESOURCE-SYMLINK, when: "resource_symlinks > 0", effect: degraded, message: "Symlinked files ({resource_symlink_paths}) are left out of the skill's file list.", fix: "Copy those files into the skill instead of symlinking them."}- {id: HM-LINKED-LAYOUT, when: "hermes_unlisted_files > 0", effect: advisory, message: "{hermes_unlisted_files} files outside references/, templates/, assets/ and scripts/ ({hermes_unlisted_dirs}) are left out of the skill's file list; the model finds them only if SKILL.md names their paths.", fix: "Move supporting files under references/, templates/, assets/ or scripts/."}notes:diff --git a/src/skillevaluator/harness/profiles/openclaw.yaml b/src/skillevaluator/harness/profiles/openclaw.yamlindex 0039f720..4af80481 100644--- a/src/skillevaluator/harness/profiles/openclaw.yaml+++ b/src/skillevaluator/harness/profiles/openclaw.yaml@@ -5,14 +5,18 @@ roots:project: [skills, .agents/skills]user: [~/.agents/skills, ~/.openclaw/skills]limits: {max_skills_in_prompt: 150, max_prompt_chars: 18000, compact_desc_chars: 220, max_skill_file_bytes: 256000, read_budget: "16,000-64,000 weighted chars of the skills_read result by model context"}+listing: {budget: {skills: 150, desc_chars: 18000, cut: 220}}rules:- {id: OW-ROOT, when: "install_root not in roots", effect: not_loaded, outcome: not found, message: "OpenClaw reads skills/, .agents/skills, ~/.agents/skills and ~/.openclaw/skills.", fix: "Install it under skills/ or .agents/skills in the workspace, or ~/.openclaw/skills."}- {id: OW-DESC-MISSING, when: "description_missing or description_empty", effect: not_loaded, outcome: rejected, message: "Skill dropped: no description.", fix: "Add a non-empty string description."}- {id: OW-STRICT-YAML, when: "frontmatter_tab_indent or frontmatter_duplicate_keys", effect: not_loaded, outcome: rejected, message: "Skill dropped: invalid YAML (tabs or duplicate keys).", fix: "Use spaces, not tabs, and remove duplicate keys."}- {id: OW-SYMLINK-ESCAPE, when: "skill_dir_symlink_target == 'outside_root'", effect: not_loaded, message: "Symlink target is outside the skills root (even inside the repo): rejected.", fix: "Copy the skill into the skills folder instead of symlinking it from elsewhere."}- {id: OW-SYMLINK-FILE, when: "skill_md_symlink", effect: not_loaded, message: "Symlinked SKILL.md files are not loaded.", fix: "Copy SKILL.md into the folder instead of symlinking the file (a symlinked folder works)."}+ - {id: OW-COMPACT, when: "description_codepoints > 220 and (catalog_size > 150 or catalog_desc_chars > 18000)", effect: degraded, outcome: listing shortened, message: "{catalog_size} skills / {catalog_desc_chars} description chars here: over 150 skills or 18,000 chars, OpenClaw cuts descriptions to 220 chars.", fix: "Keep the description under 220 characters, trigger first."}- {id: OW-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: OW-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: OW-PROMPT-CAP, when: "catalog_size > 150 or catalog_desc_chars > 18000", effect: advisory, outcome: listing shortened, message: "{catalog_size} skills / {catalog_desc_chars} description chars here: past 150 skills or 18,000 chars OpenClaw also leaves skills out of the list (121 of 225 listed in our test).", fix: "Shorten descriptions (trigger first) or install fewer skills in one folder."}+ - {id: OW-DUP-NAME, when: "duplicate_name", effect: advisory, message: "Another skill is also named '{skill_name}' ({duplicate_paths}); OpenClaw uses one: workspace skills/, then .agents/skills, then user folders.", fix: "Give each skill a unique name."}- {id: OW-DESC-ESCAPED, when: "description_has_quote", effect: advisory, outcome: text rewritten, message: "Double quotes in the description are shown to the model as " in the skill list.", fix: "Use single quotes in the description if the exact text matters."}notes:- "Precedence: workspace skills/ > .agents/skills > ~/.agents/skills > managed > bundled > extra dirs (project wins, 3/3)."diff --git a/src/skillevaluator/harness/profiles/opencode.yaml b/src/skillevaluator/harness/profiles/opencode.yamlindex 6bc5c0ce..dd0e1d43 100644--- a/src/skillevaluator/harness/profiles/opencode.yaml+++ b/src/skillevaluator/harness/profiles/opencode.yaml@@ -13,6 +13,8 @@ rules:- {id: OC-DESC-EMPTY, when: "description_empty", effect: degraded, message: "Listed by name only.", fix: "Add a non-empty string description."}- {id: OC-DUP-KEY, when: "frontmatter_duplicate_keys", effect: not_loaded, outcome: rejected, message: "Skill dropped: duplicate frontmatter keys.", fix: "Remove the duplicate frontmatter key."}- {id: OC-NESTED, when: "nested_skill_md", effect: degraded, message: "The nested SKILL.md is loaded as a second, separate skill.", fix: "Move the nested skill to its own folder under the skills root, or rename its SKILL.md."}+ - {id: OC-DUP-NAME, when: "duplicate_name", effect: degraded, message: "Another skill is also named '{skill_name}' ({duplicate_paths}); OpenCode picks a random one each run (concurrent loading, last write wins).", fix: "Give each skill a unique name."}+ - {id: OC-RELOAD, when: "always", effect: advisory, message: "Skill list and text are cached at startup; edits need a restart."}- {id: OC-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: OC-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:diff --git a/src/skillevaluator/harness/report.py b/src/skillevaluator/harness/report.pyindex 6bd53627..53129cf8 100644--- a/src/skillevaluator/harness/report.py+++ b/src/skillevaluator/harness/report.py@@ -110,6 +110,16 @@ def _compact_grid(rows: list[dict[str, Any]]) -> Table | None:return grid if grid.row_count else None+def _catalog_line(rows: list[dict[str, Any]]) -> Text | None:+ catalog = next((row["catalog"] for row in rows if row.get("catalog")), None)+ if not catalog or catalog["size"] < 2:+ return None+ folder = catalog["folder"].replace(str(Path.home()), "~", 1) if catalog["folder"] else "this folder"+ return Text.assemble(+ ("catalog ", MUTED), (f"{catalog['size']} skills in {folder} ({catalog['desc_chars']:,} desc chars)", TEXT)+ )++def _detail_grid(rows: list[dict[str, Any]], verbose: bool) -> Table | None:"""Every finding with its fix, under a line naming the harness, its status and verified version."""grid = Table.grid(padding=(0, 2), expand=True)@@ -189,6 +199,9 @@ def harness_panel(for skill, rows in block.items():if parts:parts.append(Text())+ catalog = _catalog_line(rows)+ if catalog is not None:+ parts.extend([catalog, Text()])parts.append(_summary_line(rows, f"{Path(skill).name} " if many else ""))grid = _detail_grid(rows, verbose) if verbose else _compact_grid(rows)if grid is not None:diff --git a/tests/harness/test_overlay.py b/tests/harness/test_overlay.pyindex 701dba3d..d32a92cf 100644--- a/tests/harness/test_overlay.py+++ b/tests/harness/test_overlay.py@@ -3,13 +3,14 @@"""Tests for the advisory harness check, panel and harness-check command."""import json+import refrom pathlib import Pathimport pytestfrom click.testing import CliRunnerfrom skillevaluator.cli import cli-from skillevaluator.harness import HARNESS_STATUSES, evaluate_harnesses, load_profiles, skill_facts+from skillevaluator.harness import HARNESS_STATUSES, evaluate_harnesses, facts_for, load_profiles, skill_factsfrom skillevaluator.harness.overlay import PROFILES_DIRfrom skillevaluator.harness.report import harness_block, harness_note, harness_panelfrom skillevaluator.models.result import Severity@@ -313,6 +314,16 @@ def test_harness_check_command_rejects_unknown_harness(tmp_path: Path):assert "Unknown harness: nope" in result.output+def _catalog(root: Path, count: int, desc_len: int = 300) -> Path:+ skills = root / ".claude" / "skills"+ for index in range(count):+ skill = skills / f"filler-{index:03d}"+ skill.mkdir(parents=True)+ desc = ("Use when testing catalog budgets. " + "x" * desc_len)[:desc_len]+ (skill / "SKILL.md").write_text(f"---\nname: filler-{index:03d}\ndescription: {desc}\n---\n{BODY}")+ return skills++def _rows(skill: Path) -> dict[str, dict]:return {r.harness: r.to_dict() for r in evaluate_harnesses(skill)}@@ -321,6 +332,124 @@ def _ids(rows: dict[str, dict], harness: str) -> set[str]:return {f["id"] for f in rows[harness]["findings"]}+def test_single_skill_is_measured_against_its_installed_folder(tmp_path: Path):+ _catalog(tmp_path, 40)+ rows = _rows(tmp_path / ".claude" / "skills" / "filler-000")++ assert rows["claude-code"]["status"] == "degraded"+ assert "CC-LIST-BUDGET" in _ids(rows, "claude-code")+ assert "CP-LIST-BUDGET" in _ids(rows, "copilot-cli")+ message = next(f["message"] for f in rows["claude-code"]["findings"] if f["id"] == "CC-LIST-BUDGET")+ assert message.startswith("The 40 skills in this folder have 12,000 description chars")+ assert rows["claude-code"]["listed"] == rows["codex"]["listed"] == {"mode": "shortened", "text": ""}+ assert rows["claude-code"]["catalog"]["size"] == 40+++def test_listing_budget_scales_with_context_window(tmp_path: Path):+ skill = _catalog(tmp_path, 34) / "filler-000"++ def ids(tokens: int) -> set[str]:+ rows = {r.harness: r.to_dict() for r in evaluate_harnesses(skill, config={"context_tokens": tokens})}+ return _ids(rows, "claude-code") | _ids(rows, "codex")++ assert {"CC-LIST-BUDGET", "CX-LIST-BUDGET"} <= ids(0)+ assert not {"CC-LIST-BUDGET", "CX-LIST-BUDGET"} & ids(272000)+ assert {"CC-LIST-BUDGET", "CX-LIST-BUDGET"} & ids(200000) == {"CC-LIST-BUDGET"}+++def test_skill_outside_a_skills_folder_has_no_catalog_rules(tmp_path: Path):+ rows = _rows(_skill(tmp_path))++ assert not any(+ f["id"].endswith(("LIST-BUDGET", "DUP-NAME", "PRECEDENCE")) for r in rows.values() for f in r["findings"]+ )+++def test_folder_of_skills_is_its_own_catalog(tmp_path: Path):+ skills = _catalog(tmp_path, 3)+ facts = facts_for(sorted(skills.iterdir()))++ assert {f["catalog_size"] for f in facts.values()} == {3}+ assert {f["catalog_desc_chars"] for f in facts.values()} == {900}+++def test_duplicate_names_report_each_harness_winner(tmp_path: Path):+ skills = _catalog(tmp_path, 2)+ copy = skills / "filler-copy"+ copy.mkdir()+ (copy / "SKILL.md").write_text(f"---\nname: filler-000\ndescription: Use when testing duplicates.\n---\n{BODY}")+ rows = _rows(skills / "filler-000")++ assert rows["opencode"]["status"] == "degraded"+ assert {"CC-PRECEDENCE", "CX-DUP-NAME", "CP-DUP-NAME", "HM-DUP-NAME", "OW-DUP-NAME", "OC-DUP-NAME"} <= {+ f["id"] for r in rows.values() for f in r["findings"]+ }+ assert "(filler-copy)" in next(f["message"] for f in rows["opencode"]["findings"] if f["id"] == "OC-DUP-NAME")+++def _install(folder: Path, dirname: str, name: str | None = None) -> Path:+ skill = folder / dirname+ skill.mkdir(parents=True)+ (skill / "SKILL.md").write_text(+ f"---\nname: {name or dirname}\ndescription: Use when testing catalogs.\n---\n{BODY}", encoding="utf-8"+ )+ return skill+++def test_separate_skills_folders_are_separate_catalogs(tmp_path: Path):+ claude = [_install(tmp_path / ".claude" / "skills", n) for n in ("alpha", "beta")]+ codex = [_install(tmp_path / ".codex" / "skills", n) for n in ("alpha", "gamma", "delta")]++ facts = facts_for([*claude, *codex])++ assert [facts[s]["catalog_size"] for s in claude] == [2, 2]+ assert [facts[s]["catalog_size"] for s in codex] == [3, 3, 3]+ assert not any(f["duplicate_name"] for f in facts.values())+ assert facts[claude[0]]["catalog_base"].endswith(".claude/skills")+++def test_unrooted_skills_given_together_stay_one_catalog(tmp_path: Path):+ pack = [_install(tmp_path / "pack", n, name="same") for n in ("one", "two")]++ facts = facts_for(pack)++ assert {f["catalog_size"] for f in facts.values()} == {2}+ assert all(f["duplicate_name"] for f in facts.values())+++def test_workspace_skills_folder_counts_its_siblings(tmp_path: Path):+ first = _install(tmp_path / "skills", "first", name="same")+ _install(tmp_path / "skills", "second", name="same")++ facts = facts_for([first])[first]++ assert facts["install_root"] is None+ assert facts["catalog_size"] == 2 and facts["catalog_base"].endswith("skills")+ assert "OW-DUP-NAME" in _ids(_rows(first), "openclaw")+++def test_symlinked_skill_folders_count_toward_the_catalog(tmp_path: Path):+ skills = tmp_path / ".claude" / "skills"+ real = _install(skills, "real", name="same")+ store = _install(tmp_path / "store", "linked", name="same")+ (skills / "linked").symlink_to(store, target_is_directory=True)+ (skills / "loop").symlink_to(skills, target_is_directory=True) # a link back to its own folder++ facts = facts_for([real])[real]++ assert facts["catalog_size"] == 2+ assert facts["duplicate_name"]+++def test_reload_guidance_reaches_findings(tmp_path: Path):+ rows = _rows(_skill(tmp_path))++ reload = {f["id"]: f for r in rows.values() for f in r["findings"] if f["id"].endswith("RELOAD")}+ assert set(reload) == {"CP-RELOAD", "OC-RELOAD"}+ assert {f["effect"] for f in reload.values()} == {"advisory"}+ assert {r["status"] for r in rows.values()} == {"loads"}++def test_listed_description_projection(tmp_path: Path):desc = "Use when " + "a" * 1600rows = _rows(_skill(tmp_path, desc=desc))@@ -346,6 +475,17 @@ def test_bundle_files_symlinks_and_large_references(tmp_path: Path):assert "HM-RESOURCE-SYMLINK" in _ids(rows, "hermes")+def test_every_rule_has_a_fix_and_placeholders_are_filled(tmp_path: Path):+ for profile in load_profiles("all"):+ for rule in profile["rules"]:+ assert rule["when"] == "always" or rule.get("fix"), rule["id"]+ skills = _catalog(tmp_path, 200, desc_len=400)+ rows = _rows(skills / "filler-000")+ messages = [f["message"] + f.get("fix", "") for r in rows.values() for f in r["findings"]]+ assert messages and not any(re.search(r"\{[a-z0-9_]+\}", m) for m in messages)+ assert {"OW-COMPACT", "OW-PROMPT-CAP"} <= _ids(rows, "openclaw")++def test_fix_reaches_findings_and_panels(tmp_path: Path):skill = _skill(tmp_path, desc="Use when testing emoji. " + "\U0001f600" * 600)result = HarnessValidator().validate(skill)@@ -366,6 +506,17 @@ def test_description_limit_is_1024(tmp_path: Path, harness: str, rule: str):assert any(f["id"] == rule and "1 over" in f["message"] for f in over[harness]["findings"])+def test_compact_view_shows_worst_finding_per_harness_and_catalog(tmp_path: Path):+ _catalog(tmp_path, 40)+ block = harness_block(run_validation(tmp_path / ".claude" / "skills" / "filler-000", checks="harness"))+ compact, full = _render(harness_panel(block)), _render(harness_panel(block, verbose=True))++ assert "catalog 40 skills in" in compact and "(12,000 desc" in compact+ assert "not found" in compact and "listing shortened" in compact+ assert "[CX-ROOT]" not in compact and "[CX-ROOT]" in full and "[CX-LIST-BUDGET]" in full+ assert len(compact.splitlines()) < len(full.splitlines())++def test_tier1_summary_gives_harness_its_own_line(tmp_path: Path):results = run_validation(_rooted(tmp_path), checks="schema,harness", harness="all")_, rows = summarize_tier1(results)