Skip to content

Add plugin and skill linting to the PR check workflow - #8

Merged
github-actions[bot] merged 2 commits into
mainfrom
ditto/relaxed-turing-x1qf5m
Oct 16, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
ditto/relaxed-turing-x1qf5m

Conversation

@whoamimi

Copy link
Copy Markdown
Owner

Summary

The check job now runs these steps before auto-merge:

Step What it enforces
claude plugin validate --strict Marketplace and every plugin manifest; warnings (e.g. unknown fields, missing version/description/author) now fail
scripts/lint-plugins.py (new, stdlib only) Anthropic's plugin reference and skill authoring best practices, below
ruff check --select E9,F Python syntax errors and pyflakes issues in bundled scripts
shellcheck scripts/*.sh Shell script hygiene
README tree check Fails if scripts/update-readme-tree.sh would change README.md

lint-plugins.py errors on: skill name not kebab-case, over 64 characters, containing anthropic/claude, or not matching its folder; missing/over-1,024-character description or XML tags in it; SKILL.md body ≥ 500 lines; Windows-style link paths; SKILL.md outside skills/<name>/; plugin-root CLAUDE.md; manifest name or version disagreeing with its marketplace entry; missing version/description/author; missing icon file; plugin folders not listed in the marketplace; .DS_Store/__pycache__ junk.

It warns (does not fail) on: descriptions not in the third person or without a "Use when …" clause, nested .md references, missing link targets, and reference files over 100 lines without a ## Contents section.

Also adds a Checks section to the README with the commands to run locally.

Verification

  • All steps pass locally on this branch (0 errors; 3 warnings for mimi-core descriptions that lack a "Use when" clause).
  • Negative test on a copy: a Claude_Edit skill name, an unlisted plugins/stray folder and a .DS_Store each produce an error.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N6QLSr7Xy6yQNtiWmjghNz


Generated by Claude Code

Add scripts/lint-plugins.py, which checks skills and manifests against
Anthropic's plugin reference and skill authoring best practices. The
check job now also runs strict plugin validation, ruff on Python
scripts, shellcheck on shell scripts, and fails when the README
directory tree is out of date. Document the checks in the README.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N6QLSr7Xy6yQNtiWmjghNz
Copilot AI lite review requested due to automatic review settings October 16, 2026 17:02
The README tree check failed in CI because the committed tree listed a
local .ruff_cache whose contents differ on every run. Add a .gitignore
for caches and OS files, generate the tree with --gitignore, and make
the lint junk check look only at files tracked by git.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N6QLSr7Xy6yQNtiWmjghNz
@github-actions
github-actions Bot merged commit 6efbdb5 into main Oct 16, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Moderate correctness and workflow issues remain unresolved.

2 open findings
What changed in this PR

Adds plugin and skill linting, CI quality checks, and local verification documentation.

Changes:

  • Adds scripts/lint-plugins.py.
  • Expands CI with strict validation, Ruff, ShellCheck, and tree checks.
  • Documents checks and updates the README tree.
File Summary Review findings
scripts/​lint-plugins.py Implements plugin and skill validation. Fix the 500-line boundary, Windows-path detection, and skill-root validation.
README.md Documents checks and updates the repository tree. Remove .ruff_cache entries and document validation across all plugins.
.github/​workflows/​pr-check-and-merge.yml Runs validation and linting before merge. Exclude .ruff_cache from README tree generation.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/lint-plugins.py
Comment on lines +123 to +124
if len(body) > BODY_MAX_LINES:
error(skill_md, f"body is {len(body)} lines (keep it under {BODY_MAX_LINES})")
Comment thread scripts/lint-plugins.py
if (plugin_dir / "CLAUDE.md").exists():
error(plugin_dir / "CLAUDE.md", "a plugin-root CLAUDE.md is not loaded; move its instructions into a skill")
for stray in plugin_dir.rglob("SKILL.md"):
if stray.parent.parent.name != "skills":
Copilot AI lite review requested due to automatic review settings October 16, 2026 17:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Four unresolved moderate issues remain in the linter and ignore-file changes.

2 open findings
Previously missed (1)

In code that hasn't changed since last review

Medium severity Check Windows backslashes before URI detection

scripts/​lint-plugins.py:94

A Windows drive path such as c:\\docs\\guide.md matches the URI check on line 90 and is skipped before the backslash check, so this advertised error is not reported for that form of Windows-style link. Check for backslashes before treating a target as an external URI (or explicitly exclude drive-letter paths).

🧠 Review effort: Lite

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants