Communityコーディング&開発github.com

shadcn-first

shadcn/ui のブロックとコンポーネントを優先的に使い、手書き UI を減らすためのスキル。

shadcn-first とは?

このスキルは、shadcn/ui ライブラリを最大限に活用し、手書きの UI コードを最小限に抑えるための開発ガイドラインを提供します。ブロック(完成済みの UI セクション)、コンポーネントレジストリ、そして合成の順に優先順位を設定し、どうしても必要な場合のみ手書きを許可します。デザインをコンポーネントに合わせ、テーマ変数でブランドやビジュアル言語を一元管理することで、一貫性と保守性を向上させます。`shadcn-official` と `shadcn` の2つの MCP サーバーを使い分け、ブロックのインストール、コンポーネントの検索、監査チェックリストの実行などを効率的に行います。完了条件には、手書き UI の行数や `style={{}}` の発生回数などの定量評価を含め、客観的な証明を求めます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/getedgehq/skills/tree/main/shadcn-first

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

shadcn-first は何をしますか?

あなたの後でこのコードを保守する人がいます。手書きの div に独自クラスを付けたり、style={{}} を書くたびに、その人の負担は増え、コードは乖離していきます。手書きの UI は、ライブラリが無料で提供するクラフトマンシップ(フォーカスリング、ホバー・アクティブ状態、キーボードナビゲーション、スケルトン、空状態、ARIA)を静かに削ぎ落とします。

手順。決して省略しないこと。

  1. ブロック。 ui.shadcn.com/blocks には、サイドバー、ダッシュボード、ログイン、データテーブルが丸ごと用意されています。ブロックをインストールします。
  2. コンポーネント。 ブロックが合わなければ、レジストリからコンポーネントを使います。
  3. 合成 2~3個のコンポーネントを組み合わせます。
  4. 自分で書く。 ここだけです。コミットメッセージには、評価したブロックまたはコンポーネントと、それらが合わなかった理由を必ず書きます。

デザインをコンポーネントに合わせるのであって、コンポーネントをデザインに合わせてはいけません。ブランドやビジュアル言語は、1つのテーマのテーマ変数 で表現し、コンポーネントの横に画面ごとの CSS を決して書かないでください。

ツールとその使い分け

2つの MCP サーバーが設定されています。それぞれ役割が異なります。

shadcn-official(npx shadcn@latest mcp)はプロジェクトを認識します。リポジトリの components.json を読み込みます。実際の作業にはこちらを使ってください。

ツール使用目的
get_project_registriesプロジェクトが初期化されていることを確認する
search_items_in_registriesあいまい検索で目的のコンポーネントを見つける
list_items_in_registries利用可能なすべてのコンポーネントを表示する
view_items_in_registriesコンポーネントの実際のソースと依存関係を確認する
get_item_examples_from_registriesAPI を推測せずに実際の使用例をコピーする
get_add_command_for_items正確な npx shadcn add ... のコマンドを取得し、実行する
get_audit_checklistコードを書いた後に実行する。これがゲートです。

shadcn(@jpisnice/shadcn-ui-mcp-server)はレジストリ全体を対象とし、ブロックとテーマを知っています。list_blocks、get_block、list_themes、get_theme、get_component_demo。手順1とテーマ設定に使います。

プロジェクトに components.json がない場合、公式ツールはエラーになります。最初に npx shadcn@latest init を実行してから続けてください。

AI チャットインターフェースには prompt-kit(prompt-kit.com、shadcn 互換)を使ってください。chat-container、message、prompt-input、scroll-button、markdown、code-block、loader。同じルールで、ゼロから作らずインストールします。

人々がインストールせずに再発明しているコンポーネント

sidebar(折りたたみ可能、フッターユーザーメニュー付き)、command(Cmd+K パレット)、table + TanStack データテーブルブロック、tabs、sheet、dialog、alert-dialog、popover、tooltip、skeleton、sonner(トースト)、form(react-hook-form + zod)、breadcrumb、resizable、scroll-area、avatar、badge、separator、dropdown-menu、select、collapsible、chart。

これらを手書きで作り始めていることに気づいたら、やめてインストールしてください。

キーボードショートカット

コマンドパレットには Cmd+K を使ってください。command コンポーネントが標準で提供する cmdk の慣例です。Cmd+L はブラウザのアドレスバーに予約されており、Chrome では確実にインターセプトできません。誰かが Cmd+L を要求した場合は、Cmd+K をバインドし、Cmd+L も機会があれば追加し、その理由を説明してください。

「完了」は主張ではなく計測

完了を報告する前に、get_audit_checklist を実行して以下の数値を報告します。

  • 削除したカスタム UI の行数
  • インストールしたブロックとコンポーネントの数
  • 残っている style={{}} の数(grep -rc 'style={{' src/)
  • 画面ごと:components/ui/ からの要素数 vs 手書きの要素数

手書きのコードが残っている場合は、その理由を明記し、見逃さないようにします。スクリーンショットは画面がレンダリングされていることの証明であり、カウントはルールが守られていることの証明です。両方が揃って初めて「完了」です。

