Skip to content

feat: a Claude Code plugin, and the /ai-agents page - #207

Merged
sergioazoc merged 3 commits into
mainfrom
feat/claude-code-plugin
Sep 26, 2026
Merged

sergioazoc merged 3 commits into
mainfrom
feat/claude-code-plugin

Conversation

@sergioazoc

Copy link
Copy Markdown
Owner

Part of the 1.14.0 roadmap (7.3 and 7.4). Stacked on #206, because the plugin bundles the agent skill.

The plugin (agent/claude-code, listed by .claude-plugin/marketplace.json)

/plugin marketplace add sergioazoc/oxlint-tailwindcss
/plugin install oxlint-tailwindcss@oxlint-tailwindcss
  • Language server. .lsp.json starts the project's own oxlint --lsp through scripts/oxlint-lsp.mjs, which finds node_modules/.bin/oxlint from the project root upward. I checked empirically that oxlint 1.85's server runs JS plugins. It pushes publishDiagnostics (it has no pull endpoint), design-system rules included, and needs no settings.
  • Check before Claude finishes. hooks/hooks.json:
    • PostToolUse (Edit|Write|MultiEdit) records each lintable file.
    • Stop lints the recorded files with the project's oxlint. If tailwindcss(...) reports errors, the hook exits 2 with the list on stderr, which Claude Code feeds back to Claude.
    • Warnings and files Claude didn't touch don't count.
    • It never blocks twice in a row (stop_hook_active), and does nothing when the project has no oxlint.
    • The hook format follows code.claude.com/docs/en/hooks.
  • Skill. It bundles the agent skill, a copy that generate writes.
  • Validation. claude plugin validate . --strict and claude plugin validate ./agent/claude-code --strict both pass.

Docs

  • New page /ai-agents (EN/ES), covering the skill, the plugin and anything else agents can use. It is not /agents: packages/docs/AGENTS.md is a symlink, and on a case-insensitive file system agents.md is that file. The manifest test pins this.
  • Root README gains a section, and CLAUDE.md gains a layout note plus a release step: bump plugin.json with the package, and regenerate the bench results.
  • CHANGELOG entry.

Tests

  • tests/agent/stop-lint-lib.test.ts covers:
    • finding oxlint;
    • which edits are recorded, per session (MultiEdit is read in any of its shapes);
    • that only the plugin's errors send Claude back, never twice in a row.
  • tests/agent/claude-plugin-manifest.test.ts covers the marketplace entry, and that the hook and LSP scripts exist. It also checks that the LSP covers every file oxlint lints, that version equals the package's, and that the bundled skill is identical to the published one.
  • tests/e2e/agent-stop-hook.test.ts runs the real hooks through their stdin/exit-code contract against a temporary project with its own oxlint shim.
  • tests/e2e/oxlint-lsp.test.ts uses real JSON-RPC through the wrapper and checks that the no-unknown-classes diagnostic is published.
  • es-parity now treats absolute links to the site's /es/ pages as twins of the English ones.
  • Two lint warnings in bench/lib (from docs: /benchmark and /comparison, generated from a scored bench #205) are fixed.
  • The full gate passes: 3515 + 309 tests, plus the docs build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RUT7rPMjxs3XUap9hf51ay

@sergioazoc
sergioazoc changed the base branch from docs/consumer-skill to main September 26, 2026 16:46
agent/claude-code, listed by .claude-plugin/marketplace.json, starts the project's own
oxlint --lsp as a language server, and checks the files Claude edited before it finishes:
PostToolUse records each edit, Stop lints them with the project's oxlint and sends Claude
back once with the tailwindcss(...) errors. It bundles the agent skill. The /ai-agents
page (EN/ES) documents it with the skill.
Expected paths are resolve()d, as the code resolves them onto the current drive, and the
LSP test shuts the server down as a client does (shutdown, then exit), so oxlint doesn't
outlive the killed wrapper and hold the project directory.
@sergioazoc
sergioazoc merged commit 8e6f3fd into main Sep 26, 2026
11 checks passed
@sergioazoc
sergioazoc deleted the feat/claude-code-plugin branch September 26, 2026 20:40
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.

1 participant