Skip to content

[FEA]: Letter-grade quality score for plugins, hooks and mods #508

Open

Description

@lucas-saldanha-werneck

Problem to solve

Skills get a deterministic quality score (0-100, A-F) across Correctness, Discoverability, Reliability and Efficiency. Plugins only get a pass/fail check count from the plugin checks, and hooks and mods get no score at all. A plugin author cannot tell how "good" the parts around the skills are: the manifest and marketplace entry, command and agent descriptions, hook wiring (${CLAUDE_PLUGIN_ROOT}, timeouts, matchers), mod modules and the descriptions of the tools a mod registers, or the context the plugin adds to every session.

We searched the open and closed issues, PRs, discussions, docs and all branches on 13 Nov 2026 and found nothing that plans a letter grade for plugins, hooks or mods. #329 (moving the four skill dimensions to YAML) and #394 (public plugin assessment) touch nearby code but not this.

Proposed approach

Same scale as the skill score, applied to a plugin's own parts. Four dimensions with the same names and weights (0.35 / 0.25 / 0.25 / 0.15), each starting at 100 and losing fixed points per rule, the same grade cut-offs, the same --min-score (default 70), and error rules that block. No LLM, no network, no API key. Security is not scored; it stays in the existing gates (SkillSpector, Code Risk, Secrets).

What is scored, per type

  • Manifest + marketplace: schema validity (reusing validate_manifest_fields), component paths (reusing the plugin_component_path_* findings), name format and reserved terms, author and version. Author/version also count when they are only in the plugin's marketplace.json entry; keywords is never required.
  • Commands and agents: a description on each (10 points each, capped at 30).
  • Hooks (Claude Code only): hooks file without the "hooks" wrapper (does not load), unknown events, commands that call plugin files without ${CLAUDE_PLUGIN_ROOT}, state written into ${CLAUDE_PLUGIN_ROOT}, missing timeout, scripts run directly without an execute bit, scripts without error handling, PreToolUse/PostToolUse handlers that match every tool, large fixed text injected on SessionStart/UserPromptSubmit. Shell form and exec form (command + args) are both read.
  • Mods (Claude Code only): modules must be a list of existing files inside the plugin that export register; literal descriptions of $.tool.register / $.command.register must exist and be at least 20 characters (the text the model reads before calling the tool); tool.call / ui.render handlers without a filter object; mods need *.test.ts tests. Mods are read statically (a small scanner that respects strings, comments and braces); a description that is not a string literal is never scored, only counted in unresolved_registrations.
  • Whole plugin: README present, a limitations/troubleshooting section, tests present, always-on context below 5,000 estimated tokens (reusing plugin_context_cost).

Rules for hooks, mods and ${CLAUDE_PLUGIN_ROOT} apply only to Claude Code manifests; for Codex, Cursor, Agent Plugins and OpenClaw manifests they are listed under not_applicable.

Rules (30) and their sources — every rule cites the Claude Code doc page it follows or the skill rule it mirrors:

Dimension Rules (points)
Correctness manifest_invalid (error, 15), hooks_file_unwrapped (error, 15), component_path_missing (error, 15), component_path_outside_root (15), name_format (15), name_reserved (15), author_missing (5), version_missing (5), hook_without_plugin_root (10), state_in_plugin_root (10), hook_event_unknown (15), mod_module_invalid (error, 15)
Discoverability description_short (20), description_long (5), description_vague (15), description_person (15), component_description_missing (10 each, cap 30), mod_registration_description (10 each, cap 30), readme_missing (10), hook_status_message_missing (5)
Reliability hook_script_error_handling (5), hook_timeout_missing (5), script_not_executable (10), tests_missing (10, not for mods), mod_tests_missing (10), readme_limitations_missing (5)
Efficiency context_cost_high (15), hook_matcher_broad (10), hook_static_context_large (10), mod_unfiltered_handler (5)

Sources: plugins-reference, hooks, mods reference, mods API, mods testing, and the matching skill rules. Left for later: invalid hook matchers (Claude Code matchers are JavaScript regexes; Python cannot decide them all statically).

Passing. A plugin passes when its score is at least --min-score, no error rule fired, and every bundled skill passes its own skill quality score (the same logic as a folder of skills). Bundled skills keep their skill score; it is not averaged into the plugin score.

Advisory by default. Inside validate --type plugin, the quality check (skipped for plugins today) runs the plugin score and reports it without changing the exit code; --enforce-plugin-quality makes it fail. --checks quality / --skip quality work unchanged. A new plugin-quality-check command (also tier1 plugin-quality-check) runs only this score and exits non-zero when the plugin does not pass, like quality-check.

