跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

component-audit

Audit a design system's component library for health, producing a findings-based assessment of usage, complexity, duplication, and coverage gaps with actionable recommendations. This produces a deep, single-dimension audit of the component library, NOT a cross-cutting system health assessment. Trigger when someone says: audit my components, component health, what components do I have, unused components, component coverage, component review, assess my library, or anything about evaluating the quality and health of a component library. Do NOT trigger for building machine-readable index files or dependency graphs for AI agents — use codebase-index for those. Do NOT trigger for a holistic health summary — use system-health for that.

murphytrueman · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add murphytrueman/design-system-ops --skill component-audit

技能说明


name: component-audit description: "Audit a design system's component library for health, producing a findings-based assessment of usage, complexity, duplication, and coverage gaps with actionable recommendations. This produces a deep, single-dimension audit of the component library, NOT a cross-cutting system health assessment. Trigger when someone says: audit my components, component health, what components do I have, unused components, component coverage, component review, assess my library, or anything about evaluating the quality and health of a component library. Do NOT trigger for building machine-readable index files or dependency graphs for AI agents — use codebase-index for those. Do NOT trigger for a holistic health summary — use system-health for that." references:

  • ../../knowledge-notes/component-governance.md
  • ../../knowledge-notes/component-bestiary-reference.md
  • ../../knowledge-notes/output-discipline.md

Component audit

A skill for auditing a design system's component library across four dimensions: usage signals, complexity distribution, duplication, and coverage gaps. Produces an inventory with tiered findings and a prioritised action list.

Context

Component libraries accumulate silently. New components arrive through contributions. Old components persist because nobody wants to be the one who removes them. Variants proliferate because each edge case adds one more. The result is a library that grows in mass without growing proportionally in value.

A component audit brings the library back into focus: what is there, what is used, what duplicates what, and what is missing that teams have been building around. It is the maintenance work that makes the next year of development faster.


Configuration

Before producing output, check for a .ds-ops-config.yml file in the project root. If present, load:

  • system.framework — pre-selects framework-specific inventory guidance
  • system.component_count — pre-populates the small-system gate
  • severity.* — overrides for finding severity ratings
  • integrations.* — enables auto-pull for component data (see below)
  • recurring.* — enables comparison with previous audit

Auto-pull integrations

If integrations are configured in .ds-ops-config.yml, pull data automatically:

Figma MCP (integrations.figma.enabled: true):

  • Read the published library from integrations.figma.file_key via Figma MCP
  • Extract the component inventory: names, variant counts, description status
  • Use Figma library analytics (if available via REST API) to pull detach rates per component — high detach rates are a direct usage signal
  • Cross-reference the Figma inventory against the code inventory to detect components that exist in design but not in code (or vice versa)

npm registry (integrations.npm.enabled: true):

  • Pull download statistics for integrations.npm.package_name (or each package in integrations.npm.scoped_packages for monorepos) using npm view [package] --json or the npm registry API
  • Use download trends (last 30 days, last 90 days) as a usage signal in Dimension 1
  • For monorepos: note that per-package downloads are unreliable (see monorepo handling) — use as a directional signal only

Storybook (integrations.storybook.enabled: true):

  • Fetch the story index from integrations.storybook.url/index.json
  • Extract component list, story counts per component, and documentation status
  • Components with zero stories are likely undocumented — flag in Dimension 1

GitHub (integrations.github.enabled: true):

  • Use gh api search/code to count import references for each component across consuming repositories
  • Pull PR activity for the component library — components with no PRs in 12+ months are likely stale
  • Pull open issues tagged with component names to surface known problems

Documentation platform (integrations.documentation.enabled: true):

  • If platform is zeroheight: use the Zeroheight API to pull page list and last-updated dates per component
  • If platform is supernova: use the Supernova API to pull component documentation coverage
  • If platform is storybook: same as Storybook integration above (docs tab status)
  • Map documentation coverage to the component inventory — components without docs pages are flagged in Dimension 3

If an integration fails, log it and proceed with manual input.

Step 0: Identify what you're looking at

Before auditing components, determine what kind of shared UI this is. The library type changes which dimensions matter and how findings should be framed.

Classify from codebase signals:

  • Design system — Full template applies. All four audit dimensions (usage, complexity, duplication, coverage) plus composition graph and AI readiness.
  • Component library — Focus on complexity distribution, duplication, and coverage gaps. Usage signals may not exist yet — note this rather than flagging it as a problem. Skip AI readiness unless the team has signalled interest.
  • Pattern library — Focus on duplication and documentation completeness per pattern. Complexity distribution is less meaningful because patterns are reference implementations, not consumed packages. Coverage gaps should be framed as "patterns your team builds frequently but hasn't documented" rather than "components missing from the system."
  • Utility collection — Focus on duplication and naming consistency. A utility collection with overlapping helpers is actively harmful; one with clear, non-overlapping utilities is doing its job. Skip coverage gaps — a utility collection is not trying to be comprehensive.

Include the classification in the report header as "Library type: [Design system / Component library / Pattern library / Utility collection]" and skip dimensions that don't apply.


Step 1: Gather the component inventory

Ask for or confirm (skip questions already answered by auto-pull):

  • Access to the component library: Figma library, Sto
阅读完整来源 ↗