Systematically applies dark mode styling to MyJKKN application components and pages. Works module-by-module, file-by-file to replace hardcoded colors with semantic Tailwind classes and dark mode variants. Updates progress tracking and TodoWrite as work completes. Use this skill when applying dark mode fixes to identified files.
npx claudepluginhub jkkn-institutions/claude-plugin-roja --plugin myjkkn-dark-mode-pluginThis skill uses the workspace's default tool permissions.
This skill systematically applies dark mode styling to components and pages in the MyJKKN application.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Automates semantic versioning and release workflow for Claude Code plugins: bumps versions in package.json, marketplace.json, plugin.json; verifies builds; creates git tags, GitHub releases, changelogs.
This skill systematically applies dark mode styling to components and pages in the MyJKKN application.
Use this skill when:
ALWAYS start by loading .dark-mode-progress.json:
cat .dark-mode-progress.json
Check:
Priority order:
Before editing:
// Read the file completely
Read(filePath)
// Identify issues:
- Hardcoded colors: bg-white, bg-gray-100, text-black, etc.
- Missing dark: variants
- Inline styles with colors
- Images without dark mode handling
Use systematic replacements following MyJKKN's theme:
// ❌ Before
<div className="bg-white">
<div className="bg-gray-50">
<div className="bg-gray-100">
<div className="bg-gray-200">
// ✅ After
<div className="bg-background">
<div className="bg-card">
<div className="bg-muted">
<div className="bg-accent">
// ❌ Before
<p className="text-black">
<p className="text-gray-900">
<p className="text-gray-600">
<p className="text-gray-500">
// ✅ After
<p className="text-foreground">
<p className="text-card-foreground">
<p className="text-muted-foreground">
<p className="text-muted-foreground/80">
// ❌ Before
<div className="border-gray-200">
<div className="border-gray-300">
// ✅ After
<div className="border-border">
<div className="border-input">
// Cards and containers
bg-background -> main page background
bg-card -> card/panel background
bg-popover -> dropdown/modal background
// Interactive elements
bg-primary text-primary-foreground -> buttons
bg-secondary text-secondary-foreground -> secondary buttons
bg-accent text-accent-foreground -> hover states
bg-muted text-muted-foreground -> disabled/inactive
// Status colors
bg-destructive text-destructive-foreground -> errors/delete
// Hover states
"hover:bg-gray-100 dark:hover:bg-gray-800"
→ "hover:bg-accent"
// Active states
"bg-blue-50 dark:bg-blue-950"
→ "bg-primary/10"
// Shadows
"shadow-md"
→ "shadow-md dark:shadow-lg dark:shadow-primary/5"
// Add dark mode inversion for logos/images
<img className="..." />
→ <img className="dark:invert" />
// Icon colors
<Icon className="text-gray-600" />
→ <Icon className="text-muted-foreground" />
Ensure proper Tailwind semantic colors are used:
bg-background, text-foregroundbg-card, text-card-foregroundbg-muted, text-muted-foregroundbg-white, bg-blackbg-gray-* (unless necessary for specific shades)Use Edit tool to apply changes:
Edit({
file_path: "app/(routes)/dashboard/page.tsx",
old_string: '<div className="bg-white p-6">',
new_string: '<div className="bg-card p-6">'
})
After successfully updating a file:
// Update .dark-mode-progress.json
{
"modules": [
{
"name": "dashboard",
"status": "in_progress", // Update from "pending"
"filesCompleted": 1, // Increment
"darkModeScore": 40, // Recalculate
"pages": [
{
"file": "app/(routes)/dashboard/page.tsx",
"status": "completed", // Update from "pending"
"hasDarkMode": true,
"completedAt": "2025-01-16T10:30:00Z"
}
]
}
]
}
Mark completed tasks and create new ones:
TodoWrite([
{
content: "Apply dark mode to dashboard/page.tsx",
status: "completed",
activeForm: "Applying dark mode"
},
{
content: "Apply dark mode to dashboard/_components/stats-card.tsx",
status: "in_progress",
activeForm: "Applying dark mode"
}
])
If possible, suggest testing:
Use semantic colors that automatically adapt:
✅ bg-background
❌ bg-white dark:bg-gray-900
// Primary content
bg-background text-foreground
// Secondary containers
bg-card text-card-foreground
// Tertiary/muted content
bg-muted text-muted-foreground
Use the same color patterns for similar UI elements across modules:
// All cards
<Card className="bg-card">
// All buttons
<Button className="bg-primary text-primary-foreground">
// All inputs
<Input className="bg-background border-input">
// Status badges
{status === 'active' ? (
<Badge className="bg-green-500/10 text-green-500 dark:bg-green-500/20">
Active
</Badge>
) : (
<Badge className="bg-muted text-muted-foreground">
Inactive
</Badge>
)}
// Charts and graphs
// Use CSS variables: var(--primary), var(--chart-1), etc.
After each file update, output:
✅ Completed: app/(routes)/dashboard/page.tsx
- Replaced 5 hardcoded colors
- Added dark mode variants
- Updated to semantic colors
📊 Module Progress: dashboard (40% → 60%)
📈 Overall Progress: 35% → 37%
⏭️ Next: app/(routes)/dashboard/_components/stats-card.tsx
dark-mode-analyzer to identify targetsprogress-tracker to monitor completion<Table className="bg-card">
<TableHeader className="bg-muted">
<TableRow className="border-border">
<TableHead className="text-muted-foreground">
</TableHeader>
<TableBody>
<TableRow className="border-border hover:bg-accent">
<TableCell className="text-foreground">
</TableBody>
</Table>
<form className="space-y-4 bg-card p-6 rounded-lg border border-border">
<Label className="text-foreground">
<Input className="bg-background border-input text-foreground" />
<Button className="bg-primary text-primary-foreground hover:bg-primary/90">
</form>
<Dialog>
<DialogContent className="bg-popover text-popover-foreground border-border">
<DialogHeader>
<DialogTitle className="text-foreground">
</DialogHeader>
</DialogContent>
</Dialog>
If a file is complex or has issues:
Use the dark-mode-styler skill to apply dark mode to the dashboard module.
// Claude will:
1. Load .dark-mode-progress.json
2. Find pending files in dashboard module
3. Read first file
4. Apply systematic dark mode fixes
5. Update file using Edit tool
6. Update progress tracking
7. Move to next file
8. Continue until module complete or session ends
For each file:
🔧 Working on: [filename]
📝 Reading file...
🔍 Found 5 issues:
- Line 10: bg-white → bg-background
- Line 25: text-gray-600 → text-muted-foreground
- Line 40: border-gray-200 → border-border
- Line 55: hover:bg-gray-100 → hover:bg-accent
- Line 70: text-black → text-foreground
✏️ Applying fixes...
✅ File updated successfully
📊 Progress: 1/5 files in module completed
Continue to next file? (automatic)