Config. Rules, points, severities, parameters and sources live in a packaged plugin-quality-default.yaml, separate from quality-default.yaml; --plugin-quality-config merges a custom file over it (same loader helpers, same digest/provenance in the report). If #329 lands, the plugin rules can move into the same format.

Coexists with #394. It does not depend on #394: it reads the plugin through plugin_inventory_for_root and adds a plugin_quality block to the JSON report next to quality_summary, plus a console table. The skill score's output does not change. The edits to skill code are small and covered by the existing tests: two word lists move to constants.py, and models/quality.py gains optional rule_id/file/line on an issue (deduct and _issue_dict), which are left out of the serialized skill issue.

Numbers from a prototype. We ran it on 65 real plugins: the 41 plugins of the official Anthropic catalog (claude-plugins-official) and 24 plugins of our own community catalog (clean git archive copies).

Group Plugins Mean Median A B C D F Passed
Official catalog 41 94.8 96.2 39 2 0 0 0 36/41
Our catalog 24 97.1 97.8 24 0 0 0 0 24/24

The 5 official plugins that do not pass all score A or B; each has a bundled skill that fails its own skill quality score.

Rules that fired (official / ours): readme_limitations_missing 32/41 · 23/24, tests_missing 39/41 · 0/24, version_missing 10/41 · 0/24, description_long 9/41 · 0/24, hook_timeout_missing 5/41 · 0/24, description_person 3/41 · 7/24, hook_status_message_missing 0/41 · 9/24, mod_unfiltered_handler 1/41 · 4/24, hook_script_error_handling 3/41 · 1/24, name_reserved 3/41 · 0/24, readme_missing 2/41 · 0/24, hook_matcher_broad 1/41 · 0/24. The other 18 rules fired on none of the 65 (they are covered by unit tests, one fixture per rule).

Scores cluster high because most deductions are 5-10 points on dimensions that start at 100, as with the skill score. Three plugins were checked by hand (one with hooks, one mod with hooks + modules, one skills-only): every deduction matched the file, every rule that could have fired was confirmed absent, and the recomputed score matched the report.

Validation found one gap during the corpus run, fixed before these numbers: exec-form hooks (command + args) hid the script from the hook rules. A later code review found more (a crash on scripts//run.sh, hooks in a skill frontmatter flagged as an unwrapped hooks file, OpenClaw scored by display name, false positives for reads of ${CLAUDE_PLUGIN_ROOT}, cd ${CLAUDE_PLUGIN_ROOT} && ./x.sh, matcher ".*"); the fixes were re-run on the same 65 plugins and moved no score (re-run 13 Nov 2026 on commit 5899676 of the branch).

PR plan (small PRs, only if you agree):

  1. Model (PluginQualityScoreResult, optional rule_id/file/line on issues) + packaged YAML and loader.
  2. Readers: marketplace entry lookup, static mod reader.
  3. Rules and the validator (four dimensions, bundled skills, advisory/enforced).
  4. CLI (plugin-quality-check, quality step for plugins, flags) and reporters (JSON block, console table), with the regenerated CLI golden.
  5. Docs page (docs/plugin-quality-score.mdx), CLI reference and CHANGELOG.

Additional context

The implementation is ready and tested on a branch of our fork: https://github.com/lucas-saldanha-werneck/SkillEvaluator/tree/feat/plugin-quality-score (99 new tests, plus 37 regression tests added after a code review; make lint passes; the full suite gives 31,995 passed and 36 failed, and the same 36 fail on the base commit a2da2440 without this branch: Docker/Harbor, LLM client and network tests). We'd be glad to open the PR(s) ourselves. If you'd rather implement it your way, we'd appreciate a Co-authored-by: line for the parts based on this branch.

Questions for the maintainers:

  1. Should the plugin score fail validate --type plugin by default instead of being advisory?
  2. Should the plugin rules use the YAML format of [FEA]: Move other Tier 1 configs from code to yaml files #329 if that lands first?
  3. Are mods in scope for the official tool?
  4. Do the names plugin-quality-check, --enforce-plugin-quality and --plugin-quality-config work for you?
  5. readme_limitations_missing compares heading text, like the skill's expected headings. Should it accept other limitation-style headings (for example ## Limits or ## Caveats)?

Activity

  1. self-assigned this
    on Nov 13, 2026
  2. chrisknvidia commented on Nov 13, 2026

    @chrisknvidia
    Collaborator

    Thanks for the write-up, the per-type rule list is useful.

    The plugin path is being reworked in #394, and this score would sit on top of the manifest, hook and component checks that PR changes. We'll come back to this once #394 is merged so the rules land against the final shape of that code. Leaving this open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions