Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,29 @@ All notable changes to SkillEvaluator are documented in this file.
- Repository CI can opt in to reviewed, per-skill SkillSpector baselines from
the PR or merge request's target revision. Policy files from the proposed
changes cannot approve their own exceptions.

- `skillevaluator validate` on a target with no skill, rules, workflows, or
plugin, such as an ordinary source repository, no longer fails Tier 1 with
three `No skills found` errors and exit 1 when every content scan passes.
When `--type auto` detects the type as `unknown`, the `schema`, `version`,
and `quality` checks are now recorded as not applicable, never as passes:
the terminal summary and the HTML report count them as N/A, and the JSON
and Markdown reports list them as skipped with a `not applicable` reason.
The JSON report of every such run adds a root `tier1_applicability` object.
The content scans still run with their unrestricted scope, so a real
finding still fails the run; such a run is never eligible for publication.
A target folder whose own `SKILL.md`, `workflow-rules.mdc`,
`agent_plugin.yaml`/`.yml`, or `.claude-plugin/plugin.json` is mis-cased
(such as `Skill.md`) or a dangling symlink still fails its manifest checks,
and `--type skill` still validates the target as a skill.

- The unknown-artifact CLI guidance links to the published content-types documentation route.

- Security checks preserve authored evaluation files and their findings while
excluding generated outputs. Fully inspected skills with only missing-path
reference caveats retain visible warnings instead of an incomplete-scan
failure; actual coverage gaps and analyzer failures still block.

- PII findings clarify that required author attribution is accepted while
duplicate contact addresses need removal, replacement, or a reviewed waiver.

