Claude Code plugin for a16n
npm install @a16njs/plugin-claude

Claude Code plugin for a16n. Discovers and emits Claude configuration.
This plugin is bundled with the a16n CLI. For programmatic use:
``bash`
npm install @a16njs/plugin-claude
This plugin supports five customization types:
| Type | Claude Format | Description |
|------|---------------|-------------|
| GlobalPrompt | .claude/rules/*.md | Always-active instructions |.claude/rules/*.md
| FileRule | with paths: frontmatter | Glob-triggered via native paths |.claude/skills/*/SKILL.md
| SimpleAgentSkill | | Description-triggered skills |.claude/settings.json
| AgentIgnore | permissions.deny | Files to exclude |
| AgentCommand | Emitted only | Cursor commands become skills |
> Note: Claude has no dedicated command concept. AgentCommands from Cursor are emitted as skills with a description enabling /command-name invocation. The Claude plugin never discovers AgentCommands—conversion is one-way (Cursor → Claude only).
- CLAUDE.md - Root Claude configuration (GlobalPrompt)*/CLAUDE.md
- - Nested Claude configuration files (GlobalPrompt).claude/rules/*.md
- - Native Claude rules (GlobalPrompt if no paths:, FileRule if paths: present).claude/skills/*/SKILL.md
- - Skills with description frontmatter (SimpleAgentSkill).claude/settings.json
- - Permissions deny rules (AgentIgnore)
> Note: Skills with hooks: in their frontmatter are skipped (not convertible to Cursor).Read()
> Note: Only permission denials are discovered (other types like Bash() or Edit() are ignored).
- GlobalPrompt → .claude/rules/ (individual files).claude/rules/
- FileRule → with paths: YAML frontmatter.claude/skills/
- SimpleAgentSkill → with description frontmatter.claude/settings.json
- AgentIgnore → with permissions.deny Read rules.claude/skills/
- AgentCommand → with Invoke with /command description
Rules without paths: frontmatter apply to all files:
`markdownFrom: .cursor/rules/general.mdc
Your instructions for Claude here.
`
Rules with paths: frontmatter apply only when working with matching files:
`markdown
---
paths:
- "*/.tsx"
- "*/.jsx"
---
Use functional components with hooks.
`
`markdown
---
description: Testing best practices
---
Write unit tests first.
Aim for 80% code coverage.
`
`typescript
import claudePlugin from '@a16njs/plugin-claude';
import { A16nEngine } from '@a16njs/engine';
const engine = new A16nEngine([claudePlugin]);
// Discover Claude configuration
const result = await claudePlugin.discover('./my-project');
console.log(Found ${result.items.length} items);
// Emit to Claude format
await claudePlugin.emit(result.items, './my-project');
``
Full documentation available at