ワンクリックで
trident-ui-install
Install and configure Trident UI component library for Vite and Next.js projects
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Install and configure Trident UI component library for Vite and Next.js projects
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Push the current branch to the remote under a speaking branch name derived from the last conventional commit (<type>/<scope>-<description>). Use when the user asks to push their branch, publish their work, push before opening a PR, or push with a meaningful branch name. Hard guard: NEVER pushes the default branch (detected dynamically from origin/HEAD — main, develop, etc.) — if HEAD is on it, a speaking feature branch is carved and switched to first. Sets upstream with -u. Triggers on: "push", "push my branch", "push this", "publish my branch", "push with a good branch name", "push before PR".
End-to-end "send my work to GitHub": commit the current changes as a Conventional Commit, rebase onto the default branch, push under a speaking branch name, and open a GitHub pull request — in one flow. Use when the user wants to ship their work, send changes to GitHub, open a PR from their current changes, "commit push and PR", finalize a feature, or go from dirty working tree to an open PR. Composes the git-commit, git-rebase-branch, git-push-branch, and github-open-pr skills. Absolute invariant: NEVER pushes to the default branch (main, develop, etc.) — always a feature branch and a PR. Triggers on: "send to github", "ship it", "ship this", "open a PR for my changes", "commit push and open a PR", "finalize this feature", "create a PR from my work", "/github-publish".
Update the current branch with its remote counterpart using a rebase (git pull --rebase), keeping history linear and avoiding merge commits. Fetches the branch upstream, replays local commits on top, and handles conflicts (safe automatic resolution for trivial overlaps, asks the user to arbitrate genuine logic conflicts). Use when the user asks to pull with rebase, get the latest remote commits on their branch, update/sync the current branch with its remote, resolve a "your branch is behind" state without a merge commit, or catch up before continuing work. Refuses to run on a dirty working tree (stops and asks to commit or stash first), never force-pushes, never touches git config, and prefers `git rebase --abort` over leaving a broken state. Triggers on: "pull rebase", "git pull --rebase", "get the latest commits", "update my branch from remote", "sync with the remote", "my branch is behind origin", "catch up before I continue".
Generate robust Playwright + TypeScript end-to-end tests for Club Med B2C sites. Use when the user asks to write E2E tests, add coverage for a user journey, or harden a flaky suite. Qualifies the test intent (including reading the repo's docs/ for PRDs and glossaries), then orchestrates five phases — ground selectors on the live site, plan scenarios, write from the grounded contract reusing existing code, prove non-flakiness by repeated cross-browser runs, and review with independent critics.
Rebase the current branch onto the latest default branch (detected dynamically from the remote — main, develop, or whatever origin/HEAD points to), safely. Use when the user asks to rebase, update their branch with the default branch, sync with the default branch, resolve a "branch is behind" state, or before pushing/opening a PR. Protects the default branch: if HEAD is on it, it carves a speaking feature branch from the last commit FIRST and never rebases the default branch itself. Attempts safe automatic conflict resolution and only asks the user to arbitrate genuine conflicts. Triggers on: "rebase", "rebase on main", "update my branch", "sync with main", "my branch is behind", "rebase before pushing".
Generates, validates, and persists a GitHub personal access token (PAT) to .claude/settings.local.json (Claude Code local settings). Use this skill whenever a GitHub token is needed, missing, expired, or must be refreshed — before any task that calls the GitHub API or connects the GitHub MCP server. Triggers on: "generate github token", "create github token", "set up github token", "update github token", "GITHUB_TOKEN missing", "GITHUB_TOKEN not set", "GITHUB_TOKEN expired", "github token invalid", "github authentication", "connect github mcp", "configure github access", or any task that requires GitHub API access and the token is absent or invalid. Works by checking for an existing valid token first, then manual browser login (the primary path — GitHub enforces 2FA), with optional best-effort auto-login if GITHUB_USERNAME/GITHUB_PASSWORD are available. Token is stored in .claude/settings.local.json and auto-injected by Claude Code into every shell session. Browser automation uses the Playwright MCP.
| name | trident-ui-install |
| description | Install and configure Trident UI component library for Vite and Next.js projects |
| allowed-tools | Bash, Read, Edit, Write, Glob, Grep, Agent, TaskCreate, TaskUpdate, TaskList, WebFetch |
| version | 1.0.0 |
| changelog | [{"version":"1.0.0","date":"2026-04-08T00:00:00.000Z","changes":["Initial release"]}] |
| created-at | "2026-04-08T00:00:00.000Z" |
| created-by | Georges Mathieu <georges.mathieu.ext@clubmed.com> |
Streamline the setup of Trident UI component library in your Vite or Next.js project. This skill automates dependency installation, configuration file creation, and design system setup.
Trident UI is a pre-built React component library using Tailwind 4 with CSS-only theming. This skill will:
After setup, you can use Trident UI components by copying them into your project:
npx shadcn@latest add <registry-url> copies component source code into your project for full customization controlEXPLAIN: I need to understand your project structure to provide the right configuration. Let me detect your project type, package manager, and check for any existing installations.
DO: Running detection...
# Check for package.json
if [ ! -f "package.json" ]; then
echo "❌ Error: No package.json found. Please run this in a project root."
exit 1
fi
# Detect project type
PROJECT_TYPE="unknown"
if grep -q '"next"' package.json 2>/dev/null || [ -f "next.config.js" ] || [ -f "next.config.ts" ] || [ -f "next.config.mjs" ]; then
PROJECT_TYPE="nextjs"
elif grep -q '"vite"' package.json 2>/dev/null || [ -f "vite.config.js" ] || [ -f "vite.config.ts" ] || [ -f "vite.config.mjs" ]; then
PROJECT_TYPE="vite"
fi
# Detect package manager
PKG_MANAGER="npm"
if [ -f "pnpm-lock.yaml" ]; then
PKG_MANAGER="pnpm"
elif [ -f "yarn.lock" ]; then
PKG_MANAGER="yarn"
elif [ -f "bun.lockb" ] || [ -f "bun.lock" ]; then
PKG_MANAGER="bun"
elif [ -f "package-lock.json" ]; then
PKG_MANAGER="npm"
fi
# Check Node.js version
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 18 ]; then
echo "⚠️ Warning: Node.js >= 18 required. You have $(node -v)"
fi
# Check for existing installation
EXISTING_INSTALL="no"
if grep -q "@clubmed/trident-icons" package.json 2>/dev/null; then
EXISTING_INSTALL="yes"
fi
# Check for Tailwind 3.x
TAILWIND_VERSION=""
if [ -d "node_modules/tailwindcss" ]; then
TAILWIND_VERSION=$(node -e "try{console.log(require('./node_modules/tailwindcss/package.json').version)}catch(e){}" 2>/dev/null)
TAILWIND_MAJOR=$(echo "$TAILWIND_VERSION" | cut -d'.' -f1)
if [ -n "$TAILWIND_MAJOR" ] && [ "$TAILWIND_MAJOR" -lt 4 ]; then
echo "⚠️ Tailwind $TAILWIND_VERSION detected (requires 4.x) — see error handling section below"
fi
fi
# Detect CSS file path
CSS_FILE=""
if [ "$PROJECT_TYPE" = "vite" ]; then
for file in "src/index.css" "src/main.css" "src/styles.css" "src/global.css"; do
if [ -f "$file" ]; then
CSS_FILE="$file"
break
fi
done
[ -z "$CSS_FILE" ] && CSS_FILE="src/index.css"
elif [ "$PROJECT_TYPE" = "nextjs" ]; then
for file in "app/globals.css" "src/app/globals.css" "app/global.css" "styles/globals.css"; do
if [ -f "$file" ]; then
CSS_FILE="$file"
break
fi
done
if [ -z "$CSS_FILE" ]; then
[ -d "src/app" ] && CSS_FILE="src/app/globals.css" || CSS_FILE="app/globals.css"
fi
fi
# Detect Tailwind config file
TAILWIND_CONFIG=""
if [ "$PROJECT_TYPE" = "vite" ]; then
for file in "vite.config.ts" "vite.config.js" "vite.config.mjs"; do
if [ -f "$file" ]; then
TAILWIND_CONFIG="$file"
break
fi
done
[ -z "$TAILWIND_CONFIG" ] && TAILWIND_CONFIG="vite.config.ts"
elif [ "$PROJECT_TYPE" = "nextjs" ]; then
for file in "postcss.config.mjs" "postcss.config.js" "postcss.config.cjs"; do
if [ -f "$file" ]; then
TAILWIND_CONFIG="$file"
break
fi
done
[ -z "$TAILWIND_CONFIG" ] && TAILWIND_CONFIG="postcss.config.mjs"
fi
SHOW: Detection results:
🔍 Project Detection Results:
Project Type: [PROJECT_TYPE]
Package Manager: [PKG_MANAGER]
Node.js Version: [VERSION]
Existing Installation: [yes/no]
Files to create/modify:
- components.json (new)
- [CSS_FILE] (create or update)
- [TAILWIND_CONFIG] (create or update)
- tsconfig.json (update paths only, if exists)
This installation will:
✓ Configure Tailwind 4 for your project type
✓ Install design system (157 CSS variables + 25+ animations)
✓ Set up TypeScript path aliases
✓ Enable shadcn CLI for component installation
PAUSE: Ready to proceed with installation? [Continue]
EXPLAIN: Installing Trident UI and its required dependencies. This includes the core library, icon package, and Tailwind 4 with the appropriate plugins for your project type.
DO: Running package installation...
# Vite project dependencies
if [ "$PROJECT_TYPE" = "vite" ]; then
[PKG_MANAGER] install @clubmed/trident-icons tailwindcss
[PKG_MANAGER] install -D @tailwindcss/vite
fi
# Next.js project dependencies
if [ "$PROJECT_TYPE" = "nextjs" ]; then
[PKG_MANAGER] install @clubmed/trident-icons tailwindcss
[PKG_MANAGER] install -D @tailwindcss/postcss postcss
fi
SHOW: Installation progress and results:
📦 Installing packages...
✓ @clubmed/trident-icons@[version]
✓ tailwindcss@[version]
[✓ @tailwindcss/vite@[version] (Vite only)]
[✓ @tailwindcss/postcss@[version] (Next.js only)]
[✓ postcss@[version] (Next.js only)]
Dependencies installed successfully!
EXPLAIN: Creating configuration files for shadcn CLI compatibility, Tailwind 4 integration, and TypeScript path aliases.
DO: Creating components.json in project root. Set "rsc": true for Next.js (React Server Components), "rsc": false for Vite.
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "[TAILWIND_CONFIG]",
"css": "[CSS_FILE]",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"registries": {
"@tridentui": "https://develop.trident-ui.pro.clubmed/r/{name}.json"
}
}
SHOW: ✓ components.json created
DO: Setting up CSS imports in [CSS_FILE]...
For Vite projects:
@import "tailwindcss";
@source '../src/**/*.{tsx,ts,jsx,js}';
/* Your custom styles below */
For Next.js projects:
@import "tailwindcss";
@source '../app/**/*.{tsx,ts}';
@source '../components/**/*.{tsx,ts}';
/* Your custom styles below */
SHOW: ✓ [CSS_FILE] [created/updated]
DO: Configuring Tailwind 4 for your project...
For Vite projects - updating [TAILWIND_CONFIG]:
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
// ... other imports
export default defineConfig({
// ... other config
plugins: [
// ... other plugins
tailwindcss(),
],
});
For Next.js projects - creating postcss.config.mjs:
export default {
plugins: {
"@tailwindcss/postcss": {},
},
};
SHOW: ✓ Tailwind 4 configured for [PROJECT_TYPE]
DO: Adding path aliases to tsconfig.json (if exists)...
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@/components/*": ["./src/components/*"],
"@/lib/*": ["./src/lib/*"]
}
}
}
SHOW: ✓ TypeScript paths configured or ⊘ Skipped (no tsconfig.json)
EXPLAIN: Installing the Trident UI design system foundation. This provides 157 CSS variables (colors, typography, spacing, etc.), 25+ animations, and component base styles. This is installed via the shadcn CLI tool (used on-demand via npx, no separate installation needed).
DO: Running shadcn CLI to install design system...
npx shadcn@latest add https://develop.trident-ui.pro.clubmed/r/tailwind-config.json
SHOW: Design system installation results:
✓ Design system installed successfully!
What was added:
• 157 CSS variables (colors, typography, spacing, radii, shadows, breakpoints)
• 25+ animations (bounceEnter, slideDown, zoomIn, loaders, etc.)
• Component base styles (buttons, forms, tabs, switches, etc.)
• Custom Tailwind utilities (aspect ratios, line-clamp, grid areas)
• Custom variants (hocus, hoverable, popover states)
These design tokens are now available in your styles:
color: var(--color-saffron);
font-size: var(--text-h2);
animation: bounceEnter 0.3s ease-out;
EXPLAIN: Validating the installation to ensure everything is set up correctly.
DO: Running validation checks...
# Check packages installed
test -d "node_modules/@clubmed/trident-icons" && echo "✓ trident-icons installed" || echo "❌ trident-icons missing"
test -d "node_modules/tailwindcss" && echo "✓ tailwindcss installed" || echo "❌ tailwindcss missing"
# Check config files
test -f "components.json" && echo "✓ components.json created" || echo "❌ components.json missing"
test -f "[CSS_FILE]" && echo "✓ CSS file exists" || echo "❌ CSS file missing"
test -f "[TAILWIND_CONFIG]" && echo "✓ Tailwind config exists" || echo "❌ Tailwind config missing"
# Check design system
if [ -f "components/ui/tailwind-config.tsx" ] || grep -rq --exclude-dir=node_modules "color-saffron" .; then
echo "✓ Design system installed"
else
echo "⚠️ Design system may not be installed"
fi
SHOW: Validation results:
✅ Validation Complete!
All checks passed:
✓ @clubmed/trident-icons installed
✓ tailwindcss installed
✓ components.json created
✓ [CSS_FILE] configured
✓ [TAILWIND_CONFIG] configured
✓ Trident UI styles imported
✓ Design system installed
EXPLAIN: Installation complete! Here's how to use Trident UI in your project.
SHOW: Usage examples and documentation:
✅ Installation Complete!
📦 Installed:
- @clubmed/trident-icons@[version]
- tailwindcss@[version]
- Design system (157 CSS variables, 25+ animations, component styles)
🚀 Usage:
1. shadcn CLI (copy component to project):
npx shadcn@latest add https://develop.trident-ui.pro.clubmed/r/button.json
This copies the component source into your project for full customization.
After copying, import and use it like any local component.
2. Use design tokens in your styles:
.my-element {
color: var(--color-saffron);
font-size: var(--text-h2);
border-radius: var(--radius-lg);
animation: bounceEnter 0.3s ease-out;
}
3. Browse available components:
Visit the registry: https://develop.trident-ui.pro.clubmed/r
Or check documentation: https://trident-ui.pro.clubmed
📚 Next Steps:
• Add a component via shadcn CLI and test in your app
• Explore the design system CSS variables
• Browse the component registry for available components
• Read the documentation for component props and usage
🎨 Design Tokens Available:
Colors: --color-black, --color-ultramarine, --color-saffron, --color-wave, etc.
Typography: --text-b6 through --text-h0 (body and heading scales)
Spacing: --spacing (base unit)
Radii: --radius-sm, --radius-md, --radius-lg, --radius-pill, --radius-full
Animations: bounceEnter, slideDown, zoomIn, pulse, spin, and 20+ more
💡 Tips:
• Use TypeScript for autocomplete on component props
• Check Storybook examples for component usage patterns
• The library uses Tailwind 4's CSS-only theming
• All components are marked with 'use client' for Next.js compatibility
If existing Trident UI installation found:
If neither Vite nor Next.js detected:
⚠️ Unknown project type detected.
I couldn't automatically detect if this is a Vite or Next.js project.
Please specify your project type:
1. Vite
2. Next.js
3. Other (show manual instructions)
[User selects option]
If Tailwind 3.x is installed:
⚠️ Tailwind 3.x detected!
Trident UI requires Tailwind 4.x. This is a major version upgrade with breaking changes.
Options:
1. Upgrade to Tailwind 4 (recommended)
2. Show migration guide
3. Cancel installation
[User selects option]
If Node.js < 18:
❌ Node.js version too low
Trident UI requires Node.js >= 18. You have [current version].
Please upgrade Node.js and try again:
https://nodejs.org/
If file write fails:
❌ Permission denied writing to [file]
Please ensure you have write permissions to the project directory.
You may need to run with appropriate permissions.
Check that:
Check that:
tsconfig.json has correct path aliasesCheck that:
@source directive includes your component pathsCheck that:
npx shadcn add tailwind-config.json completed successfullyFor more help, visit: https://trident-ui.pro.clubmed/troubleshooting