Expand Down
2 changes: 2 additions & 0 deletions docs/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ The [evaluated source provenance](#evaluated-source-provenance) flags also appea

Auto-detection recognizes: a `SKILL.md` for skills, `.mdc` files for rules, `workflow-rules.mdc` for workflows, and — for plugins — a bundle-reference `agent_plugin.yaml`/`.yml` manifest or a contained `.claude-plugin/plugin.json` manifest. Plugins are validated against their public contract; quality, lint, and version checks are skill-only and skipped for plugins.

When auto-detection finds none of these, the type is `unknown`. Tier 1 then records the `schema`, `version`, and `quality` checks as not applicable (N/A) instead of failing them with `No skills found`, and still runs the content scans. Tier 1 passes when those scans pass; Tier 2 still runs on the target unless `--no-dedup` or `--tiers 1`. The JSON report adds a root `tier1_applicability` object, whichever checks the run selects. Auto-detection also reads the directory names in the target's absolute path, so a repository whose path includes a directory named `skills`, `team-skills`, `team-rules`, `workflows`, or `team-workflows` is detected as that type, not `unknown`. A target folder whose own `SKILL.md`, `workflow-rules.mdc`, `agent_plugin.yaml`/`.yml`, or `.claude-plugin/plugin.json` is mis-cased (such as `Skill.md`) or a dangling symlink still runs the manifest checks, and fails them. A mis-cased manifest below the target is not discovered; validate that folder directly. Pass `--type` to validate the target as a given type anyway. See [Content types](/skills/skillevaluator/tier1-validation#content-types).

`validate` also takes the standard `-r/--report` and `-o/--output-dir` options described under [Global conventions](#global-conventions).

### Tier 1 · Static & Security
Expand Down
10 changes: 10 additions & 0 deletions docs/reports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,16 @@ For CI and tooling, two JSON entry points matter:
different sources abort the run before any report file is written, so a
contradictory identity is never published in one format and reported in
another.
- **Tier 1 applicability**: when `validate --type auto` finds no skill,
rules, workflows, or plugin in the target, the JSON report carries a
top-level `tier1_applicability` object (`applicability: not_applicable`,
`reason_code: unsupported_content_type`, `detected_content_type: unknown`,
`supported_content_types`), whichever checks the run selected. Each of
`schema`, `version`, and `quality` that the run selected and did not
`--skip` is then `skipped`, with a `skip_reason` that starts with
`not applicable`. The key is absent when Tier 1 ran those checks, as it
does for a detected artifact, a forced `--type`, or a folder with a
mis-cased or dangling manifest such as `SKILL.md`.

Both paths speak the same dialect: standalone `tier3 evaluate` and
`validate --tier3` share one HTML renderer for `report.html`, and both embed
Expand Down
12 changes: 12 additions & 0 deletions docs/tier1-validation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ Reports for any of these runs are selected with `-r`/`--report` (`cli`, `json`,

Plugins are validated against their public contract; the `quality`, `lint`, and `version` checks are skill-only and are skipped for plugins, rules, and workflows.

When `--type auto` finds none of these signals, for example in an ordinary source repository, the target's type is `unknown`. There is no manifest to check, so Tier 1:

- Records `schema`, `version`, and `quality` as not applicable instead of failing them with `No skills found`. The terminal summary and the HTML report count them as N/A. The JSON and Markdown reports list them as skipped, with a skip reason that starts with `not applicable`. No report counts them as passes.
- Still runs the content scans (`security`, `pii`, `license`, `code-integrity`, `unicode`, `lint`, and `dependency` when selected), so a real secret or card number still fails the run. The security scan keeps its unrestricted scope.
- Passes when those scans pass. A misspelled `--checks` name still fails. Tier 2 deduplication still runs on the target unless you pass `--no-dedup` or `--tiers 1`, and can still fail the run.
- Adds a root `tier1_applicability` object to the JSON report, whichever checks `--checks` and `--skip` select: `applicability` (`not_applicable`), `reason_code` (`unsupported_content_type`), `detected_content_type` (`unknown`), and `supported_content_types`.
- Is never eligible for publication, because a not-applicable check is not evidence.

Auto-detection also reads the directory names in the target's absolute path. A repository whose path includes a directory named `skills`, `team-skills`, `team-rules`, `workflows`, or `team-workflows`, such as a CI checkout at `/home/runner/work/skills/skills`, is detected as that type, not as `unknown`, and Tier 1 validates it as that type, as before. `--type` forces a type but cannot select `unknown`.

A target folder that itself holds a manifest entry in any letter case (`SKILL.md`, `workflow-rules.mdc`, `agent_plugin.yaml`, `agent_plugin.yml`, or `.claude-plugin/plugin.json`), such as `Skill.md`, or a manifest symlink whose target is missing, is a broken artifact rather than a folder without one, so its manifest checks still run and fail. A `.claude-plugin` folder without a `plugin.json`, such as a marketplace's, does not count. This applies only to the target's own entries: a mis-cased manifest below the target is not discovered; validate that folder directly. Pass `--type skill` (or another type) to validate any target as that type; a missing `SKILL.md` then fails as before. A folder that holds skills below it, such as `.claude/skills/<name>/SKILL.md` or `.agents/skills/<name>/SKILL.md`, is still validated as a collection of skills.

For collections, pass a folder containing skills under `skills/` or `team-skills/`. Folder-level validation discovers each live `SKILL.md` below the target while excluding configured names such as `evals`, `results`, `versions`, `.git`, `.venv`, `node_modules`, and `__pycache__`.

```bash title="Validate a skill or a collection"
Expand Down
18 changes: 18 additions & 0 deletions src/skillevaluator/reporting/console_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,13 @@ def _is_user_skipped(result: ValidationResult) -> bool:
return isinstance(result.metadata, dict) and bool(result.metadata.get("skipped_by_user"))


def _is_not_applicable(result: ValidationResult) -> bool:
"""True when a check was recorded as not applicable to the target instead of run."""
return (
_is_skipped(result) and not _is_user_skipped(result) and "not applicable" in get_skip_reason(result).casefold()
)


def _is_skipped(result: ValidationResult) -> bool:
"""True when a validator was recorded without executing (OSS conventions)."""
if bool(getattr(result, "skipped", False)):
Expand Down Expand Up @@ -1130,6 +1137,11 @@ def summarize_tier1(results: list[ValidationResult], lineup: list[str] | None =
When *lineup* is given, the per-check ticker stays in the completed
section with each check's final state (failed checks in red).
"""
# A check recorded as not applicable did not run: it is neither a pass nor
# a failure, so it is listed on its own row and left out of the counts.
not_applicable = [r for r in results if _is_not_applicable(r)]
results = [r for r in results if not _is_not_applicable(r)]

user_skipped = [r for r in results if _is_user_skipped(r)]
total = len(results) - len(user_skipped)
failed = [r for r in results if not r.passed and not _is_skipped(r)]
Expand Down Expand Up @@ -1163,6 +1175,12 @@ def summarize_tier1(results: list[ValidationResult], lineup: list[str] | None =
if user_skipped:
names = ", ".join(dict.fromkeys(_short_name(r.validator_name) for r in user_skipped))
rows.append(TierRow("skipped", [(names, MUTED), (" with --skip, not checked", FAINT)]))
if not_applicable:
names = ", ".join(
dict.fromkeys(_check_key(r.validator_name) or _short_name(r.validator_name) for r in not_applicable)
)
reason = _bounded_console_line(get_skip_reason(not_applicable[0]))
rows += [TierRow("n/a", [(names, MUTED)]), TierRow("", [(reason, FAINT)], fit="wrap")]

if advisory:
detail = " · ".join(f"{name} {count}" for name, count in sorted(advisory.items(), key=lambda kv: -kv[1]))
Expand Down
15 changes: 15 additions & 0 deletions src/skillevaluator/reporting/json_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,21 @@ def render_all(self, results: list[ValidationResult]) -> str:
if rubric_results:
data["rubric_eval"] = rubric_results[0]

# Tier 1 applicability: ``--type auto`` found no supported artifact, so
# the manifest checks were recorded as not applicable. Every result of
# such a run carries the record, whatever --checks selected, so CI can
# read this instead of parsing skip reasons.
tier1_applicability = next(
(
result.metadata.get("tier1_applicability")
for result in results
if isinstance(result.metadata.get("tier1_applicability"), dict)
),
None,
)
if tier1_applicability is not None:
data["tier1_applicability"] = tier1_applicability

# Tier 3: Agent evaluation summary
if emitted_agent_eval:
data["tier3"] = emitted_agent_eval
Expand Down
2 changes: 1 addition & 1 deletion src/skillevaluator/reporting/templates/report.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@
{% set contributors = tier1_contributors %}
{% set total_validators = ui_t1_executed %}
{% set passed_count = ui_t1_pass %}
{% set skipped_count = tier1_display_summary.skipped_count %}
{% set skipped_count = ui_t1.get('skipped', tier1_display_summary.skipped_count) %}
{% set failed_count = ui_t1.get('fail', tier1_display_summary.failed_count) %}
{% set incomplete_count = ui_t1.get('incomplete', 0) %}
{% set total_issues = tier1_display_summary.total_issues %}
Expand Down
Loading
Loading