Ai Ds Composer 标志

Ai Ds Composer

社区
cris-achiardi
ai-ds-composer

Strategic guide for consuming design system metadata to compose components intelligently. Use when generating or modifying UI components and layouts to ensure component reuse, proper variant selection, and adherence to design system patterns. Helps Claude understand project structure, read hierarchical metadata indexes, apply anti-pattern rules, and flag when existing components don't fit a requirement.

Add to TypingMind

概览

发布者cris-achiardi
代码仓库claude-skills
技能名称ai-ds-composer
星标数
72
复刻数
8
附带文件
4
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 4 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 cris-achiardi 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Ai Ds Composer AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/cris-achiardi/claude-skills/tree/main/skills/ai-ds-composer
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cris-achiardi/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/skills/ai-ds-composer .claude/skills/ai-ds-composer
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Ai Ds Composer,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Ai Ds Composer。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Ai Ds Composer 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Design System Component Reasoning

Your role is to help generate UI using existing design system components—not to invent new code. This skill teaches you to reason through design system metadata hierarchically and make component decisions that prioritize reuse.

Core Principle

Consume metadata → Understand intent → Select components → Compose patterns → Flag gaps

Success means high component reuse with intentional, justified decisions.

Getting Started: Understanding the Project

When you encounter a design system request, your first step is understanding the project structure. Read the available documentation:

  1. Top-level system metadata - Usually in src/ or project root, shows framework decisions, philosophies, and metadata hierarchy
  2. Package.json - Reveals framework (Astro, Next.js, etc.), dependencies (React, Vue), styling approach, icon library
  3. CSS metadata (if exists) - How the project structures styling: tokens, utilities, layout patterns

If none of these exist, infer from folder structure and ask the user for clarity. The project stack directly influences which components to suggest (Astro components ≠ React patterns).

Example Metadata Hierarchy

project-root/
├── src/
│   ├── design-system.metadata.ts (top-level: project philosophy)
│   ├── styles/
│   │   └── index.metadata.ts (CSS architecture, token structure)
│   └── components/
│       ├── atoms/
│       │   ├── index.metadata.ts (all atoms, selection guide, priorities)
│       │   ├── Button/
│       │   │   ├── Button.astro (actual component)
│       │   │   └── Button.metadata.ts (variants, props, use cases)
│       │   ├── Heading/
│       │   │   ├── Heading.astro
│       │   │   └── Heading.metadata.ts
│       │   └── ... (other atoms)
│       ├── molecules/
│       │   ├── index.metadata.ts (compositions, common patterns)
│       │   └── ... (cards, form elements, etc.)
│       └── organisms/
│           ├── index.metadata.ts
│           └── ... (hero, sections, etc.)

When working with a project, you'll read metadata at multiple levels—start broad, narrow down to specific.

The Component Selection Algorithm

When you need to suggest a component, follow this flow:

1. Parse the User's Intent

Convert vague requests into clear requirements:

Vague: "Add a button like the one on the homepage" Clear: "Need a primary call-to-action button matching the hero section style, size=lg, with an arrow icon"

Tools for clarity: Ask follow-up questions, reference existing usage, look for patterns in the codebase.

2. Consult the Metadata Hierarchy (Hybrid Approach)

First pass (cache once per conversation):

  • Read design-system.metadata.ts (or infer from structure)
  • Understand project philosophies: "Prefer native HTML" vs "Use components"
  • Note the metadata organization

Subsequent passes (per component decision):

  • Read the appropriate layer index (atoms/index.metadata.ts etc.)
  • Scan the SelectionGuide for your use case
  • Pull the specific component metadata

Example workflow for "I need a button":

1. Cache: Read design-system.metadata → learn "prefer CSS over Spacer, components for interactivity"
2. Lookup: Check atoms/index.metadata → Button is high priority, use cases include "primary-call-to-action"
3. Read: Pull Button.metadata.ts → find variant options (primary/secondary/ghost/danger)
4. Decide: Based on intent, suggest variant + props
5. Verify: Check antiPatterns in Button.metadata → "Never use Button for plain navigation"

3. Apply Selection Criteria

Component metadata contains selectionCriteria or SelectionGuide. Use these to justify your choice:

typescript
// From Button.metadata.ts - these are decision rules
selectionCriteria: {
  usePrimary: "Main action user should take on the page/section",
  useSecondary: "Alternative actions, cancel buttons",
  useGhost: "Tertiary actions, minimal visual weight",
  useDanger: "Delete, remove, destructive actions"
}

Match user intent to these criteria, not your intuition.

4. Check Anti-Patterns (Hard Rules)

Anti-patterns are violations of design system philosophy. They exist in metadata as warnings.

From Button metadata:

antiPattern: "Using button for plain navigation"
reason: "Buttons indicate actions, not navigation"
alternative: "Use Link component for navigation"

Core rule: Never suggest an anti-pattern without explicit user override and human acknowledgment. If the user says "I know, but I need it anyway," that's a decision they own—but flag it clearly.

5. Suggest Composition & Variants

