d-zero-dev/frontend-guidelines/dzero-design-to-code
Claude Code and agent skill by d-zero-dev/frontend-guidelines
- community
Checking that the SKILL.md file is still in the repository.
デザインデータ(Figma などのデザインカンプ)を参照してコーディングするときの解釈原則とアセットの扱い。Figma の URL・MCP・デザイン画像・カンプをもとに実装や修正をするときに必ず使う。
Install
npx vskill@latest install d-zero-dev/frontend-guidelines/dzero-design-to-codeSKILL.md
The same SKILL.md was published earlier as d-zero-dev/frontend-guidelines/dzero-design-to-code.
デザインカンプ解釈
実装レイヤー選定(dzero-tech-selection)を経ていない場合は先にそちらを読むこと。
原則: デザインデータの数値は「結果」であって「仕様」ではない
デザインデータから読み取るべきは意図(可変か固定か、何に整列しているか、余白は何との関係か)であり、表示されている数値そのものではない。
- 要素の
width/heightをデザインの数値のまま固定値で書かない。可変を前提にレスポンシブに落とし込む - デザイン上の X/Y 座標を
top/left(inset-*)にそのまま変換しない - 値を書くときは何を基準にした値なのかを計算式で明示する(
dzero-cssの値のルールに従う) - 行高が絶対値(例:
24px)で指定されていても、そのままline-height: 24pxと書かずfont-sizeとの比率(例:calc(24 / 16)=1.5)に変換する
<!-- 暫定ルール: stylelint(declaration-property-unit-disallowed-list)による line-height の px 禁止を linters に提案中。導入されたらこの項目は削除する -->
デザインに描かれていない状態も実装対象
デザインカンプは通常デフォルト状態の静止画しかない。描かれていなくても以下は実装する。
- インタラクティブ要素の
:hoverと:focus-visible(キーボード操作時のフォーカス表示。詳細はdzero-a11y) - エラー・空・長文(折り返し・はみ出し)などの状態はデザインに定義がなければユーザーに確認する
デザイントークンへの対応付け
- 色などの値はプロジェクトのカスタムプロパティ(
__assets/_libs/style/base/root.cssの:rootに定義。Figma のバリアブルもここに定義される)に対応付けて使う - デザイン側でバリアブル・スタイルが設定されていない値でも、直接書かずに対応するトークンがないか先に探す
<!-- 暫定ルール: stylelint(declaration-strict-value 系)によるトークン強制を linters に提案中。導入されたらこの項目は削除する -->
アセット(画像等)の扱い
- 画像の書き出し・変換は自分で行わず、ユーザーに依頼する(エージェントが行うと著しく遅いため。作業分担のルール)
- 配置されたファイルの命名は
[種類]-[修飾語・詳細]-[連番]@[解像度].[拡張子]([種類]と[拡張子]は必須)。種類はbg/pict/thumb/hero/banner/text/logo/icon/objから選ぶ(メディア: 画像) - フォーマットは可能であれば AVIF・WebP を採用する。ベクターデータがあるものは SVG を採用する
- 画像をページやコンポーネントごとのサブディレクトリに分けない(共通で使い回すか将来わからないため)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/dzero-design-to-code/SKILL.md
Popularity
- Repository stars
- 20
- Repository forks
- 6
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/d-zero-dev/frontend-guidelines/dzero-design-to-code)