禁止事項

  • UI に絵文字は使わない。本当の SVG アイコンを使う(Lucide は shadcn に同梱されています)。
  • ブランドロゴにテキスト入り丸を使用しない。本当の SVG パスを入手する:SimpleIcons > svgl.app > gilbarbara/logos > favicon。
  • アクセントカラーは最大1~2色。カードに色付きの左ボーダーを付けない。すべての要素にグラデーションをかけない。
  • 色を変えるためにコンポーネントをフォークしない。テーマ変数を変更する。

Individual skills in this repo

This repo contains 18 individual skills — each has its own dedicated page.

getedgehq/agent-evals

Build evals for an AI agent that already does real work. Use when someone asks "how do I know my agent is right", wants to test an agent before trusting it, compare models on cost versus quality, or turn production failures into tests. Walks from first tasks and yes/no verifiers, to isolated environments, to a trace-driven improvement loop.

getedgehq/cli-ux-review

Audit a command-line tool for user-friendliness — clear situation / next-step / options in every output, colour-highlighted runnable commands, no raw jargon, no silent hangs. Invoke for "CLI UX audit", "review my CLI", "is this CLI intuitive", or before any CLI release.

getedgehq/generate-image

Generate images with OpenAI GPT Image 2 via the Codex CLI, billed through the user's ChatGPT Plus subscription (no OpenAI API key, no per-image API cost). Use when the user asks to create, generate, or make an image, picture, illustration, icon, hero graphic, or concept art from a text prompt.

getedgehq/harness-first

Diagnose and fix an unreliable, expensive, or unsafe LLM agent by auditing its harness (golden set, judge, cost caps, data layer, action approvals, tracing) before blaming or swapping the model. Use when someone says an agent is "burning tokens", "hallucinating", "brittle", gives inconsistent answers, asks whether to switch to a cheaper/better model, or wants to ship an agent or prompt change to customers.

getedgehq/http-error-triage

Run before concluding anything from an HTTP error on a third-party API. Separates a real credential/entitlement problem from a CDN or WAF block, a wrong endpoint, or a client-signature ban. Use whenever an API returns 401/403/402/429 and you are about to say "the key is dead", "credits are exhausted", "the plan lacks access", or "we are rate limited".

getedgehq/linkedin-media-prep

Convert, crop, resize, and compress images and videos for optimal LinkedIn upload quality and file size. Use when the user wants to prepare a photo, image, or video for LinkedIn (profile picture, cover photo, post image, article featured image, post video, or video ad), optimize file size for LinkedIn, crop and resize for LinkedIn dimensions, convert HEIC/RAW/PNG/MOV to LinkedIn-ready JPEG or MP4, or mentions LinkedIn media requirements, specs, or limits.

getedgehq/monid

>-

getedgehq/opendraft

An 18-agent pipeline that turns one topic line into a drafted

getedgehq/people-search

Find and rank professional people for recruiting, partnerships, sales, or research from user-provided data, public web sources, an authenticated search session, or a connected provider. Use for people discovery, LinkedIn or Sales Navigator search design, profile-list ranking, or provider filter translation.

getedgehq/rocketlist

Turn a CV into a shortlist of live startup roles from Rocketlist's public job board, including adjacent job titles the person would never have searched for, each with its published salary, the evidence for the fit, and a direct apply link. Use for "find roles I would be a strong fit for", career pivots, remote or VC-backed job hunts, and salary-visible role discovery.

getedgehq/security-audit-checklist

Run a comprehensive security audit across application code, cloud infrastructure, containers, CI/CD pipelines, and infrastructure-as-code. Covers privacy compliance, OWASP basics, secret leakage, API security, IAM misconfigurations, storage exposure, Kubernetes hardening, and network security. Use when the user asks to audit, review, or harden app or cloud security, check for secrets, scan for XSS/SQLi, verify security headers, review Terraform/CloudFormation, audit AWS/GCP/Azure configs, or perform any security-focused review.

getedgehq/skills

Develop or review a branded long-form YouTube channel using Simon Kaiser's public creator-led approach: audience fit, recurring formats, natural brand integration, Time with Brand, and an organic, paid, and Shorts strategy. Use for channel strategy, format briefs, and pilots.

getedgehq/skills

Build a YouTube strategy, evidence-backed idea slate, and title plus thumbnail package using Paddy Galloway's public method. Use when planning a channel, choosing concepts, or preparing a video before filming.

getedgehq/skills

Build or review a buyer-centered strategic narrative using Andy Raskin's public method. Use for sales or investor deck stories, homepage positioning, keynotes, launch narratives, and why-now messaging.

getedgehq/skills

Turn a product URL, launch brief, or approved script into a production-ready launch video. Use for product reveals, feature announcements, SaaS launches, and narrated product films; not for generic explainers or editing existing footage.

getedgehq/strip-image-ai-metadata

Strip C2PA and AI-generation metadata from images (PNG, JPEG, WebP) to remove "Generated by AI" / "ChatGPT" / "DALL-E" labels that platforms like LinkedIn, Instagram, and X display. Use when the user wants to clean AI-generated images before posting, remove AI attribution from photos, strip C2PA manifests, sanitize image metadata for professional use, or verify whether an image contains C2PA data.

getedgehq/top-down-comms

>-

getedgehq/workplan

Create, update, or close work plans for multi-step tasks. Use when starting refactors, bug lists, feature work, migrations, or any task with 2+ steps. Also use after auto-compaction to re-orient. Triggers: "workplan", "work plan", "create a plan", "what's the plan", "where was I", or when Claude detects

関連スキル