Claude Code Plugin Overview
The @a16njs/plugin-claude package implements agent customization awareness for Claude Code.
Installation
This plugin is bundled with the a16n CLI. For programmatic use:
npm install @a16njs/plugin-claude
Supported Files
Discovery
- CLAUDE.md:
CLAUDE.md,*/CLAUDE.md - Claude Rules:
.claude/rules/*.md(including subdirectories)- Rules without
paths:frontmatter: GlobalPrompt - Rules with
paths:frontmatter: FileRule
- Rules without
- Claude Skills:
.claude/skills/*/SKILL.md- Simple Skills (single SKILL.md file only)
disable-model-invocation: true: ManualPrompt- others: SimpleAgentSkill
- Complex Skills (hooks, multiple files, resources): Skipped w/ Warning
- Simple Skills (single SKILL.md file only)
- Claude Settings:
.claude/settings.jsonpermissions.denywithRead(): AgentIgnore- Other permission types: Skipped
Emission
- GlobalPrompt:
.claude/rules/<name>.md(individual files) - FileRule:
.claude/rules/<name>.mdwithpaths:YAML frontmatter (native support) - SimpleAgentSkill:
.claude/skills/<name>/SKILL.md - AgentIgnore:
.claude/settings.jsonwithpermissions.deny - ManualPrompt:
.claude/skills/<name>/SKILL.mdwithenable-model-invocation: false
Programmatic Usage
import claudePlugin from '@a16njs/plugin-claude';
import { A16nEngine } from '@a16njs/engine';
// Create engine with Claude plugin
const engine = new A16nEngine([claudePlugin]);
// Discover Claude configuration
const result = await claudePlugin.discover('./my-project');
console.log(`Found ${result.items.length} items`);
for (const item of result.items) {
console.log(` ${item.type}: ${item.sourcePath}`);
}
// Emit to Claude format
const items = [/* AgentCustomization items */];
const emitResult = await claudePlugin.emit(items, './my-project');
console.log(`Wrote ${emitResult.written.length} files`);
Dry Run
// Calculate what would be written without writing
const emitResult = await claudePlugin.emit(items, './my-project', {
dryRun: true,
});
for (const file of emitResult.written) {
console.log(`Would write: ${file.path}`);
}
API Reference
For complete plugin API details, see the Plugin Claude API Reference.
See Also
- Plugin Claude API Reference - Complete API documentation
- Plugin: Cursor - Cursor IDE format plugin
- Understanding Conversions - Conversion details
- Models - Type definitions