Design Farmerのロゴ

Design Farmer

コミュニティ
hakilee
design-farmer

Automated design system construction from repository analysis to production-ready implementation. Analyzes codebases, extracts design patterns, builds token hierarchies with OKLCH color management, implements accessible components with tests, and verifies through multi-reviewer panels. Use when: "build design system", "design tokens", "component library", "design-farmer"

概要

公開者hakilee
リポジトリdesign-farmer
スキル名design-farmer
スター
61
フォーク
13
同梱ファイル
26
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 26個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    hakileeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Design Farmer」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/hakilee/design-farmer/tree/main/skills/design-farmer
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hakilee/design-farmer.git /tmp/design-farmer
mkdir -p .claude/skills
cp -r /tmp/design-farmer/skills/design-farmer .claude/skills/design-farmer
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDesign Farmerを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にDesign Farmerを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Design Farmerは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Design Farmer

From seed to system — cultivate a production-ready design system from any codebase.

Design Farmer analyzes your repository, extracts existing design patterns, and grows them into a structured, accessible, OKLCH-native design system with tokens, components, tests, and documentation.


Version Check

Before doing anything else, run the version check silently:

bash
_DF_UPDATE=$(bash ~/.claude/skills/design-farmer/bin/version-check 2>/dev/null || true)

If _DF_UPDATE starts with UPGRADE_AVAILABLE:

  1. Parse the output: UPGRADE_AVAILABLE <current> <latest>
  2. Ask the user via AskUserQuestion:
Design Farmer **v{latest}** is available (you're on v{current}).

Options:
- A) Update now — run the installer, then restart
- B) Continue with current version
- C) Skip — don't ask again this session
  • If A: output the install command below and stop. The user must re-invoke after updating.
bash
curl -fsSL https://raw.githubusercontent.com/ohprettyhak/design-farmer/main/install.sh | bash
  • If B or C: continue to the next section.

If the script is missing, fails, or times out, continue silently — never block on a version check failure.


Bundle Integrity Gate

This skill is distributed as a bundle: the router SKILL.md, phase files under phases/, and companion docs under docs/ must all be present.

Before starting work, Read phases/operational-notes.md to verify the bundle is accessible.

Before each phase, Read the corresponding phase file using the Read tool with its full path (e.g., Read("~/.claude/skills/design-farmer/phases/phase-0-preflight.md")). If the Read call fails (file not found), the bundle is incomplete — STOP immediately and report:

Status: BLOCKED
Reason: Incomplete Design Farmer bundle — required file missing: {path}
AskUserQuestion: "The installed Design Farmer skill bundle is incomplete (`{path}` is missing). Please reinstall or provide the missing file before I continue."

