generate-component-doc-figma — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited generate-component-doc-figma (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Produce a complete documentation page for one component or component set: overview, anatomy tree, design tokens, variants/states matrix, typography, accessibility, content guidelines, and (optionally) design-code parity and YAML frontmatter. This skill collects structured data from the file via use_figma, then a deterministic Node converter (scripts/generate-doc.mjs) emits the Markdown — the same collected JSON always produces identical Markdown. Do not freehand the doc from prose.
await + return (no IIFE, no figma.closePlugin(); console.log is not returned), inputs inlined as const at the top of each script, colors in 0–1 range, load fonts before any text op, await figma.getNodeByIdAsync(...), and atomic errors (a failed script applies nothing — read the error, fix, retry).use_figma); the converter is Node and runs in a terminal (node scripts/generate-doc.mjs ...). Same split as export-tokens-figma. If you can't run Node, you can't produce the doc — say so rather than freehanding it.annotations-figma skill.export-tokens-figma.URL/ID the user provides. Component sets (with variants) produce the richest docs. Set NODE_ID in the collect script. Also note the file URL (for the figma: link / frontmatter).
scripts/collect-component-data.jsvia use_figma (skillNames: "generate-component-doc-figma"). It returns the anatomy tree, per-variant colors (with bound token id + name), typography (font family, numeric weight + name, size, line height, letter spacing), spacing tokens, component property definitions (variants/booleans/text props), the description, and annotations (with category names). Save the returned JSON to a file (e.g. collected.json).
node scripts/generate-doc.mjs collected.json [--code-info codeInfo.json] [--out docs/components/Button.md] [--frontmatter] [--file-url <figma-url>]It ports the source generator's section logic exactly: Overview (+ When to / When NOT to Use parsed from the description), Component Anatomy, Variants (matrix + icon mapping + configurable props), Token Specification (color + spacing tables), Typography, Content Guidelines, Accessibility, Design Annotations, and — with --code-info — Implementation, Design-Code Parity, and Changelog. cleanVariantName is applied automatically (Type=Image, Size=12 → Image / 12). Same input → identical output.
[View Source] & [Storybook] links,read the component source and write a codeInfo.json (props, importStatement, sourceFiles, baseComponent, changelog, …), then pass --code-info codeInfo.json.
--frontmatter to prepend YAML frontmatter (title, status, version,tags, figma URL, lastUpdated).
path and a one-line summary (variant count, token count).
canvas), await figma.loadFontAsync(...) first. Pure documentation generation reads only.
MAX_DEPTH to keep payloads small for deep trees — raise it only if theanatomy looks truncated.
boundVariables; a color/spacing with no bound variable renders as — in thetoken tables (a hardcoded value to replace with a token).
is missing or malformed.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.