Once you've selected the component, determine:

  • Which component? (e.g., Button)
  • Which variant? (e.g., variant="primary")
  • What props? (e.g., size="lg", disabled={false})
  • How composed? (e.g., Button with Icon inside, following composition rules from metadata)
  • Why this choice? (cite the metadata criterion that led here)

6. Explain Your Reasoning

Always show your thinking by referencing metadata:

Good:

"You need a primary call-to-action. Button metadata shows variant="primary" is used for 'main call-to-action, high visual prominence.' Size should be lg for hero sections, following the composition pattern shown in selectionGuide.actions."

Avoid:

"You need a button. I'll use primary variant because it looks good."

When Components Don't Fit

If the user's request doesn't map to existing components, flag it explicitly:

  1. Identify the gap: "You need X, but the design system has Y. These don't align because..."
  2. Explain why: Reference what exists and why it doesn't work
  3. Don't auto-generate: Don't invent a new component. Instead:
    • Suggest a workaround (compose existing components differently)
    • Explain the implication (e.g., "This would require custom CSS")
    • Let the human decide if it warrants a new component

Example:

"Your use case needs a collapsible accordion with nested groups. The design system has no Accordion component. You could:

  • Compose with existing Button + disclosure patterns (simpler, limits nesting)
  • Create a new Accordion component (more work, but more flexible)

Which approach works for your requirement?"

Handling Vague Metadata Hints

Metadata includes AI-specific fields like aiHints and keywords. Use these as starting points, but rely on structured fields (props, variants, selectionCriteria, antiPatterns) for real decisions.

typescript
// Structured - use this for decisions
variants: { 
  variant: { options: ["primary", "secondary"], default: "primary" }
}

// Helpful but secondary - use for exploration
aiHints: { 
  keywords: ["button", "cta", "submit"]
}

CSS vs Components Decision

Your project likely emphasizes "use native HTML + CSS utilities" when possible, reserving components for complex interactive patterns.

Pattern from atoms/index.metadata.ts:

preferNativeHTML: "Use native <h1>-<h6> instead of Heading when possible"
preferCSS: "Use CSS gap in flex/grid instead of Spacer"

Apply this philosophy:

  • Layout problem? Suggest CSS utilities (grid, flexbox, gap)
  • Spacing issue? Suggest margin/padding utilities, not Spacer component
  • Simple text? Suggest native <p>, not Text component
  • Complex interaction? That's when components shine

Output Format

When suggesting components, structure your response as:

**Component:** Button
**Variant:** primary
**Size:** lg
**Props:** { href: "/features", target: "_blank", rel: "noopener noreferrer" }

**Composition:**
<Button variant="primary" size="lg" href="/features">
  Get Started
  <Icon name="ArrowRight" size={16} />
</Button>

**Why this choice:**
- Selection criteria (from Button.metadata): "Use primary for main call-to-action"
- Pattern reference: Similar to homepage hero button in ThoughtsSection
- Variant logic: lg size for hero context (from size guide)

**Notes:**
- Icon added following Button composition pattern
- External link uses rel="noopener noreferrer" (security best practice)

Working with Reference Files

When the SKILL.md body isn't enough, see the bundled references:

  • COMPONENT_SELECTION.md - Detailed component selection examples across different project types
  • METADATA_STRUCTURE.md - How to read and interpret different metadata formats
  • COMPOSITION_PATTERNS.md - Common component compositions and pattern rules
  • ANTI_PATTERNS.md - Full anti-pattern reference with explanations

Load these when you encounter complexity or need validation.

Key Reminders

  1. Metadata is authority - Your suggestions should always map back to documented metadata, not assumptions
  2. Prefer reuse - Composing existing components > generating new code (every time)
  3. Make trade-offs explicit - If you're choosing component A over B, explain why
  4. Flag gaps early - The human decides if a gap warrants a new component; you identify it
  5. Respect anti-patterns - They exist for reasons in the metadata; violations need explicit override
  6. Cite your sources - Reference which metadata file informed your decision

Next Steps

When ready to apply this skill:

  1. Understand the project structure (folder layout, package.json, top-level metadata)
  2. Parse the user's intent clearly
  3. Navigate the metadata hierarchy
  4. Apply selection criteria and check anti-patterns
  5. Suggest components with reasoning
  6. Flag gaps without auto-generating
  7. Iterate based on feedback

The goal isn't perfect UI from the first prompt—it's intelligent component reuse with clear, justifiable decisions.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Ai Ds Composer AI 技能有什么作用?

Strategic guide for consuming design system metadata to compose components intelligently. Use when generating or modifying UI components and layouts to ensure component reuse, proper variant selection, and adherence to design system patterns. Helps Claude understand project structure, read hierarchical metadata indexes, apply anti-pattern rules, and flag when existing components don't fit a requirement.

为什么在 TypingMind 中使用 Ai Ds Composer?

因为您只需安装一次,就能搭配任何模型使用。Ai Ds Composer 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Ai Ds Composer?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/cris-achiardi/claude-skills/tree/main/skills/ai-ds-composer。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Ai Ds Composer?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Ai Ds Composer 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Ai Ds Composer 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Ai Ds Composer AI 技能免费吗?

是的。cris-achiardi 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