Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/adityaraj0421/naksha-studio/component-docsgit clone --depth 1 https://github.com/Adityaraj0421/naksha-studioWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00028 | $0.02097 |
| Opus 5 | $0.00014 | $0.01048 |
| Sonnet 5 | $0.00006 | $0.00419 |
| Haiku 4.5 | $0.00003 | $0.00210 |
Grade A, and why
component-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 278 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/component-docs
You are generating component documentation from Figma component sets. This creates Storybook-style reference docs with visual examples, prop tables, usage guidelines, and code snippets.
Input: $ARGUMENTS
Read ${CLAUDE_PLUGIN_ROOT}/skills/design/references/design-system-lead.md for token/component architecture and ${CLAUDE_PLUGIN_ROOT}/skills/design/references/figma-creation.md for Figma API patterns.
Process
1. Connect & Identify Components
figma_get_status → verify Desktop Bridge connection
Find all component sets in the file:
figma_execute: `
await figma.loadAllPagesAsync();
const sets = figma.root.findAllWithCriteria({ types: ['COMPONENT_SET'] });
const components = figma.root.findAllWithCriteria({ types: ['COMPONENT'] })
.filter(c => c.parent?.type !== 'COMPONENT_SET');
return {
componentSets: sets.map(cs => ({
id: cs.id,
name: cs.name,
variantCount: cs.children.length,
variants: cs.children.map(v => v.name),
properties: cs.componentPropertyDefinitions
? Object.entries(cs.componentPropertyDefinitions).map(([key, def]) => ({
name: key.split('#')[0],
type: def.type,
defaultValue: def.defaultValue,
variantOptions: def.variantOptions
}))
: [],
description: cs.description,
page: cs.parent?.parent?.name || cs.parent?.name
})),
standaloneComponents: components.map(c => ({
id: c.id,
name: c.name,
description: c.description,
page: c.parent?.parent?.name || c.parent?.name
}))
};
`
2. Extract Component Details
For each component set, gather detailed specs:
Visual Specs
figma_execute: `
const cs = await figma.getNodeByIdAsync('COMPONENT_SET_ID');
const variants = cs.children.map(v => {
const texts = v.findAllWithCriteria({ types: ['TEXT'] });
return {
name: v.name,
width: Math.round(v.width),
height: Math.round(v.height),
layoutMode: v.layoutMode,
padding: v.paddingLeft ? {
top: v.paddingTop, right: v.paddingRight,
bottom: v.paddingBottom, left: v.paddingLeft
} : null,
itemSpacing: v.itemSpacing,
cornerRadius: v.cornerRadius,
fills: v.fills?.map(f => {
if (f.type === 'SOLID') {
const c = f.color;
return '#' + [c.r, c.g, c.b].map(x => Math.round(x * 255).toString(16).padStart(2, '0')).join('');
}
return f.type;
}),
textContent: texts.map(t => ({
text: t.characters?.substring(0, 50),
fontSize: t.fontSize,
fontWeight: t.fontName?.style
}))
};
});
return variants;
`
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 278 lines · 28 tokens per session scan A 524cc2003448
component-docs is a command published in the GitHub repository Adityaraj0421/naksha-studio (316 stars, last pushed 2mo ago), licensed MIT. It adds 28 tokens to every session and 2,097 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
full-diagnostic
Comprehensive design system health sweep.
release-check
Pre-release validation pipeline for a component.
describe-component
Generate an AI-optimised component description.
docs-coverage
Audit whether your documentation surface keeps pace with your components.
drift-check
Detect where teams are diverging from the system.
governance-review
Quarterly governance review package.