Important: Do NOT use Glob or Search tools with patterns like phases/*.md to verify phase files — these patterns may return zero results due to tool-specific path resolution behavior. Always use Read with the exact file path.

Do NOT guess missing phase behavior from memory.


Phase Architecture

This skill is decomposed into specialized phase files under phases/. Load only the file for the current phase plus any explicitly referenced companion file.

PhaseFilePurpose
0phases/phase-0-preflight.mdDetect project topology, frameworks, package manager, and existing design artifacts
1phases/phase-1-discovery.mdRun the one-question-at-a-time discovery interview and build DesignFarmerConfig
2phases/phase-2-repo-analysis.mdAssess design maturity, inventory components, and extract repository patterns
3phases/phase-3-pattern-extraction.mdNormalize color/typography/spacing patterns into token-ready design primitives
3.5phases/phase-3.5-visual-preview.mdGenerate and review a design preview before implementation begins
4phases/phase-4-architecture.mdDefine token hierarchy, directory structure, build pipeline, and CSS layering
4bphases/phase-4b-theming.mdDefine theme system, provider implementation, dark mode, and styling approach
4.5phases/phase-4.5-design-source-of-truth.mdGenerate and maintain DESIGN.md as the persistent design reference
5phases/phase-5-tokens.mdImplement primitive/semantic/component tokens and token tests
6phases/phase-6-components.mdImplement components in dependency order
7phases/phase-7-storybook.mdSet up Storybook and visual documentation when the user wants it
8phases/phase-8-review.mdRun multi-reviewer verification and aggregate risk
8.5phases/phase-8.5-design-review.mdRun rendered visual QA with browser tooling or manual fallback
9phases/phase-9-documentation.mdGenerate docs, final verification output, and completion report
10phases/phase-10-integration.mdIntegrate the design system into the application when requested
11phases/phase-11-readiness-handoff.mdProduce release-readiness verification and handoff output

Reference Files

FilePurpose
phases/operational-notes.mdDelegation strategy, escalation rules, OKLCH reference, forbidden patterns
docs/PHASE-INDEX.mdConcise phase responsibilities and handoff map
docs/QUALITY-GATES.mdStructural and behavioral quality gates for maintainers
docs/MAINTENANCE.mdUpdate workflow, anti-drift checks, and contribution checklist
docs/EXAMPLES-GALLERY.mdExample outcomes and reference scenarios
examples/DESIGN.mdFully filled-in DESIGN.md example (Nova UI) for greenfield reference

AskUserQuestion Tool Usage — MANDATORY

CRITICAL: When a phase file says "Via AskUserQuestion, ask:" or "ask via AskUserQuestion:", you MUST call the AskUserQuestion tool. Do NOT output the question as regular text or markdown. The blockquoted text following the instruction is the CONTENT for the tool call, not text to display.

Every AskUserQuestion call must:

  1. Use the AskUserQuestion tool with structured questions, header, and options parameters.
  2. Wait for the tool to return the user's response before taking any further action.
  3. Never proceed past a → STOP marker until the user's response has been received from the tool.

If you output question text without calling the tool, the user cannot respond and the pipeline breaks.


Voice & Tone

  • Speak like a senior design engineer pairing with the user — direct, specific, opinionated with reasoning.
  • Name the file, the token, the component. Never speak in abstractions when a concrete path exists.
  • One decision per question. Never batch multiple choices into a single prompt.
  • Recommend the complete option. With AI assistance, thoroughness costs seconds more than shortcuts.
  • When uncertain about the user's intent, ask. When certain, act and explain.

Completion Status Protocol

Every phase concludes with one of:

  • DONE — Phase complete with evidence (files created, tests passing, screenshots captured).
  • DONE_WITH_CONCERNS — Phase complete but issues flagged for user awareness.
  • BLOCKED — Cannot proceed. State what is missing and what would unblock.
  • NEEDS_CONTEXT — Missing information that only the user can provide. Ask one question.

Fallback & Degradation Protocol

Every phase that delegates to an Agent or uses an external tool MUST define a fallback path. The pipeline NEVER silently fails.

Compatibility note: some runtimes represent delegation explicitly as Agent(prompt="...").

Degradation Pattern

Try primary path:
  If success → continue to next phase
  If failure (timeout, token limit, tool unavailable):
    Log: "[DEGRADATION] Phase {N}: {primary} failed ({reason}). Using {fallback}."
    Execute fallback path
    If fallback succeeds → continue with DONE_WITH_CONCERNS
    If fallback also fails:
      Escalate to user with BLOCKED status
      AskUserQuestion: "Both primary and fallback failed for {phase}. Error: {error}. How to proceed?"

Fallback Registry

PhasePrimary PathFallback Path
Phase 2 (Analysis)Structured repository analysis pass (specialized delegation preferred)Direct Grep/Glob scanning with reduced depth
Phase 3 (Extraction)Specialized analysis passManual OKLCH extraction via inline math
Phase 3.5 (Visual Preview)Generated preview HTMLText-only preview summary and user approval gate
Phase 4.5 (DESIGN.md)Structured design-document draftingWrite DESIGN.md directly with the documented template
Phase 5 (Tokens)Specialized implementation passImplement tokens directly with Edit/Write
Phase 6 (Components)Specialized implementation passImplement components directly with Edit/Write, one at a time
Phase 7 (Storybook)storybook init via the detected package managerManual .storybook config + story file generation
Phase 8 (Review)5 specialized reviewer passes (parallel when supported)Sequential review with combined criteria
Phase 8.5 (Visual QA)Headless browser screenshotsManual verification prompt with user-provided screenshots
Phase 9 (Docs)Structured documentation draftingWrite docs directly with Write tool
Phase 10 (Integration)Structured application changesGuided step-by-step instructions for manual execution
Phase 11 (Readiness)Automated verification + readiness handoffManual readiness report with explicit failed-gate summary

Execution Flow

Execute phases sequentially. Before starting each phase:

  1. Read phases/operational-notes.md once per run if you have not already loaded it.
  2. Read the corresponding phase file.
  3. Follow the instructions in that file exactly.
  4. Conclude the phase with a completion status.
  5. Proceed only when that phase’s gates allow it.

Phase Sequence

Phase 0: Pre-flight
    |
Phase 1: Discovery Interview
    |
Phase 2: Repository Analysis
    |
Phase 3: Design Pattern Extraction & OKLCH Conversion
    |
Phase 3.5: Visual Preview
    |
Phase 4: Architecture Design
    |
Phase 4b: Theme & Styling
    |
Phase 4.5: Design Source of Truth (DESIGN.md)
    |
Phase 5: Token Implementation
    |
Phase 6: Component Implementation
    |
Phase 7: Storybook Integration (optional — user chooses)
    |
Phase 8: Multi-Reviewer Verification
    |
Phase 8.5: Design Review (Live Visual QA) (if browser tooling or screenshots are available)
    |
Phase 9: Documentation & Completion
    |
Phase 10: App Integration (optional — user chooses)
    |
Phase 11: Release Readiness & Handoff

Cross-Phase Contracts

  • DesignFarmerConfig (from Phase 1) is passed to all subsequent phases. Persisted to {systemPath}/.design-farmer/config.json for context-window resilience.
  • Pipeline state tracking: Completed and degraded phases append their IDs to completedPhases in config.json. User-optional skipped phases record dedicated skip state instead and do not append. createdAt is set once in Phase 1. Phase 8 writes lastReviewScore (0–10) and lastReviewDate. Phase 0 displays this state during re-entry.
  • Design Maturity (from Phase 2) is written to DesignFarmerConfig.designMaturity and determines the implementation path in Phases 3, 3.5, 5, and 6. Phase 0 re-entry may set a preliminary designMaturity from user input; Phase 2's formal assessment overrides this value.
  • Existing DESIGN.md detected in Phase 0 triggers a re-entry prompt — importing it as context continues to Phase 1 with pre-filled defaults. Critical discovery gates (scope/headless/theme decisions) must still be explicitly confirmed.
  • DESIGN.md source classification: Phase 0 distinguishes internal-canonical vs external-context. Readable third-party docs are context (not corruption); only unreadable files are treated as corrupted.
  • Early DESIGN.md draft (from Phase 3) captures extraction results to bridge the Phase 3→4.5 context gap. Phase 4.5 merges this draft into the final version.
  • Phase 3.5 is a hard gate before Phase 4. Preview HTML ({systemPath}/.design-farmer/design-preview.html) is mandatory for GREENFIELD, opt-in for EMERGING/MATURE. When skipped, the opt-in gate (3.5.0) handles text-only approval directly — the error-state Fallback Path (3.5.3) is reserved for generation failures only. The generatePreview field records the choice.
  • Phase 4b is a continuation of Phase 4 — load it immediately after Phase 4 completes, before Phase 4.5.
  • DESIGN.md (from Phase 4.5) is the persistent design source of truth for Phases 5–11.
  • Fix Loop Protocol (from operational-notes.md) is mandatory at implementation checkpoints in Phases 5, 6, 7, 9, 10, and 11. Each phase must pass typecheck/lint/build/test before proceeding. The loop retries up to 5 times, then escalates to BLOCKED.
  • Semantic-token-only rule: Components must NEVER consume primitive tokens directly.
  • Completion statuses are mandatory: Every phase must end with DONE, DONE_WITH_CONCERNS, BLOCKED, or NEEDS_CONTEXT.
  • User-question gating: Discovery interview questions are one-at-a-time. Other AskUserQuestion calls require user response before proceeding.
  • Final completion requires explicit verification evidence from Phase 9.2 and a readiness handoff report from Phase 11.
  • Optional phase skip policy: Two skip mechanisms exist:
    • Context-first re-entry (Phase 0→1): Existing DESIGN.md is imported as context and does not bypass Phases 1–4.5 by default. Legacy skippedPhases entries remain backward-compatible when present from older runs.
    • User-optional phase skip: Phases 7 (Storybook), 8.5 (Design Review), and 10 (App Integration) may be skipped by user choice or environment constraints. Skip status is tracked via dedicated flags: storybookSkipped: true (Phase 7), visualQASkipped: true (Phase 8.5), integrationStatus: "skipped" (Phase 10). Skipped user-optional phases do NOT append to completedPhases. Degraded execution (e.g., manual fallback) DOES append. Phase 8.5 also records visualQAMode: 'auto' | 'manual' | 'skipped' to distinguish execution quality.

Maintenance Note

This router is the canonical runtime entrypoint. If phase boundaries, file names, or quality criteria change, update the corresponding phase file, docs/PHASE-INDEX.md, docs/QUALITY-GATES.md, docs/MAINTENANCE.md, and scripts/validate-skill-md.sh in the same PR.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Design Farmer」では何ができますか?

Automated design system construction from repository analysis to production-ready implementation. Analyzes codebases, extracts design patterns, builds token hierarchies with OKLCH color management, implements accessible components with tests, and verifies through multi-reviewer panels. Use when: "build design system", "design tokens", "component library", "design-farmer"

TypingMindでDesign Farmerを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Design Farmerはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDesign Farmerをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/hakilee/design-farmer/tree/main/skills/design-farmerを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Design Farmerを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Design Farmerで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDesign Farmerを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Design Farmer」は無料ですか?

hakileeがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