agent-skill-kit 3.9.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/global.d.ts +80 -0
- package/.agent/rules/GEMINI.md +210 -0
- package/.agent/rules/autopilot.md +287 -0
- package/.agent/rules/code-rules.md +227 -0
- package/.agent/scripts/audit_workflows.ts +23 -0
- package/.agent/scripts/auto_preview.ts +170 -0
- package/.agent/scripts/checklist.ts +180 -0
- package/.agent/scripts/compile-agents.ts +237 -0
- package/.agent/scripts/fix_skills.ts +49 -0
- package/.agent/scripts/session_manager.ts +222 -0
- package/.agent/scripts/skill-audit.ts +255 -0
- package/.agent/scripts/sync_workflows.ts +54 -0
- package/.agent/scripts/utils/colors.ts +58 -0
- package/.agent/scripts/utils/process-manager.ts +131 -0
- package/.agent/scripts/utils/reporter.ts +192 -0
- package/.agent/scripts/utils/runner.ts +128 -0
- package/.agent/scripts/verify_all.ts +243 -0
- package/.agent/scripts/version-sync.ts +256 -0
- package/.agent/skills/SKILL_INDEX.md +129 -0
- package/.agent/skills/agent-browser/AGENTS.md +728 -0
- package/.agent/skills/agent-browser/SKILL.md +193 -0
- package/.agent/skills/agent-browser/rules/_sections.md +15 -0
- package/.agent/skills/agent-browser/rules/_template.md +32 -0
- package/.agent/skills/agent-browser/rules/engineering-spec.md +528 -0
- package/.agent/skills/agent-browser/scripts/browser_cli.ts +52 -0
- package/.agent/skills/agent-browser/scripts/session_manager.ts +166 -0
- package/.agent/skills/ai-artist/AGENTS.md +1082 -0
- package/.agent/skills/ai-artist/SKILL.md +186 -0
- package/.agent/skills/ai-artist/rules/_sections.md +30 -0
- package/.agent/skills/ai-artist/rules/_template.md +32 -0
- package/.agent/skills/ai-artist/rules/domain-code.md +118 -0
- package/.agent/skills/ai-artist/rules/domain-marketing.md +105 -0
- package/.agent/skills/ai-artist/rules/engineering-spec.md +519 -0
- package/.agent/skills/ai-artist/rules/image-prompts.md +195 -0
- package/.agent/skills/ai-artist/rules/model-syntax.md +115 -0
- package/.agent/skills/ai-artist/scripts/prompt_compiler.ts +72 -0
- package/.agent/skills/ai-artist/templates/image-core.txt +1 -0
- package/.agent/skills/ai-artist/templates/llm-core.txt +6 -0
- package/.agent/skills/api-architect/AGENTS.md +1896 -0
- package/.agent/skills/api-architect/SKILL.md +173 -0
- package/.agent/skills/api-architect/rules/_sections.md +35 -0
- package/.agent/skills/api-architect/rules/_template.md +32 -0
- package/.agent/skills/api-architect/rules/api-style.md +115 -0
- package/.agent/skills/api-architect/rules/auth.md +134 -0
- package/.agent/skills/api-architect/rules/documentation.md +131 -0
- package/.agent/skills/api-architect/rules/engineering-spec.md +505 -0
- package/.agent/skills/api-architect/rules/graphql.md +154 -0
- package/.agent/skills/api-architect/rules/rate-limiting.md +76 -0
- package/.agent/skills/api-architect/rules/response.md +138 -0
- package/.agent/skills/api-architect/rules/rest.md +113 -0
- package/.agent/skills/api-architect/rules/security-testing.md +146 -0
- package/.agent/skills/api-architect/rules/trpc.md +129 -0
- package/.agent/skills/api-architect/rules/versioning.md +100 -0
- package/.agent/skills/api-architect/scripts/api_validator.ts +413 -0
- package/.agent/skills/auth-patterns/AGENTS.md +1830 -0
- package/.agent/skills/auth-patterns/SKILL.md +163 -0
- package/.agent/skills/auth-patterns/rules/_sections.md +30 -0
- package/.agent/skills/auth-patterns/rules/_template.md +32 -0
- package/.agent/skills/auth-patterns/rules/engineering-spec.md +515 -0
- package/.agent/skills/auth-patterns/rules/jwt-deep.md +196 -0
- package/.agent/skills/auth-patterns/rules/mfa.md +174 -0
- package/.agent/skills/auth-patterns/rules/oauth2.md +134 -0
- package/.agent/skills/auth-patterns/rules/passkey.md +243 -0
- package/.agent/skills/auth-patterns/rules/rbac-abac.md +206 -0
- package/.agent/skills/auth-patterns/rules/session.md +183 -0
- package/.agent/skills/auth-patterns/scripts/auth_validator.ts +121 -0
- package/.agent/skills/chrome-devtools/AGENTS.md +952 -0
- package/.agent/skills/chrome-devtools/SKILL.md +160 -0
- package/.agent/skills/chrome-devtools/rules/_sections.md +25 -0
- package/.agent/skills/chrome-devtools/rules/_template.md +32 -0
- package/.agent/skills/chrome-devtools/rules/aria-snapshot.md +95 -0
- package/.agent/skills/chrome-devtools/rules/engineering-spec.md +510 -0
- package/.agent/skills/chrome-devtools/rules/scripts-guide.md +174 -0
- package/.agent/skills/chrome-devtools/scripts/aria-snapshot.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/click.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/console.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/core_cli.ts +79 -0
- package/.agent/skills/chrome-devtools/scripts/evaluate.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/fill.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/navigate.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/network.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/performance.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/screenshot.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/select-ref.ts +3 -0
- package/.agent/skills/cicd-pipeline/AGENTS.md +809 -0
- package/.agent/skills/cicd-pipeline/SKILL.md +164 -0
- package/.agent/skills/cicd-pipeline/rules/_sections.md +15 -0
- package/.agent/skills/cicd-pipeline/rules/_template.md +32 -0
- package/.agent/skills/cicd-pipeline/rules/engineering-spec.md +477 -0
- package/.agent/skills/cicd-pipeline/scripts/flag-manager.ts +253 -0
- package/.agent/skills/cicd-pipeline/scripts/pipeline_validator.ts +133 -0
- package/.agent/skills/code-constitution/AGENTS.md +597 -0
- package/.agent/skills/code-constitution/CHANGELOG.md +216 -0
- package/.agent/skills/code-constitution/SKILL.md +191 -0
- package/.agent/skills/code-constitution/VERSION +3 -0
- package/.agent/skills/code-constitution/examples/violation-backend-mutation/after.tsx +59 -0
- package/.agent/skills/code-constitution/examples/violation-backend-mutation/before.tsx +42 -0
- package/.agent/skills/code-constitution/examples/violation-backend-mutation/explanation.md +91 -0
- package/.agent/skills/code-constitution/examples/violation-chart-injection/after.tsx +99 -0
- package/.agent/skills/code-constitution/examples/violation-chart-injection/before.tsx +57 -0
- package/.agent/skills/code-constitution/examples/violation-chart-injection/explanation.md +120 -0
- package/.agent/skills/code-constitution/knowledge/lessons-learned.yaml +3 -0
- package/.agent/skills/code-constitution/metadata/precedence.yaml +117 -0
- package/.agent/skills/code-constitution/metadata/scope-map.yaml +156 -0
- package/.agent/skills/code-constitution/proposals/v1.1-change-proposal-template.md +201 -0
- package/.agent/skills/code-constitution/resources/AUTHORITY_MODEL.md +115 -0
- package/.agent/skills/code-constitution/resources/ENFORCEMENT_GUIDE.md +246 -0
- package/.agent/skills/code-constitution/resources/LOAD_ORDER.md +86 -0
- package/.agent/skills/code-constitution/rules/_sections.md +15 -0
- package/.agent/skills/code-constitution/rules/_template.md +32 -0
- package/.agent/skills/code-constitution/rules/constitution/master-constitution.md +210 -0
- package/.agent/skills/code-constitution/rules/doctrines/architecture/architecture-doctrine.md +188 -0
- package/.agent/skills/code-constitution/rules/doctrines/backend/backend-data-engine-doctrine.md +218 -0
- package/.agent/skills/code-constitution/rules/doctrines/commercial/commercial-guardrails-doctrine.md +196 -0
- package/.agent/skills/code-constitution/rules/doctrines/data/data-integrity-doctrine.md +202 -0
- package/.agent/skills/code-constitution/rules/doctrines/frontend/frontend-mobile-doctrine.md +169 -0
- package/.agent/skills/code-constitution/rules/doctrines/frontend/interaction-patterns-doctrine.md +176 -0
- package/.agent/skills/code-constitution/rules/doctrines/learning/learning-engine-doctrine.md +192 -0
- package/.agent/skills/code-constitution/rules/doctrines/performance/performance-doctrine.md +180 -0
- package/.agent/skills/code-constitution/rules/doctrines/review/code-review-doctrine.md +174 -0
- package/.agent/skills/code-constitution/rules/enforcement/agents/agent-enforcement-protocol.md +218 -0
- package/.agent/skills/code-constitution/rules/enforcement/agents/agent-system-prompt.md +196 -0
- package/.agent/skills/code-constitution/rules/enforcement/checklists/backend-api-review-checklist.md +131 -0
- package/.agent/skills/code-constitution/rules/enforcement/checklists/chart-component-review-checklist.md +147 -0
- package/.agent/skills/code-constitution/rules/enforcement/checklists/frontend-review-checklist.md +194 -0
- package/.agent/skills/code-constitution/rules/enforcement/playbooks/doctrine-violation-playbook.md +236 -0
- package/.agent/skills/code-constitution/rules/engineering-spec.md +561 -0
- package/.agent/skills/code-constitution/scripts/audit_pr.ts +219 -0
- package/.agent/skills/code-constitution/scripts/check_boundaries.ts +134 -0
- package/.agent/skills/code-constitution/scripts/learn.ts +202 -0
- package/.agent/skills/code-constitution/scripts/validate_doctrine.ts +287 -0
- package/.agent/skills/code-craft/AGENTS.md +803 -0
- package/.agent/skills/code-craft/SKILL.md +170 -0
- package/.agent/skills/code-craft/rules/_sections.md +20 -0
- package/.agent/skills/code-craft/rules/_template.md +32 -0
- package/.agent/skills/code-craft/rules/engineering-spec.md +447 -0
- package/.agent/skills/code-craft/rules/verification-scripts.md +83 -0
- package/.agent/skills/code-craft/scripts/code_quality_checker.ts +193 -0
- package/.agent/skills/code-review/AGENTS.md +1664 -0
- package/.agent/skills/code-review/SKILL.md +152 -0
- package/.agent/skills/code-review/rules/_sections.md +15 -0
- package/.agent/skills/code-review/rules/_template.md +32 -0
- package/.agent/skills/code-review/rules/engineering-spec.md +466 -0
- package/.agent/skills/code-review/scripts/lint_runner.ts +213 -0
- package/.agent/skills/code-review/scripts/type_coverage.ts +118 -0
- package/.agent/skills/context-engineering/AGENTS.md +499 -0
- package/.agent/skills/context-engineering/SKILL.md +147 -0
- package/.agent/skills/context-engineering/rules/_sections.md +15 -0
- package/.agent/skills/context-engineering/rules/_template.md +32 -0
- package/.agent/skills/context-engineering/rules/engineering-spec.md +463 -0
- package/.agent/skills/context-engineering/scripts/context_analyzer.ts +127 -0
- package/.agent/skills/copywriting/AGENTS.md +501 -0
- package/.agent/skills/copywriting/SKILL.md +188 -0
- package/.agent/skills/copywriting/rules/_sections.md +15 -0
- package/.agent/skills/copywriting/rules/_template.md +32 -0
- package/.agent/skills/copywriting/rules/engineering-spec.md +465 -0
- package/.agent/skills/copywriting/scripts/copy_validator.ts +185 -0
- package/.agent/skills/data-modeler/AGENTS.md +814 -0
- package/.agent/skills/data-modeler/SKILL.md +195 -0
- package/.agent/skills/data-modeler/rules/_sections.md +15 -0
- package/.agent/skills/data-modeler/rules/_template.md +32 -0
- package/.agent/skills/data-modeler/rules/database-selection.md +124 -0
- package/.agent/skills/data-modeler/rules/engineering-spec.md +479 -0
- package/.agent/skills/data-modeler/rules/indexing.md +166 -0
- package/.agent/skills/data-modeler/rules/migrations.md +176 -0
- package/.agent/skills/data-modeler/rules/optimization.md +161 -0
- package/.agent/skills/data-modeler/rules/orm-selection.md +155 -0
- package/.agent/skills/data-modeler/rules/schema-design.md +162 -0
- package/.agent/skills/data-modeler/scripts/schema_validator.ts +357 -0
- package/.agent/skills/debug-pro/AGENTS.md +798 -0
- package/.agent/skills/debug-pro/SKILL.md +193 -0
- package/.agent/skills/debug-pro/defense-in-depth/SKILL.md +148 -0
- package/.agent/skills/debug-pro/root-cause-tracing/SKILL.md +196 -0
- package/.agent/skills/debug-pro/root-cause-tracing/find-polluter.sh +63 -0
- package/.agent/skills/debug-pro/rules/_sections.md +15 -0
- package/.agent/skills/debug-pro/rules/_template.md +32 -0
- package/.agent/skills/debug-pro/rules/engineering-spec.md +491 -0
- package/.agent/skills/debug-pro/scripts/debug_verifier.ts +148 -0
- package/.agent/skills/debug-pro/verification-before-completion/SKILL.md +160 -0
- package/.agent/skills/design-system/AGENTS.md +4216 -0
- package/.agent/skills/design-system/SKILL.md +186 -0
- package/.agent/skills/design-system/rules/_sections.md +65 -0
- package/.agent/skills/design-system/rules/_template.md +32 -0
- package/.agent/skills/design-system/rules/animation-guide.md +355 -0
- package/.agent/skills/design-system/rules/color-system.md +335 -0
- package/.agent/skills/design-system/rules/color-systems.md +133 -0
- package/.agent/skills/design-system/rules/decision-trees.md +442 -0
- package/.agent/skills/design-system/rules/design-extraction.md +152 -0
- package/.agent/skills/design-system/rules/engineering-spec.md +484 -0
- package/.agent/skills/design-system/rules/motion-design.md +161 -0
- package/.agent/skills/design-system/rules/motion-graphics.md +330 -0
- package/.agent/skills/design-system/rules/spatial-composition.md +184 -0
- package/.agent/skills/design-system/rules/typography-system.md +369 -0
- package/.agent/skills/design-system/rules/typography.md +124 -0
- package/.agent/skills/design-system/rules/ux-psychology.md +565 -0
- package/.agent/skills/design-system/rules/visual-effects.md +407 -0
- package/.agent/skills/design-system/scripts/accessibility_checker.ts +292 -0
- package/.agent/skills/design-system/scripts/ux_audit.ts +356 -0
- package/.agent/skills/doc-templates/AGENTS.md +820 -0
- package/.agent/skills/doc-templates/SKILL.md +260 -0
- package/.agent/skills/doc-templates/rules/_sections.md +20 -0
- package/.agent/skills/doc-templates/rules/_template.md +32 -0
- package/.agent/skills/doc-templates/rules/doc.md +355 -0
- package/.agent/skills/doc-templates/rules/engineering-spec.md +422 -0
- package/.agent/skills/doc-templates/scripts/editor-server.ts +162 -0
- package/.agent/skills/doc-templates/scripts/inject_otel.ts +22 -0
- package/.agent/skills/doc-templates/scripts/kanban-server.ts +171 -0
- package/.agent/skills/doc-templates/scripts/markdown-server.ts +185 -0
- package/.agent/skills/e2e-automation/AGENTS.md +882 -0
- package/.agent/skills/e2e-automation/SKILL.md +175 -0
- package/.agent/skills/e2e-automation/rules/_sections.md +20 -0
- package/.agent/skills/e2e-automation/rules/_template.md +32 -0
- package/.agent/skills/e2e-automation/rules/aria-snapshot.md +185 -0
- package/.agent/skills/e2e-automation/rules/engineering-spec.md +501 -0
- package/.agent/skills/e2e-automation/scripts/playwright_runner.ts +208 -0
- package/.agent/skills/execution-reporter/AGENTS.md +419 -0
- package/.agent/skills/execution-reporter/SKILL.md +152 -0
- package/.agent/skills/execution-reporter/rules/_sections.md +15 -0
- package/.agent/skills/execution-reporter/rules/_template.md +32 -0
- package/.agent/skills/execution-reporter/rules/engineering-spec.md +389 -0
- package/.agent/skills/game-development/2d-games/SKILL.md +140 -0
- package/.agent/skills/game-development/3d-games/SKILL.md +156 -0
- package/.agent/skills/game-development/AGENTS.md +783 -0
- package/.agent/skills/game-development/SKILL.md +178 -0
- package/.agent/skills/game-development/game-art/SKILL.md +207 -0
- package/.agent/skills/game-development/game-audio/SKILL.md +211 -0
- package/.agent/skills/game-development/game-design/SKILL.md +151 -0
- package/.agent/skills/game-development/mobile-games/SKILL.md +130 -0
- package/.agent/skills/game-development/multiplayer/SKILL.md +154 -0
- package/.agent/skills/game-development/pc-games/SKILL.md +167 -0
- package/.agent/skills/game-development/rules/_sections.md +15 -0
- package/.agent/skills/game-development/rules/_template.md +32 -0
- package/.agent/skills/game-development/rules/engineering-spec.md +480 -0
- package/.agent/skills/game-development/vr-ar/SKILL.md +144 -0
- package/.agent/skills/game-development/web-games/SKILL.md +173 -0
- package/.agent/skills/git-workflow/AGENTS.md +554 -0
- package/.agent/skills/git-workflow/SKILL.md +181 -0
- package/.agent/skills/git-workflow/rules/_sections.md +15 -0
- package/.agent/skills/git-workflow/rules/_template.md +32 -0
- package/.agent/skills/git-workflow/rules/engineering-spec.md +518 -0
- package/.agent/skills/gitops/AGENTS.md +921 -0
- package/.agent/skills/gitops/SKILL.md +163 -0
- package/.agent/skills/gitops/rules/_sections.md +25 -0
- package/.agent/skills/gitops/rules/_template.md +32 -0
- package/.agent/skills/gitops/rules/argocd-setup.md +148 -0
- package/.agent/skills/gitops/rules/engineering-spec.md +450 -0
- package/.agent/skills/gitops/rules/sync-policies.md +145 -0
- package/.agent/skills/google-adk-python/AGENTS.md +1054 -0
- package/.agent/skills/google-adk-python/SKILL.md +168 -0
- package/.agent/skills/google-adk-python/rules/_sections.md +25 -0
- package/.agent/skills/google-adk-python/rules/_template.md +32 -0
- package/.agent/skills/google-adk-python/rules/deployment.md +138 -0
- package/.agent/skills/google-adk-python/rules/engineering-spec.md +451 -0
- package/.agent/skills/google-adk-python/rules/multi-agent.md +146 -0
- package/.agent/skills/google-adk-python/rules/tools.md +131 -0
- package/.agent/skills/idea-storm/AGENTS.md +995 -0
- package/.agent/skills/idea-storm/SKILL.md +160 -0
- package/.agent/skills/idea-storm/rules/_sections.md +25 -0
- package/.agent/skills/idea-storm/rules/_template.md +32 -0
- package/.agent/skills/idea-storm/rules/architecture-debate.md +122 -0
- package/.agent/skills/idea-storm/rules/dynamic-questioning.md +374 -0
- package/.agent/skills/idea-storm/rules/engineering-spec.md +466 -0
- package/.agent/skills/knowledge-compiler/SKILL.md +320 -0
- package/.agent/skills/knowledge-graph/AGENTS.md +762 -0
- package/.agent/skills/knowledge-graph/SKILL.md +157 -0
- package/.agent/skills/knowledge-graph/rules/_sections.md +15 -0
- package/.agent/skills/knowledge-graph/rules/_template.md +32 -0
- package/.agent/skills/knowledge-graph/rules/engineering-spec.md +439 -0
- package/.agent/skills/knowledge-linter/SKILL.md +217 -0
- package/.agent/skills/lifecycle-orchestrator/AGENTS.md +989 -0
- package/.agent/skills/lifecycle-orchestrator/SKILL.md +169 -0
- package/.agent/skills/lifecycle-orchestrator/rules/_sections.md +15 -0
- package/.agent/skills/lifecycle-orchestrator/rules/_template.md +32 -0
- package/.agent/skills/lifecycle-orchestrator/rules/engineering-spec.md +525 -0
- package/.agent/skills/lifecycle-orchestrator/scripts/state_manager.ts +189 -0
- package/.agent/skills/mcp-builder/AGENTS.md +1653 -0
- package/.agent/skills/mcp-builder/SKILL.md +166 -0
- package/.agent/skills/mcp-builder/rules/_sections.md +40 -0
- package/.agent/skills/mcp-builder/rules/_template.md +32 -0
- package/.agent/skills/mcp-builder/rules/best-practices.md +157 -0
- package/.agent/skills/mcp-builder/rules/design-principles.md +105 -0
- package/.agent/skills/mcp-builder/rules/engineering-spec.md +473 -0
- package/.agent/skills/mcp-builder/rules/evaluation.md +103 -0
- package/.agent/skills/mcp-builder/rules/python-implementation.md +249 -0
- package/.agent/skills/mcp-builder/rules/quickstart.md +111 -0
- package/.agent/skills/mcp-builder/rules/typescript-implementation.md +280 -0
- package/.agent/skills/mcp-management/AGENTS.md +837 -0
- package/.agent/skills/mcp-management/SKILL.md +164 -0
- package/.agent/skills/mcp-management/rules/_sections.md +25 -0
- package/.agent/skills/mcp-management/rules/_template.md +32 -0
- package/.agent/skills/mcp-management/rules/cli-usage.md +146 -0
- package/.agent/skills/mcp-management/rules/engineering-spec.md +501 -0
- package/.agent/skills/mcp-management/rules/protocol.md +159 -0
- package/.agent/skills/media-processing/AGENTS.md +479 -0
- package/.agent/skills/media-processing/SKILL.md +176 -0
- package/.agent/skills/media-processing/rules/_sections.md +15 -0
- package/.agent/skills/media-processing/rules/_template.md +32 -0
- package/.agent/skills/media-processing/rules/engineering-spec.md +452 -0
- package/.agent/skills/media-processing/scripts/convert-video.ts +155 -0
- package/.agent/skills/media-processing/scripts/optimize-image.ts +127 -0
- package/.agent/skills/mobile-design/AGENTS.md +6531 -0
- package/.agent/skills/mobile-design/SKILL.md +165 -0
- package/.agent/skills/mobile-design/rules/_sections.md +45 -0
- package/.agent/skills/mobile-design/rules/_template.md +32 -0
- package/.agent/skills/mobile-design/rules/decision-trees.md +540 -0
- package/.agent/skills/mobile-design/rules/engineering-spec.md +467 -0
- package/.agent/skills/mobile-design/rules/mobile-backend.md +516 -0
- package/.agent/skills/mobile-design/rules/mobile-color-system.md +436 -0
- package/.agent/skills/mobile-design/rules/mobile-debugging.md +146 -0
- package/.agent/skills/mobile-design/rules/mobile-design-thinking.md +381 -0
- package/.agent/skills/mobile-design/rules/mobile-navigation.md +474 -0
- package/.agent/skills/mobile-design/rules/mobile-performance.md +783 -0
- package/.agent/skills/mobile-design/rules/mobile-testing.md +380 -0
- package/.agent/skills/mobile-design/rules/mobile-typography.md +449 -0
- package/.agent/skills/mobile-design/rules/platform-android.md +682 -0
- package/.agent/skills/mobile-design/rules/platform-ios.md +577 -0
- package/.agent/skills/mobile-design/rules/touch-psychology.md +553 -0
- package/.agent/skills/mobile-design/scripts/mobile_audit.ts +309 -0
- package/.agent/skills/mobile-developer/AGENTS.md +904 -0
- package/.agent/skills/mobile-developer/SKILL.md +194 -0
- package/.agent/skills/mobile-developer/rules/_sections.md +75 -0
- package/.agent/skills/mobile-developer/rules/_template.md +32 -0
- package/.agent/skills/mobile-developer/rules/anti-patterns.md +70 -0
- package/.agent/skills/mobile-developer/rules/app-store-optimization.md +319 -0
- package/.agent/skills/mobile-developer/rules/decision-trees.md +545 -0
- package/.agent/skills/mobile-developer/rules/deep-linking.md +441 -0
- package/.agent/skills/mobile-developer/rules/engineering-spec.md +477 -0
- package/.agent/skills/mobile-developer/rules/flutter.md +475 -0
- package/.agent/skills/mobile-developer/rules/mobile-backend.md +516 -0
- package/.agent/skills/mobile-developer/rules/mobile-color-system.md +444 -0
- package/.agent/skills/mobile-developer/rules/mobile-debugging.md +428 -0
- package/.agent/skills/mobile-developer/rules/mobile-design-thinking.md +367 -0
- package/.agent/skills/mobile-developer/rules/mobile-navigation.md +483 -0
- package/.agent/skills/mobile-developer/rules/mobile-performance.md +778 -0
- package/.agent/skills/mobile-developer/rules/mobile-testing.md +382 -0
- package/.agent/skills/mobile-developer/rules/mobile-typography.md +457 -0
- package/.agent/skills/mobile-developer/rules/native.md +572 -0
- package/.agent/skills/mobile-developer/rules/platform-android.md +676 -0
- package/.agent/skills/mobile-developer/rules/platform-ios.md +571 -0
- package/.agent/skills/mobile-developer/rules/push-notifications.md +599 -0
- package/.agent/skills/mobile-developer/rules/react-native.md +422 -0
- package/.agent/skills/mobile-developer/rules/touch-psychology.md +547 -0
- package/.agent/skills/mobile-developer/scripts/mobile_audit.ts +701 -0
- package/.agent/skills/nextjs-pro/AGENTS.md +3932 -0
- package/.agent/skills/nextjs-pro/SKILL.md +171 -0
- package/.agent/skills/nextjs-pro/rules/_sections.md +50 -0
- package/.agent/skills/nextjs-pro/rules/_template.md +32 -0
- package/.agent/skills/nextjs-pro/rules/advanced-event-handler-refs.md +59 -0
- package/.agent/skills/nextjs-pro/rules/advanced-init-once.md +46 -0
- package/.agent/skills/nextjs-pro/rules/advanced-use-latest.md +43 -0
- package/.agent/skills/nextjs-pro/rules/async-api-routes.md +42 -0
- package/.agent/skills/nextjs-pro/rules/async-defer-await.md +84 -0
- package/.agent/skills/nextjs-pro/rules/async-dependencies.md +55 -0
- package/.agent/skills/nextjs-pro/rules/async-parallel.md +32 -0
- package/.agent/skills/nextjs-pro/rules/async-suspense-boundaries.md +103 -0
- package/.agent/skills/nextjs-pro/rules/bundle-barrel-imports.md +63 -0
- package/.agent/skills/nextjs-pro/rules/bundle-conditional.md +35 -0
- package/.agent/skills/nextjs-pro/rules/bundle-defer-third-party.md +53 -0
- package/.agent/skills/nextjs-pro/rules/bundle-dynamic-imports.md +39 -0
- package/.agent/skills/nextjs-pro/rules/bundle-preload.md +54 -0
- package/.agent/skills/nextjs-pro/rules/client-event-listeners.md +78 -0
- package/.agent/skills/nextjs-pro/rules/client-localstorage-schema.md +75 -0
- package/.agent/skills/nextjs-pro/rules/client-passive-event-listeners.md +52 -0
- package/.agent/skills/nextjs-pro/rules/client-swr-dedup.md +60 -0
- package/.agent/skills/nextjs-pro/rules/engineering-spec.md +440 -0
- package/.agent/skills/nextjs-pro/rules/js-batch-dom-css.md +111 -0
- package/.agent/skills/nextjs-pro/rules/js-cache-function-results.md +84 -0
- package/.agent/skills/nextjs-pro/rules/js-cache-property-access.md +32 -0
- package/.agent/skills/nextjs-pro/rules/js-cache-storage.md +74 -0
- package/.agent/skills/nextjs-pro/rules/js-combine-iterations.md +36 -0
- package/.agent/skills/nextjs-pro/rules/js-early-exit.md +54 -0
- package/.agent/skills/nextjs-pro/rules/js-hoist-regexp.md +49 -0
- package/.agent/skills/nextjs-pro/rules/js-index-maps.md +41 -0
- package/.agent/skills/nextjs-pro/rules/js-length-check-first.md +53 -0
- package/.agent/skills/nextjs-pro/rules/js-min-max-loop.md +86 -0
- package/.agent/skills/nextjs-pro/rules/js-set-map-lookups.md +28 -0
- package/.agent/skills/nextjs-pro/rules/js-tosorted-immutable.md +61 -0
- package/.agent/skills/nextjs-pro/rules/rendering-activity.md +30 -0
- package/.agent/skills/nextjs-pro/rules/rendering-animate-svg-wrapper.md +51 -0
- package/.agent/skills/nextjs-pro/rules/rendering-conditional-render.md +44 -0
- package/.agent/skills/nextjs-pro/rules/rendering-content-visibility.md +42 -0
- package/.agent/skills/nextjs-pro/rules/rendering-hoist-jsx.md +50 -0
- package/.agent/skills/nextjs-pro/rules/rendering-hydration-no-flicker.md +86 -0
- package/.agent/skills/nextjs-pro/rules/rendering-hydration-suppress-warning.md +34 -0
- package/.agent/skills/nextjs-pro/rules/rendering-svg-precision.md +32 -0
- package/.agent/skills/nextjs-pro/rules/rendering-usetransition-loading.md +79 -0
- package/.agent/skills/nextjs-pro/rules/rerender-defer-reads.md +43 -0
- package/.agent/skills/nextjs-pro/rules/rerender-dependencies.md +49 -0
- package/.agent/skills/nextjs-pro/rules/rerender-derived-state-no-effect.md +44 -0
- package/.agent/skills/nextjs-pro/rules/rerender-derived-state.md +33 -0
- package/.agent/skills/nextjs-pro/rules/rerender-functional-setstate.md +78 -0
- package/.agent/skills/nextjs-pro/rules/rerender-lazy-state-init.md +62 -0
- package/.agent/skills/nextjs-pro/rules/rerender-memo-with-default-value.md +42 -0
- package/.agent/skills/nextjs-pro/rules/rerender-memo.md +48 -0
- package/.agent/skills/nextjs-pro/rules/rerender-move-effect-to-event.md +49 -0
- package/.agent/skills/nextjs-pro/rules/rerender-simple-expression-in-memo.md +39 -0
- package/.agent/skills/nextjs-pro/rules/rerender-transitions.md +44 -0
- package/.agent/skills/nextjs-pro/rules/rerender-use-ref-transient-values.md +77 -0
- package/.agent/skills/nextjs-pro/rules/schema.json +34 -0
- package/.agent/skills/nextjs-pro/rules/server-after-nonblocking.md +77 -0
- package/.agent/skills/nextjs-pro/rules/server-auth-actions.md +100 -0
- package/.agent/skills/nextjs-pro/rules/server-cache-lru.md +45 -0
- package/.agent/skills/nextjs-pro/rules/server-cache-react.md +80 -0
- package/.agent/skills/nextjs-pro/rules/server-dedup-props.md +69 -0
- package/.agent/skills/nextjs-pro/rules/server-parallel-fetching.md +87 -0
- package/.agent/skills/nextjs-pro/rules/server-serialization.md +42 -0
- package/.agent/skills/nodejs-pro/AGENTS.md +866 -0
- package/.agent/skills/nodejs-pro/SKILL.md +172 -0
- package/.agent/skills/nodejs-pro/rules/_sections.md +50 -0
- package/.agent/skills/nodejs-pro/rules/_template.md +32 -0
- package/.agent/skills/nodejs-pro/rules/architecture-patterns.md +229 -0
- package/.agent/skills/nodejs-pro/rules/async-patterns.md +246 -0
- package/.agent/skills/nodejs-pro/rules/engineering-spec.md +438 -0
- package/.agent/skills/nodejs-pro/rules/error-handling.md +257 -0
- package/.agent/skills/nodejs-pro/rules/framework-selection.md +220 -0
- package/.agent/skills/nodejs-pro/rules/runtime-modules.md +176 -0
- package/.agent/skills/nodejs-pro/rules/testing-strategy.md +266 -0
- package/.agent/skills/nodejs-pro/rules/validation-security.md +205 -0
- package/.agent/skills/observability/AGENTS.md +607 -0
- package/.agent/skills/observability/SKILL.md +178 -0
- package/.agent/skills/observability/rules/_sections.md +15 -0
- package/.agent/skills/observability/rules/_template.md +32 -0
- package/.agent/skills/observability/rules/engineering-spec.md +440 -0
- package/.agent/skills/offensive-sec/AGENTS.md +849 -0
- package/.agent/skills/offensive-sec/SKILL.md +191 -0
- package/.agent/skills/offensive-sec/rules/_sections.md +15 -0
- package/.agent/skills/offensive-sec/rules/_template.md +32 -0
- package/.agent/skills/offensive-sec/rules/engineering-spec.md +470 -0
- package/.agent/skills/perf-optimizer/AGENTS.md +870 -0
- package/.agent/skills/perf-optimizer/SKILL.md +189 -0
- package/.agent/skills/perf-optimizer/rules/_sections.md +15 -0
- package/.agent/skills/perf-optimizer/rules/_template.md +32 -0
- package/.agent/skills/perf-optimizer/rules/backend-patterns.md +312 -0
- package/.agent/skills/perf-optimizer/rules/engineering-spec.md +428 -0
- package/.agent/skills/perf-optimizer/scripts/lighthouse_audit.ts +201 -0
- package/.agent/skills/problem-checker/AGENTS.md +519 -0
- package/.agent/skills/problem-checker/SKILL.md +189 -0
- package/.agent/skills/problem-checker/rules/_sections.md +15 -0
- package/.agent/skills/problem-checker/rules/_template.md +32 -0
- package/.agent/skills/problem-checker/rules/engineering-spec.md +483 -0
- package/.agent/skills/problem-checker/scripts/check_problems.ts +396 -0
- package/.agent/skills/project-planner/AGENTS.md +2698 -0
- package/.agent/skills/project-planner/SKILL.md +166 -0
- package/.agent/skills/project-planner/rules/_sections.md +15 -0
- package/.agent/skills/project-planner/rules/_template.md +32 -0
- package/.agent/skills/project-planner/rules/engineering-spec.md +420 -0
- package/.agent/skills/python-pro/AGENTS.md +1871 -0
- package/.agent/skills/python-pro/SKILL.md +182 -0
- package/.agent/skills/python-pro/rules/_sections.md +50 -0
- package/.agent/skills/python-pro/rules/_template.md +32 -0
- package/.agent/skills/python-pro/rules/async-patterns.md +168 -0
- package/.agent/skills/python-pro/rules/django-patterns.md +194 -0
- package/.agent/skills/python-pro/rules/engineering-spec.md +442 -0
- package/.agent/skills/python-pro/rules/fastapi-patterns.md +179 -0
- package/.agent/skills/python-pro/rules/framework-selection.md +167 -0
- package/.agent/skills/python-pro/rules/project-structure.md +181 -0
- package/.agent/skills/python-pro/rules/testing-patterns.md +212 -0
- package/.agent/skills/python-pro/rules/type-hints.md +159 -0
- package/.agent/skills/react-pro/AGENTS.md +963 -0
- package/.agent/skills/react-pro/SKILL.md +232 -0
- package/.agent/skills/react-pro/rules/_sections.md +40 -0
- package/.agent/skills/react-pro/rules/_template.md +32 -0
- package/.agent/skills/react-pro/rules/component-patterns.md +145 -0
- package/.agent/skills/react-pro/rules/composition-compound.md +82 -0
- package/.agent/skills/react-pro/rules/data-fetching.md +133 -0
- package/.agent/skills/react-pro/rules/engineering-spec.md +453 -0
- package/.agent/skills/react-pro/rules/error-boundary.md +61 -0
- package/.agent/skills/react-pro/rules/file-organization.md +158 -0
- package/.agent/skills/react-pro/rules/hooks-custom.md +61 -0
- package/.agent/skills/react-pro/rules/mui-styling.md +138 -0
- package/.agent/skills/react-pro/rules/patterns.md +24 -0
- package/.agent/skills/react-pro/rules/performance-optimization.md +65 -0
- package/.agent/skills/react-pro/rules/performance.md +137 -0
- package/.agent/skills/react-pro/rules/react19-hooks.md +85 -0
- package/.agent/skills/react-pro/rules/state-management.md +90 -0
- package/.agent/skills/react-pro/rules/testing-patterns.md +52 -0
- package/.agent/skills/registry.json +1251 -0
- package/.agent/skills/security-scanner/AGENTS.md +851 -0
- package/.agent/skills/security-scanner/SKILL.md +182 -0
- package/.agent/skills/security-scanner/rules/_sections.md +15 -0
- package/.agent/skills/security-scanner/rules/_template.md +32 -0
- package/.agent/skills/security-scanner/rules/auth-patterns.md +281 -0
- package/.agent/skills/security-scanner/rules/checklists.md +186 -0
- package/.agent/skills/security-scanner/rules/engineering-spec.md +440 -0
- package/.agent/skills/security-scanner/scripts/security_scan.ts +513 -0
- package/.agent/skills/seo-optimizer/AGENTS.md +839 -0
- package/.agent/skills/seo-optimizer/SKILL.md +180 -0
- package/.agent/skills/seo-optimizer/rules/_sections.md +15 -0
- package/.agent/skills/seo-optimizer/rules/_template.md +32 -0
- package/.agent/skills/seo-optimizer/rules/engineering-spec.md +433 -0
- package/.agent/skills/seo-optimizer/scripts/geo_checker.ts +109 -0
- package/.agent/skills/seo-optimizer/scripts/seo_checker.ts +308 -0
- package/.agent/skills/server-ops/AGENTS.md +643 -0
- package/.agent/skills/server-ops/SKILL.md +194 -0
- package/.agent/skills/server-ops/rules/_sections.md +15 -0
- package/.agent/skills/server-ops/rules/_template.md +32 -0
- package/.agent/skills/server-ops/rules/engineering-spec.md +450 -0
- package/.agent/skills/shell-script/AGENTS.md +499 -0
- package/.agent/skills/shell-script/SKILL.md +205 -0
- package/.agent/skills/shell-script/rules/_sections.md +15 -0
- package/.agent/skills/shell-script/rules/_template.md +32 -0
- package/.agent/skills/shell-script/rules/engineering-spec.md +463 -0
- package/.agent/skills/skill-generator/SKILL.md +147 -0
- package/.agent/skills/smart-router/SKILL.md +95 -0
- package/.agent/skills/studio/AGENTS.md +636 -0
- package/.agent/skills/studio/SKILL.md +178 -0
- package/.agent/skills/studio/data/charts.csv +26 -0
- package/.agent/skills/studio/data/colors.csv +97 -0
- package/.agent/skills/studio/data/icons.csv +101 -0
- package/.agent/skills/studio/data/landing.csv +31 -0
- package/.agent/skills/studio/data/products.csv +97 -0
- package/.agent/skills/studio/data/prompts.csv +24 -0
- package/.agent/skills/studio/data/react-performance.csv +45 -0
- package/.agent/skills/studio/data/stacks/flutter.csv +52 -0
- package/.agent/skills/studio/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/studio/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/skills/studio/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/studio/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/skills/studio/data/stacks/nuxtjs.csv +59 -0
- package/.agent/skills/studio/data/stacks/react-native.csv +52 -0
- package/.agent/skills/studio/data/stacks/react.csv +54 -0
- package/.agent/skills/studio/data/stacks/shadcn.csv +61 -0
- package/.agent/skills/studio/data/stacks/svelte.csv +54 -0
- package/.agent/skills/studio/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/studio/data/stacks/vue.csv +50 -0
- package/.agent/skills/studio/data/styles.csv +59 -0
- package/.agent/skills/studio/data/typography.csv +58 -0
- package/.agent/skills/studio/data/ui-reasoning.csv +101 -0
- package/.agent/skills/studio/data/ux-guidelines.csv +100 -0
- package/.agent/skills/studio/data/web-interface.csv +31 -0
- package/.agent/skills/studio/rules/_sections.md +15 -0
- package/.agent/skills/studio/rules/_template.md +32 -0
- package/.agent/skills/studio/rules/engineering-spec.md +455 -0
- package/.agent/skills/studio/scripts/core.ts +345 -0
- package/.agent/skills/studio/scripts/design_system.ts +953 -0
- package/.agent/skills/studio/scripts/search.ts +197 -0
- package/.agent/skills/studio/scripts/types.ts +147 -0
- package/.agent/skills/studio/scripts/utils/component-specs.ts +154 -0
- package/.agent/skills/studio/scripts/utils/config-loader.ts +165 -0
- package/.agent/skills/studio/scripts/utils/css-templates.ts +169 -0
- package/.agent/skills/studio/scripts/utils/css-validator.ts +95 -0
- package/.agent/skills/studio/scripts/utils/csv-loader.ts +52 -0
- package/.agent/skills/studio/scripts/utils/intelligent-overrides.ts +129 -0
- package/.agent/skills/studio/scripts/utils/page-override-formatter.ts +143 -0
- package/.agent/skills/studio/scripts/utils/page-type-detector.ts +124 -0
- package/.agent/skills/studio/scripts/utils/search-cache.ts +165 -0
- package/.agent/skills/studio/scripts/utils/text-utils.ts +44 -0
- package/.agent/skills/system-design/AGENTS.md +597 -0
- package/.agent/skills/system-design/SKILL.md +153 -0
- package/.agent/skills/system-design/rules/_sections.md +15 -0
- package/.agent/skills/system-design/rules/_template.md +32 -0
- package/.agent/skills/system-design/rules/context-discovery.md +117 -0
- package/.agent/skills/system-design/rules/engineering-spec.md +437 -0
- package/.agent/skills/system-design/rules/examples.md +180 -0
- package/.agent/skills/system-design/rules/pattern-selection.md +130 -0
- package/.agent/skills/system-design/rules/patterns-reference.md +110 -0
- package/.agent/skills/system-design/rules/trade-off-analysis.md +169 -0
- package/.agent/skills/tailwind-kit/AGENTS.md +1135 -0
- package/.agent/skills/tailwind-kit/SKILL.md +171 -0
- package/.agent/skills/tailwind-kit/rules/_sections.md +20 -0
- package/.agent/skills/tailwind-kit/rules/_template.md +32 -0
- package/.agent/skills/tailwind-kit/rules/components.md +232 -0
- package/.agent/skills/tailwind-kit/rules/engineering-spec.md +435 -0
- package/.agent/skills/tailwind-kit/rules/responsive.md +221 -0
- package/.agent/skills/tailwind-kit/rules/v4-config.md +72 -0
- package/.agent/skills/test-architect/AGENTS.md +851 -0
- package/.agent/skills/test-architect/SKILL.md +176 -0
- package/.agent/skills/test-architect/rules/_sections.md +15 -0
- package/.agent/skills/test-architect/rules/_template.md +32 -0
- package/.agent/skills/test-architect/rules/engineering-spec.md +434 -0
- package/.agent/skills/test-architect/scripts/test_runner.ts +265 -0
- package/.agent/skills/typescript-expert/AGENTS.md +1045 -0
- package/.agent/skills/typescript-expert/SKILL.md +200 -0
- package/.agent/skills/typescript-expert/rules/_sections.md +20 -0
- package/.agent/skills/typescript-expert/rules/_template.md +32 -0
- package/.agent/skills/typescript-expert/rules/engineering-spec.md +433 -0
- package/.agent/skills/typescript-expert/rules/tsconfig-strict.json +92 -0
- package/.agent/skills/typescript-expert/rules/typescript-cheatsheet.md +407 -0
- package/.agent/skills/typescript-expert/rules/utility-types.ts +264 -0
- package/.agent/skills/typescript-expert/scripts/ts_diagnostic.ts +321 -0
- package/.agent/skills/vercel-deploy/AGENTS.md +490 -0
- package/.agent/skills/vercel-deploy/SKILL.md +175 -0
- package/.agent/skills/vercel-deploy/rules/_sections.md +15 -0
- package/.agent/skills/vercel-deploy/rules/_template.md +32 -0
- package/.agent/skills/vercel-deploy/rules/engineering-spec.md +463 -0
- package/.agent/skills/vercel-deploy/scripts/deploy.sh +310 -0
- package/.agent/workflows/api.md +377 -0
- package/.agent/workflows/autopilot.md +344 -0
- package/.agent/workflows/build.md +338 -0
- package/.agent/workflows/chronicle.md +279 -0
- package/.agent/workflows/cook.md +217 -0
- package/.agent/workflows/diagnose.md +302 -0
- package/.agent/workflows/fix.md +253 -0
- package/.agent/workflows/game.md +329 -0
- package/.agent/workflows/inspect.md +276 -0
- package/.agent/workflows/knowledge.md +212 -0
- package/.agent/workflows/launch.md +345 -0
- package/.agent/workflows/mobile.md +354 -0
- package/.agent/workflows/monitor.md +239 -0
- package/.agent/workflows/optimize.md +269 -0
- package/.agent/workflows/plan.md +278 -0
- package/.agent/workflows/stage.md +286 -0
- package/.agent/workflows/studio.md +276 -0
- package/.agent/workflows/think.md +262 -0
- package/.agent/workflows/validate.md +289 -0
- package/.agentignore +161 -0
- package/.gitattributes +16 -0
- package/CHANGELOG.md +198 -0
- package/LICENSE +40 -0
- package/README.md +173 -0
- package/docs/SKILL_DESIGN_GUIDE.md +561 -0
- package/docs/The-Complete-Guide-to-Building-Skills-for-Claude.md +1207 -0
- package/docs/WORKFLOW_DESIGN_GUIDE.md +325 -0
- package/package.json +33 -0
- package/tsconfig.json +28 -0
|
@@ -0,0 +1,1135 @@
|
|
|
1
|
+
# tailwind-kit
|
|
2
|
+
|
|
3
|
+
**Version 1.0.0**
|
|
4
|
+
Engineering
|
|
5
|
+
March 2026
|
|
6
|
+
|
|
7
|
+
> **Note:**
|
|
8
|
+
> This document is for agents and LLMs to follow when working on tailwind-kit domain.
|
|
9
|
+
> Optimized for automation and consistency by AI-assisted workflows.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Tailwind Kit — Tailwind CSS v4 Patterns
|
|
14
|
+
|
|
15
|
+
> CSS-first `@theme`. OKLCH colors. Container queries. Mobile-first responsive.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
| Situation | Approach |
|
|
22
|
+
|-----------|----------|
|
|
23
|
+
| Styling components | Use utility classes |
|
|
24
|
+
| Theme setup | CSS-first `@theme` |
|
|
25
|
+
| Dark mode | Use `dark:` prefix |
|
|
26
|
+
| Responsive | Mobile-first breakpoints |
|
|
27
|
+
| Migrating v3 → v4 | Check migration table |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## System Boundaries
|
|
32
|
+
|
|
33
|
+
| Owned by This Skill | NOT Owned |
|
|
34
|
+
|---------------------|-----------|
|
|
35
|
+
| Tailwind class recommendations | Design theory (→ design-system) |
|
|
36
|
+
| @theme configuration (OKLCH) | Next.js integration (→ nextjs-pro) |
|
|
37
|
+
| v3 → v4 migration paths | AI design (→ studio) |
|
|
38
|
+
| Layout + responsive patterns | CSS processing pipeline |
|
|
39
|
+
|
|
40
|
+
**Expert decision skill:** Produces class recommendations. Does not write files.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## v3 → v4 Migration (3 Breaking Changes)
|
|
45
|
+
|
|
46
|
+
| v3 (Legacy) | v4 (Current) |
|
|
47
|
+
|-------------|-------------|
|
|
48
|
+
| `tailwind.config.js` | CSS-based `@theme` |
|
|
49
|
+
| PostCSS plugin | Oxide engine (10× faster) |
|
|
50
|
+
| JIT mode | Native, always-on |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Core Patterns (4 — Fixed)
|
|
55
|
+
|
|
56
|
+
### Theme (CSS-First)
|
|
57
|
+
```css
|
|
58
|
+
@theme {
|
|
59
|
+
--color-primary: oklch(0.7 0.15 250);
|
|
60
|
+
--color-surface: oklch(0.98 0 0);
|
|
61
|
+
--font-sans: 'Inter', system-ui, sans-serif;
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Responsive vs Container
|
|
66
|
+
| Prefix | Responds To |
|
|
67
|
+
|--------|-------------|
|
|
68
|
+
| `md:` | Viewport width |
|
|
69
|
+
| `@md:` | Parent container width |
|
|
70
|
+
|
|
71
|
+
### Dark Mode
|
|
72
|
+
```html
|
|
73
|
+
<div class="bg-white dark:bg-zinc-900 text-zinc-900 dark:text-white">
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Layout Patterns (4 — Deterministic)
|
|
79
|
+
|
|
80
|
+
| Pattern | Classes |
|
|
81
|
+
|---------|---------|
|
|
82
|
+
| Center both | `flex items-center justify-center` |
|
|
83
|
+
| Vertical stack | `flex flex-col gap-4` |
|
|
84
|
+
| Space between | `flex justify-between items-center` |
|
|
85
|
+
| Auto-fit grid | `grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))]` |
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## OKLCH Color System (3 Layers)
|
|
90
|
+
|
|
91
|
+
| Layer | Example | Purpose |
|
|
92
|
+
|-------|---------|---------|
|
|
93
|
+
| Primitive | `--blue-500` | Raw values |
|
|
94
|
+
| Semantic | `--color-primary` | Purpose-based |
|
|
95
|
+
| Component | `--button-bg` | Component-specific |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Error Taxonomy
|
|
100
|
+
|
|
101
|
+
| Code | Recoverable | Trigger |
|
|
102
|
+
|------|-------------|---------|
|
|
103
|
+
| `ERR_INVALID_REQUEST_TYPE` | No | Request type not supported |
|
|
104
|
+
| `ERR_UNKNOWN_LAYOUT` | Yes | Layout type not one of 4 |
|
|
105
|
+
| `ERR_UNKNOWN_COLOR_LAYER` | Yes | Color layer not one of 3 |
|
|
106
|
+
| `ERR_VERSION_MISMATCH` | Yes | Mixing v3 config with v4 |
|
|
107
|
+
|
|
108
|
+
**Zero internal retries.** Same use case = same class recommendation.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Anti-Patterns
|
|
113
|
+
|
|
114
|
+
| ❌ Don't | ✅ Do |
|
|
115
|
+
|---------|-------|
|
|
116
|
+
| Arbitrary values everywhere | Use design system scale |
|
|
117
|
+
| `!important` | Fix specificity |
|
|
118
|
+
| Inline `style=` | Use utilities |
|
|
119
|
+
| Heavy `@apply` | Prefer components |
|
|
120
|
+
| Mix v3 config with v4 | Migrate fully |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 📑 Content Map
|
|
125
|
+
|
|
126
|
+
| File | Description | When to Read |
|
|
127
|
+
|------|-------------|--------------|
|
|
128
|
+
| [v4-config.md](rules/v4-config.md) | Full v4 configuration | New project setup |
|
|
129
|
+
| [responsive.md](rules/responsive.md) | Breakpoints + container queries | Responsive design |
|
|
130
|
+
| [components.md](rules/components.md) | Component extraction | Component patterns |
|
|
131
|
+
| [engineering-spec.md](rules/engineering-spec.md) | Full spec | Architecture review |
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 🔗 Related
|
|
136
|
+
|
|
137
|
+
| Item | Type | Purpose |
|
|
138
|
+
|------|------|---------|
|
|
139
|
+
| `design-system` | Skill | Design patterns |
|
|
140
|
+
| `nextjs-pro` | Skill | Next.js styling |
|
|
141
|
+
| `studio` | Skill | AI design |
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Detailed Rules
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### Rule: components
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
name: components
|
|
158
|
+
description: Tailwind CSS v4 component patterns — cva variants, cn() utility, Button/Card/Input extraction, class ordering, TypeScript props
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
# Component Extraction
|
|
162
|
+
|
|
163
|
+
> React components first. @apply only for truly static patterns. Use cva for variants.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## When to Extract
|
|
168
|
+
|
|
169
|
+
| Signal | Action |
|
|
170
|
+
|--------|--------|
|
|
171
|
+
| Same class combo 3+ times | Extract component |
|
|
172
|
+
| Complex state variants | Use `cva` for variant map |
|
|
173
|
+
| Design system element | Extract + document + type |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## cn() Utility (Essential)
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
// lib/utils.ts — merge Tailwind classes safely
|
|
181
|
+
import { clsx, type ClassValue } from 'clsx'
|
|
182
|
+
import { twMerge } from 'tailwind-merge'
|
|
183
|
+
|
|
184
|
+
export function cn(...inputs: ClassValue[]) {
|
|
185
|
+
return twMerge(clsx(inputs))
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Usage — last class wins, no conflicts
|
|
189
|
+
cn('px-4 py-2', 'px-6') // → 'py-2 px-6'
|
|
190
|
+
cn('text-red-500', false && 'hidden') // → 'text-red-500'
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Button (cva + TypeScript)
|
|
196
|
+
|
|
197
|
+
```tsx
|
|
198
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
199
|
+
import { cn } from '@/lib/utils'
|
|
200
|
+
|
|
201
|
+
const buttonVariants = cva(
|
|
202
|
+
// Base classes (always applied)
|
|
203
|
+
'inline-flex items-center justify-center rounded-md font-medium transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50',
|
|
204
|
+
{
|
|
205
|
+
variants: {
|
|
206
|
+
variant: {
|
|
207
|
+
primary: 'bg-primary text-white hover:bg-primary/90',
|
|
208
|
+
secondary: 'bg-surface border border-zinc-200 hover:bg-zinc-50',
|
|
209
|
+
ghost: 'hover:bg-zinc-100 dark:hover:bg-zinc-800',
|
|
210
|
+
danger: 'bg-red-600 text-white hover:bg-red-700',
|
|
211
|
+
},
|
|
212
|
+
size: {
|
|
213
|
+
sm: 'h-8 px-3 text-sm',
|
|
214
|
+
md: 'h-10 px-4 text-sm',
|
|
215
|
+
lg: 'h-12 px-6 text-base',
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
defaultVariants: {
|
|
219
|
+
variant: 'primary',
|
|
220
|
+
size: 'md',
|
|
221
|
+
},
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
interface ButtonProps
|
|
226
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
227
|
+
VariantProps<typeof buttonVariants> {}
|
|
228
|
+
|
|
229
|
+
export function Button({ className, variant, size, ...props }: ButtonProps) {
|
|
230
|
+
return (
|
|
231
|
+
<button className={cn(buttonVariants({ variant, size }), className)} {...props} />
|
|
232
|
+
)
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Usage
|
|
236
|
+
<Button variant="primary" size="lg">Save</Button>
|
|
237
|
+
<Button variant="ghost">Cancel</Button>
|
|
238
|
+
<Button variant="danger" disabled>Delete</Button>
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Card
|
|
244
|
+
|
|
245
|
+
```tsx
|
|
246
|
+
import { cn } from '@/lib/utils'
|
|
247
|
+
|
|
248
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
249
|
+
|
|
250
|
+
export function Card({ className, ...props }: CardProps) {
|
|
251
|
+
return (
|
|
252
|
+
<div
|
|
253
|
+
className={cn(
|
|
254
|
+
'rounded-xl border border-zinc-200 bg-white shadow-sm',
|
|
255
|
+
'dark:border-zinc-800 dark:bg-zinc-950',
|
|
256
|
+
className,
|
|
257
|
+
)}
|
|
258
|
+
{...props}
|
|
259
|
+
/>
|
|
260
|
+
)
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export function CardHeader({ className, ...props }: CardProps) {
|
|
264
|
+
return <div className={cn('p-6 pb-0', className)} {...props} />
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export function CardContent({ className, ...props }: CardProps) {
|
|
268
|
+
return <div className={cn('p-6', className)} {...props} />
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Usage
|
|
272
|
+
<Card>
|
|
273
|
+
<CardHeader><h3>Title</h3></CardHeader>
|
|
274
|
+
<CardContent><p>Content</p></CardContent>
|
|
275
|
+
</Card>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Input
|
|
281
|
+
|
|
282
|
+
```tsx
|
|
283
|
+
import { cn } from '@/lib/utils'
|
|
284
|
+
|
|
285
|
+
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
286
|
+
label?: string
|
|
287
|
+
error?: string
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export function Input({ label, error, className, id, ...props }: InputProps) {
|
|
291
|
+
return (
|
|
292
|
+
<div className="flex flex-col gap-1.5">
|
|
293
|
+
{label && (
|
|
294
|
+
<label htmlFor={id} className="text-sm font-medium text-zinc-700 dark:text-zinc-300">
|
|
295
|
+
{label}
|
|
296
|
+
</label>
|
|
297
|
+
)}
|
|
298
|
+
<input
|
|
299
|
+
id={id}
|
|
300
|
+
className={cn(
|
|
301
|
+
'h-10 w-full rounded-md border px-3 text-sm',
|
|
302
|
+
'bg-white dark:bg-zinc-950',
|
|
303
|
+
'border-zinc-200 dark:border-zinc-800',
|
|
304
|
+
'placeholder:text-zinc-400',
|
|
305
|
+
'focus:outline-none focus:ring-2 focus:ring-primary/50',
|
|
306
|
+
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
307
|
+
error && 'border-red-500 focus:ring-red-500/50',
|
|
308
|
+
className,
|
|
309
|
+
)}
|
|
310
|
+
{...props}
|
|
311
|
+
/>
|
|
312
|
+
{error && <p className="text-sm text-red-500">{error}</p>}
|
|
313
|
+
</div>
|
|
314
|
+
)
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// Usage
|
|
318
|
+
<Input label="Email" type="email" placeholder="you@example.com" />
|
|
319
|
+
<Input label="Password" error="Required" />
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## @apply (Static Only — Use Sparingly)
|
|
325
|
+
|
|
326
|
+
```css
|
|
327
|
+
/* Only for patterns that never need props or state */
|
|
328
|
+
.prose-content h2 {
|
|
329
|
+
@apply text-2xl font-bold mt-8 mb-4 text-zinc-900 dark:text-white;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.prose-content p {
|
|
333
|
+
@apply text-base leading-relaxed text-zinc-600 dark:text-zinc-400;
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
> ⚠️ **Avoid heavy @apply.** If it needs variants, props, or state → use React component + cva.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Class Ordering Convention
|
|
342
|
+
|
|
343
|
+
```html
|
|
344
|
+
<div class="
|
|
345
|
+
/* 1. Layout */ flex items-center justify-between
|
|
346
|
+
/* 2. Sizing */ w-full h-12
|
|
347
|
+
/* 3. Spacing */ px-4 py-2 gap-4
|
|
348
|
+
/* 4. Typography */ text-sm font-medium
|
|
349
|
+
/* 5. Colors */ bg-white text-zinc-900
|
|
350
|
+
/* 6. Borders */ border border-zinc-200 rounded-lg
|
|
351
|
+
/* 7. Effects */ shadow-sm
|
|
352
|
+
/* 8. Transitions */transition-all duration-200
|
|
353
|
+
/* 9. States */ hover:bg-zinc-50 focus:ring-2
|
|
354
|
+
/* 10. Dark */ dark:bg-zinc-900 dark:text-white
|
|
355
|
+
/* 11. Responsive */md:flex-row md:text-base
|
|
356
|
+
">
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## Anti-Patterns
|
|
362
|
+
|
|
363
|
+
| ❌ Don't | ✅ Do |
|
|
364
|
+
|---------|-------|
|
|
365
|
+
| String concat for variants | `cva` + variant map |
|
|
366
|
+
| `className={condition ? 'a' : 'b'}` | `cn()` with conditional |
|
|
367
|
+
| Heavy @apply for everything | React component + cva |
|
|
368
|
+
| Skip TypeScript on props | Type all component props |
|
|
369
|
+
| Duplicate class sets | Extract shared component |
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## 🔗 Related
|
|
374
|
+
|
|
375
|
+
| File | When to Read |
|
|
376
|
+
|------|-------------|
|
|
377
|
+
| [responsive.md](responsive.md) | Responsive patterns |
|
|
378
|
+
| [v4-config.md](v4-config.md) | @theme setup |
|
|
379
|
+
| [SKILL.md](../SKILL.md) | Patterns overview |
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
### Rule: engineering-spec
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
title: Tailwind Kit — Engineering Specification
|
|
387
|
+
impact: MEDIUM
|
|
388
|
+
tags: tailwind-kit
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
# Tailwind Kit — Engineering Specification
|
|
392
|
+
|
|
393
|
+
> Production-grade specification for Tailwind CSS v4 patterns at FAANG scale.
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## 1. Overview
|
|
398
|
+
|
|
399
|
+
Tailwind Kit provides structured guidance for Tailwind CSS v4: CSS-first configuration (`@theme` directive), v3→v4 migration (3 breaking changes), core patterns (theme, container queries, dark mode, responsive), layout patterns (4: center, vertical stack, space between, auto-fit grid), OKLCH color system (3 layers: primitive, semantic, component), typography scale (5 sizes), animation classes (4), and anti-patterns (5). The skill operates as an **Expert (decision tree)** — it produces Tailwind class recommendations, configuration guidance, and migration paths. It does not write CSS files, install packages, or modify codebases.
|
|
400
|
+
|
|
401
|
+
**Contract Version:** 2.0.0
|
|
402
|
+
**Backward Compatibility:** breaking (first hardened version)
|
|
403
|
+
**Breaking Changes:** None — new spec for first hardening
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## 2. Problem Statement
|
|
408
|
+
|
|
409
|
+
Tailwind CSS usage at scale faces four quantified problems:
|
|
410
|
+
|
|
411
|
+
| Problem | Measurement | Impact |
|
|
412
|
+
|---------|-------------|--------|
|
|
413
|
+
| v3 config in v4 project | 40% of projects still use tailwind.config.js | Build failures |
|
|
414
|
+
| Arbitrary values overuse | 35% of utility classes use arbitrary `[...]` | No design consistency |
|
|
415
|
+
| Viewport vs container confusion | 45% mix `md:` (viewport) with `@md:` (container) | Wrong responsive behavior |
|
|
416
|
+
| Missing dark mode | 30% of projects skip dark mode preparation | Rework when adding dark |
|
|
417
|
+
|
|
418
|
+
Tailwind Kit eliminates these with CSS-first `@theme` configuration, design system scale enforcement, explicit viewport vs container query routing, and dark mode patterns.
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## 3. Design Goals
|
|
423
|
+
|
|
424
|
+
| ID | Goal | Measurable Constraint |
|
|
425
|
+
|----|------|-----------------------|
|
|
426
|
+
| G1 | CSS-first configuration | `@theme` directive with OKLCH colors |
|
|
427
|
+
| G2 | v3 → v4 migration | 3 breaking changes documented |
|
|
428
|
+
| G3 | Core patterns | 4 patterns: theme, container queries, dark mode, responsive |
|
|
429
|
+
| G4 | Layout patterns | 4 composable layouts |
|
|
430
|
+
| G5 | Color system | 3 layers: primitive, semantic, component |
|
|
431
|
+
| G6 | Typography | 5 size levels |
|
|
432
|
+
| G7 | Anti-patterns | 5 avoidance rules |
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## 4. Non-Goals
|
|
437
|
+
|
|
438
|
+
| ID | Excluded | Rationale |
|
|
439
|
+
|----|----------|-----------|
|
|
440
|
+
| NG1 | Design system theory | Owned by `design-system` skill |
|
|
441
|
+
| NG2 | Next.js integration | Owned by `nextjs-pro` skill |
|
|
442
|
+
| NG3 | AI design intelligence | Owned by `studio` skill |
|
|
443
|
+
| NG4 | CSS specification | Tailwind-specific only |
|
|
444
|
+
| NG5 | Package installation | Runtime concern |
|
|
445
|
+
| NG6 | Build pipeline configuration | Tooling concern |
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## 5. System Boundaries
|
|
450
|
+
|
|
451
|
+
| Boundary | Owned | Not Owned |
|
|
452
|
+
|----------|-------|-----------|
|
|
453
|
+
| @theme configuration | CSS-first setup with OKLCH | CSS processing |
|
|
454
|
+
| Utility class guidance | Class selection by pattern | DOM manipulation |
|
|
455
|
+
| v3 → v4 migration | 3 breaking changes | Automated migration |
|
|
456
|
+
| Layout patterns | 4 composable flex/grid layouts | Component implementation |
|
|
457
|
+
| Color system | 3-layer token architecture | Color generation |
|
|
458
|
+
|
|
459
|
+
**Side-effect boundary:** Tailwind Kit produces class recommendations, configuration guidance, and migration paths. It does not write files, install packages, or modify projects.
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## 6. Integration Model
|
|
464
|
+
|
|
465
|
+
### 6.1 Agent Contract
|
|
466
|
+
|
|
467
|
+
#### Input Schema
|
|
468
|
+
|
|
469
|
+
```
|
|
470
|
+
Request_Type: string # "pattern" | "layout" | "color" | "typography" |
|
|
471
|
+
# "animation" | "dark-mode" | "responsive" |
|
|
472
|
+
# "migration" | "config" | "full-guide"
|
|
473
|
+
Context: {
|
|
474
|
+
tailwind_version: string | null # "v3" | "v4"
|
|
475
|
+
use_case: string | null # "theme" | "container-query" | "dark-mode" | "responsive"
|
|
476
|
+
layout_type: string | null # "center" | "vertical-stack" | "space-between" | "auto-grid"
|
|
477
|
+
color_layer: string | null # "primitive" | "semantic" | "component"
|
|
478
|
+
}
|
|
479
|
+
contract_version: string # "2.0.0"
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
#### Output Schema
|
|
483
|
+
|
|
484
|
+
```
|
|
485
|
+
Status: "success" | "error"
|
|
486
|
+
Data: {
|
|
487
|
+
pattern: {
|
|
488
|
+
name: string
|
|
489
|
+
classes: string # Tailwind utility classes
|
|
490
|
+
html_example: string | null
|
|
491
|
+
css_example: string | null
|
|
492
|
+
} | null
|
|
493
|
+
layout: {
|
|
494
|
+
type: string
|
|
495
|
+
classes: string
|
|
496
|
+
html_example: string
|
|
497
|
+
} | null
|
|
498
|
+
color: {
|
|
499
|
+
layer: string
|
|
500
|
+
tokens: Array<{
|
|
501
|
+
name: string
|
|
502
|
+
value: string # OKLCH value
|
|
503
|
+
purpose: string
|
|
504
|
+
}>
|
|
505
|
+
} | null
|
|
506
|
+
migration: {
|
|
507
|
+
from: string
|
|
508
|
+
to: string
|
|
509
|
+
changes: Array<{
|
|
510
|
+
v3: string
|
|
511
|
+
v4: string
|
|
512
|
+
}>
|
|
513
|
+
} | null
|
|
514
|
+
config: {
|
|
515
|
+
css: string # @theme block
|
|
516
|
+
description: string
|
|
517
|
+
} | null
|
|
518
|
+
security: {
|
|
519
|
+
rules_of_engagement_followed: boolean
|
|
520
|
+
} | null
|
|
521
|
+
code_quality: {
|
|
522
|
+
problem_checker_run: boolean
|
|
523
|
+
} | null
|
|
524
|
+
metadata: {
|
|
525
|
+
contract_version: string
|
|
526
|
+
backward_compatibility: string
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
Error: ErrorSchema | null
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
#### Error Schema
|
|
533
|
+
|
|
534
|
+
```
|
|
535
|
+
Code: string # From Error Taxonomy (Section 11)
|
|
536
|
+
Message: string
|
|
537
|
+
Request_Type: string
|
|
538
|
+
Recoverable: boolean
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
#### Deterministic Guarantees
|
|
542
|
+
|
|
543
|
+
- Layout routing is fixed: center → `flex items-center justify-center`; vertical stack → `flex flex-col gap-4`; space between → `flex justify-between items-center`; auto-grid → `grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))]`.
|
|
544
|
+
- Responsive routing is fixed: viewport → `md:`; container → `@md:`.
|
|
545
|
+
- Color system is fixed: 3 layers (primitive → semantic → component).
|
|
546
|
+
- Typography is fixed: 5 sizes (xs=0.75rem, sm=0.875rem, base=1rem, lg=1.125rem, xl+=1.25rem+).
|
|
547
|
+
- v3→v4 migration is fixed: 3 breaking changes.
|
|
548
|
+
- Same use case = same class recommendation.
|
|
549
|
+
|
|
550
|
+
#### What Agents May Assume
|
|
551
|
+
|
|
552
|
+
- Tailwind CSS v4 is installed and configured.
|
|
553
|
+
- `@theme` directive is supported.
|
|
554
|
+
- OKLCH color space is available.
|
|
555
|
+
- Container queries are supported.
|
|
556
|
+
|
|
557
|
+
#### What Agents Must NOT Assume
|
|
558
|
+
|
|
559
|
+
- v3 configuration works in v4.
|
|
560
|
+
- All browsers support container queries.
|
|
561
|
+
- OKLCH has same browser support as hex/rgb.
|
|
562
|
+
- `@apply` is recommended for all cases.
|
|
563
|
+
|
|
564
|
+
#### Side-Effect Boundaries
|
|
565
|
+
|
|
566
|
+
| Operation | Side Effects |
|
|
567
|
+
|-----------|-------------|
|
|
568
|
+
| Pattern | None; class recommendation |
|
|
569
|
+
| Layout | None; class recommendation |
|
|
570
|
+
| Color | None; token recommendation |
|
|
571
|
+
| Migration | None; change documentation |
|
|
572
|
+
| Config | None; CSS snippet output |
|
|
573
|
+
|
|
574
|
+
### 6.2 Workflow Contract
|
|
575
|
+
|
|
576
|
+
#### Invocation Pattern
|
|
577
|
+
|
|
578
|
+
```
|
|
579
|
+
1. Identify styling need (layout, color, typography, etc.)
|
|
580
|
+
2. Invoke appropriate request type for class guidance
|
|
581
|
+
3. For new projects: invoke config for @theme setup
|
|
582
|
+
4. For v3 projects: invoke migration for change list
|
|
583
|
+
5. Write code (caller's responsibility)
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
#### Execution Guarantees
|
|
587
|
+
|
|
588
|
+
- Each invocation produces a complete recommendation.
|
|
589
|
+
- All decisions are independent (can be invoked in any order).
|
|
590
|
+
|
|
591
|
+
#### Failure Propagation Model
|
|
592
|
+
|
|
593
|
+
| Failure Severity | Propagation | Workflow Action |
|
|
594
|
+
|-----------------|-------------|-----------------|
|
|
595
|
+
| Unknown layout type | Return error | Use center, vertical-stack, space-between, or auto-grid |
|
|
596
|
+
| Unknown color layer | Return error | Use primitive, semantic, or component |
|
|
597
|
+
| Invalid request type | Return error | Use supported type |
|
|
598
|
+
|
|
599
|
+
#### Retry Boundaries
|
|
600
|
+
|
|
601
|
+
- Zero internal retries. Deterministic output.
|
|
602
|
+
|
|
603
|
+
#### Isolation Model
|
|
604
|
+
|
|
605
|
+
- Each invocation is stateless and independent.
|
|
606
|
+
|
|
607
|
+
#### Idempotency Expectations
|
|
608
|
+
|
|
609
|
+
| Operation | Idempotent | Notes |
|
|
610
|
+
|-----------|-----------|-------|
|
|
611
|
+
| Pattern | Yes | Same use case = same classes |
|
|
612
|
+
| Layout | Yes | Same type = same classes |
|
|
613
|
+
| Color | Yes | Same layer = same tokens |
|
|
614
|
+
| Migration | Yes | Same version pair = same changes |
|
|
615
|
+
| Config | Yes | Same inputs = same @theme |
|
|
616
|
+
|
|
617
|
+
---
|
|
618
|
+
|
|
619
|
+
## 7. Execution Model
|
|
620
|
+
|
|
621
|
+
### 2-Phase Lifecycle
|
|
622
|
+
|
|
623
|
+
| Phase | Action | Output |
|
|
624
|
+
|-------|--------|--------|
|
|
625
|
+
| **Classify** | Parse use case, layout type, version | Classification |
|
|
626
|
+
| **Guide** | Generate class recommendation, config, or migration | Complete output |
|
|
627
|
+
|
|
628
|
+
All phases synchronous. No async pipeline.
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
## 8. Deterministic Design Principles
|
|
633
|
+
|
|
634
|
+
| Principle | Enforcement |
|
|
635
|
+
|-----------|-------------|
|
|
636
|
+
| Configuration | v4: CSS-first `@theme { }` with OKLCH; v3: `tailwind.config.js` (legacy) |
|
|
637
|
+
| v3→v4 migration | `tailwind.config.js` → CSS `@theme`; PostCSS plugin → Oxide engine (10× faster); JIT mode → native, always-on |
|
|
638
|
+
| Responsive | Viewport: `md:`, `lg:`; Container: `@md:`, `@lg:` (responds to parent width) |
|
|
639
|
+
| Dark mode | `dark:` prefix: `bg-white dark:bg-zinc-900 text-zinc-900 dark:text-white` |
|
|
640
|
+
| Layout center | `flex items-center justify-center` |
|
|
641
|
+
| Layout vertical | `flex flex-col gap-4` |
|
|
642
|
+
| Layout space-between | `flex justify-between items-center` |
|
|
643
|
+
| Layout auto-grid | `grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))]` |
|
|
644
|
+
| Color layers | Primitive (`--blue-500`) → Semantic (`--color-primary`) → Component (`--button-bg`) |
|
|
645
|
+
| Typography | xs=0.75rem, sm=0.875rem, base=1rem, lg=1.125rem, xl+=1.25rem+ |
|
|
646
|
+
| Animation | spin (rotation), pulse (opacity), `transition-all duration-200`, `hover:scale-105` |
|
|
647
|
+
|
|
648
|
+
---
|
|
649
|
+
|
|
650
|
+
## 9. State & Idempotency Model
|
|
651
|
+
|
|
652
|
+
Stateless. Fully idempotent. No persistent state.
|
|
653
|
+
|
|
654
|
+
---
|
|
655
|
+
|
|
656
|
+
## 10. Failure Handling Strategy
|
|
657
|
+
|
|
658
|
+
| Failure Class | Behavior | Caller Recovery |
|
|
659
|
+
|---------------|----------|-----------------|
|
|
660
|
+
| Unknown layout type | Return `ERR_UNKNOWN_LAYOUT` | Use valid type |
|
|
661
|
+
| Unknown color layer | Return `ERR_UNKNOWN_COLOR_LAYER` | Use primitive, semantic, or component |
|
|
662
|
+
| Invalid request type | Return `ERR_INVALID_REQUEST_TYPE` | Use supported type |
|
|
663
|
+
|
|
664
|
+
**Invariant:** Every failure returns a structured error. No partial class recommendations.
|
|
665
|
+
|
|
666
|
+
---
|
|
667
|
+
|
|
668
|
+
## 11. Error Taxonomy
|
|
669
|
+
|
|
670
|
+
| Code | Category | Recoverable | Description |
|
|
671
|
+
|------|----------|-------------|-------------|
|
|
672
|
+
| `ERR_INVALID_REQUEST_TYPE` | Validation | No | Request type not supported |
|
|
673
|
+
| `ERR_UNKNOWN_LAYOUT` | Validation | Yes | Layout type not one of 4 |
|
|
674
|
+
| `ERR_UNKNOWN_COLOR_LAYER` | Validation | Yes | Color layer not one of 3 |
|
|
675
|
+
| `ERR_VERSION_MISMATCH` | Validation | Yes | Mixing v3 config with v4 features |
|
|
676
|
+
|
|
677
|
+
---
|
|
678
|
+
|
|
679
|
+
## 12. Timeout & Retry Policy
|
|
680
|
+
|
|
681
|
+
| Parameter | Default | Maximum | Rationale |
|
|
682
|
+
|-----------|---------|---------|-----------|
|
|
683
|
+
| Decision generation | N/A | N/A | Synchronous; < 50ms |
|
|
684
|
+
| Internal retries | Zero | Zero | Deterministic output |
|
|
685
|
+
|
|
686
|
+
---
|
|
687
|
+
|
|
688
|
+
## 13. Observability & Logging Schema
|
|
689
|
+
|
|
690
|
+
### Log Entry Format (OpenTelemetry Event Array)
|
|
691
|
+
|
|
692
|
+
```json
|
|
693
|
+
{
|
|
694
|
+
"traceId": "uuid",
|
|
695
|
+
"spanId": "uuid",
|
|
696
|
+
"events": [
|
|
697
|
+
{
|
|
698
|
+
"name": "css_class_recommended",
|
|
699
|
+
"timestamp": "ISO8601",
|
|
700
|
+
"attributes": {
|
|
701
|
+
"component": "button",
|
|
702
|
+
"pattern": "variants"
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"name": "layout_pattern_generated",
|
|
707
|
+
"timestamp": "ISO8601",
|
|
708
|
+
"attributes": {
|
|
709
|
+
"type": "auto-grid",
|
|
710
|
+
"responsive": true
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "v3_v4_migration_started",
|
|
715
|
+
"timestamp": "ISO8601",
|
|
716
|
+
"attributes": {
|
|
717
|
+
"legacy_theme_keys": 4
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
]
|
|
721
|
+
}
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
### Required Log Points
|
|
725
|
+
|
|
726
|
+
| Event | Log Level | Fields |
|
|
727
|
+
|-------|-----------|--------|
|
|
728
|
+
| Pattern recommended | INFO | use_case, classes |
|
|
729
|
+
| Layout recommended | INFO | layout_type, classes |
|
|
730
|
+
| Migration guidance | INFO | from_version, to_version |
|
|
731
|
+
| Decision failed | ERROR | error_code, message |
|
|
732
|
+
|
|
733
|
+
### Metrics
|
|
734
|
+
|
|
735
|
+
| Metric | Type | Unit |
|
|
736
|
+
|--------|------|------|
|
|
737
|
+
| `tailwindkit.decision.duration` | Histogram | ms |
|
|
738
|
+
| `tailwindkit.request_type.distribution` | Counter | per type |
|
|
739
|
+
| `tailwindkit.layout_type.distribution` | Counter | per layout |
|
|
740
|
+
| `tailwindkit.version.distribution` | Counter | per version |
|
|
741
|
+
|
|
742
|
+
---
|
|
743
|
+
|
|
744
|
+
## 14. Security & Trust Model
|
|
745
|
+
|
|
746
|
+
### Data Handling
|
|
747
|
+
|
|
748
|
+
- Tailwind Kit produces utility class recommendations and CSS snippets only.
|
|
749
|
+
- No credentials, no PII, no user data.
|
|
750
|
+
- No file access, no network calls, no package installation.
|
|
751
|
+
|
|
752
|
+
---
|
|
753
|
+
|
|
754
|
+
## 15. Scalability Model
|
|
755
|
+
|
|
756
|
+
| Dimension | Constraint | Mitigation |
|
|
757
|
+
|-----------|-----------|------------|
|
|
758
|
+
| Throughput | CPU-bound decision tree | < 50ms; scales linearly |
|
|
759
|
+
| Concurrency | Stateless invocations | Unlimited parallel |
|
|
760
|
+
| Memory per invocation | < 1 MB | No accumulation |
|
|
761
|
+
| Network | Zero network calls | No external dependency |
|
|
762
|
+
|
|
763
|
+
---
|
|
764
|
+
|
|
765
|
+
## 16. Concurrency Model
|
|
766
|
+
|
|
767
|
+
Fully parallel. No shared state. No coordination required.
|
|
768
|
+
|
|
769
|
+
---
|
|
770
|
+
|
|
771
|
+
## 17. Resource Lifecycle Management
|
|
772
|
+
|
|
773
|
+
All resources scoped to invocation. No persistent handles.
|
|
774
|
+
|
|
775
|
+
---
|
|
776
|
+
|
|
777
|
+
## 18. Performance Constraints
|
|
778
|
+
|
|
779
|
+
| Operation | P50 Target | P99 Target | Hard Limit |
|
|
780
|
+
|-----------|-----------|-----------|------------|
|
|
781
|
+
| Pattern recommendation | < 2 ms | < 5 ms | 20 ms |
|
|
782
|
+
| Layout recommendation | < 2 ms | < 5 ms | 20 ms |
|
|
783
|
+
| Migration guidance | < 5 ms | < 15 ms | 50 ms |
|
|
784
|
+
| Full guide | < 15 ms | < 40 ms | 50 ms |
|
|
785
|
+
| Output size | ≤ 3,000 chars | ≤ 6,000 chars | 10,000 chars |
|
|
786
|
+
|
|
787
|
+
---
|
|
788
|
+
|
|
789
|
+
## 19. Operational Risks
|
|
790
|
+
|
|
791
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
792
|
+
|------|-----------|--------|------------|
|
|
793
|
+
| Tailwind v5 release | Low | Major breaking changes | Track Tailwind roadmap |
|
|
794
|
+
| OKLCH browser support | Low | Color rendering issues | Fallback hex values |
|
|
795
|
+
| Container query support | Low | Responsive failures | Document browser support |
|
|
796
|
+
| Deprecation of @apply | Medium | Pattern changes | Reduce @apply recommendations |
|
|
797
|
+
|
|
798
|
+
---
|
|
799
|
+
|
|
800
|
+
## 20. Compliance with skill-design-guide.md
|
|
801
|
+
|
|
802
|
+
| Requirement | Status | Evidence |
|
|
803
|
+
|-------------|--------|----------|
|
|
804
|
+
| YAML frontmatter complete | ✅ | name, description, metadata with category, version, triggers, coordinates_with, success_metrics |
|
|
805
|
+
| SKILL.md < 200 lines | ✅ | Entry point under 200 lines |
|
|
806
|
+
| Prerequisites documented | ✅ | Tailwind CSS v4 installed |
|
|
807
|
+
| When to Use section | ✅ | Situation-based routing table |
|
|
808
|
+
| Core content matches skill type | ✅ | Expert type: class recommendations, config guidance, migration paths |
|
|
809
|
+
| Troubleshooting section | ✅ | Anti-patterns table |
|
|
810
|
+
| Related section | ✅ | Cross-links to design-system, nextjs-pro, studio |
|
|
811
|
+
| Content Map for multi-file | ✅ | Links to rules/ + engineering-spec.md |
|
|
812
|
+
| Contract versioning | ✅ | contract_version, backward_compatibility, breaking_changes |
|
|
813
|
+
| Compliance matrix structured | ✅ | This table with ✅/❌ + evidence |
|
|
814
|
+
|
|
815
|
+
---
|
|
816
|
+
|
|
817
|
+
## 21. Production Readiness Checklist
|
|
818
|
+
|
|
819
|
+
| Category | Check | Status |
|
|
820
|
+
|----------|-------|--------|
|
|
821
|
+
| **Functionality** | CSS-first @theme configuration | ✅ |
|
|
822
|
+
| **Functionality** | v3→v4 migration (3 breaking changes) | ✅ |
|
|
823
|
+
| **Functionality** | 4 core patterns (theme, container queries, dark mode, responsive) | ✅ |
|
|
824
|
+
| **Functionality** | 4 layout patterns | ✅ |
|
|
825
|
+
| **Functionality** | 3-layer OKLCH color system | ✅ |
|
|
826
|
+
| **Functionality** | 5 typography sizes + 4 animation classes | ✅ |
|
|
827
|
+
| **Contracts** | Input/output/error schemas in pseudo-schema format | ✅ |
|
|
828
|
+
| **Contracts** | Contract versioning with semver | ✅ |
|
|
829
|
+
| **Failure** | Error taxonomy with 4 categorized codes | ✅ |
|
|
830
|
+
| **Failure** | Zero internal retries | ✅ |
|
|
831
|
+
| **Determinism** | Fixed layout classes, fixed color layers, fixed migration | ✅ |
|
|
832
|
+
| **Security** | No files, no network, no packages | ✅ |
|
|
833
|
+
| **Observability** | Structured log schema with 5 mandatory fields | ✅ |
|
|
834
|
+
| **Observability** | 4 metrics defined | ✅ |
|
|
835
|
+
| **Performance** | P50/P99 targets for all operations | ✅ |
|
|
836
|
+
| **Compliance** | All skill-design-guide.md sections mapped with evidence | ✅ |
|
|
837
|
+
|
|
838
|
+
---
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
---
|
|
843
|
+
|
|
844
|
+
### Rule: responsive
|
|
845
|
+
|
|
846
|
+
---
|
|
847
|
+
name: responsive
|
|
848
|
+
description: Tailwind CSS v4 responsive patterns — breakpoints, container queries, responsive grid/typography/images, hide/show, full layout example
|
|
849
|
+
---
|
|
850
|
+
|
|
851
|
+
# Responsive & Container Queries
|
|
852
|
+
|
|
853
|
+
> Mobile-first always. Container queries for components. Viewport breakpoints for page layout.
|
|
854
|
+
|
|
855
|
+
---
|
|
856
|
+
|
|
857
|
+
## Breakpoint System
|
|
858
|
+
|
|
859
|
+
| Prefix | Min Width | Target |
|
|
860
|
+
|--------|-----------|--------|
|
|
861
|
+
| (none) | 0px | Mobile-first base |
|
|
862
|
+
| `sm:` | 640px | Large phone |
|
|
863
|
+
| `md:` | 768px | Tablet |
|
|
864
|
+
| `lg:` | 1024px | Laptop |
|
|
865
|
+
| `xl:` | 1280px | Desktop |
|
|
866
|
+
| `2xl:` | 1536px | Large desktop |
|
|
867
|
+
|
|
868
|
+
---
|
|
869
|
+
|
|
870
|
+
## Mobile-First Pattern
|
|
871
|
+
|
|
872
|
+
```html
|
|
873
|
+
<!-- Base = mobile, then override for larger -->
|
|
874
|
+
<div class="flex flex-col md:flex-row gap-4">
|
|
875
|
+
<div class="w-full md:w-1/2 lg:w-1/3">
|
|
876
|
+
<p class="text-sm md:text-base lg:text-lg">
|
|
877
|
+
Responsive text
|
|
878
|
+
</p>
|
|
879
|
+
</div>
|
|
880
|
+
</div>
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
---
|
|
884
|
+
|
|
885
|
+
## Container Queries (v4 Native)
|
|
886
|
+
|
|
887
|
+
| Type | Prefix | Responds To |
|
|
888
|
+
|------|--------|-------------|
|
|
889
|
+
| Viewport | `md:` | Browser window width |
|
|
890
|
+
| Container | `@md:` | Parent container width |
|
|
891
|
+
|
|
892
|
+
```html
|
|
893
|
+
<!-- Define container on parent -->
|
|
894
|
+
<div class="@container">
|
|
895
|
+
<!-- Children respond to parent width, not viewport -->
|
|
896
|
+
<div class="flex flex-col @sm:flex-row @md:grid @md:grid-cols-3 gap-4">
|
|
897
|
+
<div>Card 1</div>
|
|
898
|
+
<div>Card 2</div>
|
|
899
|
+
<div>Card 3</div>
|
|
900
|
+
</div>
|
|
901
|
+
</div>
|
|
902
|
+
|
|
903
|
+
<!-- Named containers for nested contexts -->
|
|
904
|
+
<div class="@container/sidebar">
|
|
905
|
+
<nav class="@sm/sidebar:flex @md/sidebar:flex-col">
|
|
906
|
+
Links
|
|
907
|
+
</nav>
|
|
908
|
+
</div>
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
**When to use which:**
|
|
912
|
+
|
|
913
|
+
| Scenario | Use |
|
|
914
|
+
|----------|-----|
|
|
915
|
+
| Page-level layout (header, sidebar) | Viewport `md:` |
|
|
916
|
+
| Reusable components (card, widget) | Container `@md:` |
|
|
917
|
+
| Dashboard panels | Container `@md:` |
|
|
918
|
+
|
|
919
|
+
---
|
|
920
|
+
|
|
921
|
+
## Responsive Grid Patterns
|
|
922
|
+
|
|
923
|
+
```html
|
|
924
|
+
<!-- Auto-fit: fills available space, wraps naturally -->
|
|
925
|
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
|
|
926
|
+
<!-- Cards -->
|
|
927
|
+
</div>
|
|
928
|
+
|
|
929
|
+
<!-- Auto-fit with minmax (no breakpoints needed) -->
|
|
930
|
+
<div class="grid grid-cols-[repeat(auto-fit,minmax(280px,1fr))] gap-6">
|
|
931
|
+
<!-- Cards auto-wrap based on available space -->
|
|
932
|
+
</div>
|
|
933
|
+
|
|
934
|
+
<!-- Sidebar + content layout -->
|
|
935
|
+
<div class="grid grid-cols-1 lg:grid-cols-[260px_1fr] gap-6">
|
|
936
|
+
<aside class="hidden lg:block">Sidebar</aside>
|
|
937
|
+
<main>Content</main>
|
|
938
|
+
</div>
|
|
939
|
+
```
|
|
940
|
+
|
|
941
|
+
---
|
|
942
|
+
|
|
943
|
+
## Responsive Typography
|
|
944
|
+
|
|
945
|
+
```html
|
|
946
|
+
<!-- Fluid heading -->
|
|
947
|
+
<h1 class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold">
|
|
948
|
+
Responsive Heading
|
|
949
|
+
</h1>
|
|
950
|
+
|
|
951
|
+
<!-- Fluid body with line height -->
|
|
952
|
+
<p class="text-sm md:text-base lg:text-lg leading-relaxed md:leading-loose">
|
|
953
|
+
Body text that adapts to screen size
|
|
954
|
+
</p>
|
|
955
|
+
|
|
956
|
+
<!-- Clamp (v4 arbitrary) — smooth scaling without breakpoints -->
|
|
957
|
+
<h1 class="text-[clamp(1.5rem,4vw,3rem)] font-bold">
|
|
958
|
+
Fluid without breakpoints
|
|
959
|
+
</h1>
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
---
|
|
963
|
+
|
|
964
|
+
## Show / Hide
|
|
965
|
+
|
|
966
|
+
```html
|
|
967
|
+
<!-- Hide on mobile, show on desktop -->
|
|
968
|
+
<nav class="hidden lg:flex">Desktop nav</nav>
|
|
969
|
+
|
|
970
|
+
<!-- Show on mobile, hide on desktop -->
|
|
971
|
+
<button class="lg:hidden">☰ Menu</button>
|
|
972
|
+
|
|
973
|
+
<!-- Show only on specific range -->
|
|
974
|
+
<div class="hidden md:block xl:hidden">Tablet only</div>
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
---
|
|
978
|
+
|
|
979
|
+
## Responsive Images
|
|
980
|
+
|
|
981
|
+
```html
|
|
982
|
+
<!-- Aspect ratio container -->
|
|
983
|
+
<div class="aspect-video overflow-hidden rounded-lg">
|
|
984
|
+
<img
|
|
985
|
+
src="/hero.jpg"
|
|
986
|
+
alt="Hero"
|
|
987
|
+
class="h-full w-full object-cover"
|
|
988
|
+
/>
|
|
989
|
+
</div>
|
|
990
|
+
|
|
991
|
+
<!-- Responsive image with srcset (HTML) -->
|
|
992
|
+
<img
|
|
993
|
+
srcset="/img-400.jpg 400w, /img-800.jpg 800w, /img-1200.jpg 1200w"
|
|
994
|
+
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
|
|
995
|
+
src="/img-800.jpg"
|
|
996
|
+
alt="Responsive"
|
|
997
|
+
class="w-full rounded-lg"
|
|
998
|
+
/>
|
|
999
|
+
```
|
|
1000
|
+
|
|
1001
|
+
---
|
|
1002
|
+
|
|
1003
|
+
## Full Layout Example
|
|
1004
|
+
|
|
1005
|
+
```html
|
|
1006
|
+
<div class="min-h-screen flex flex-col">
|
|
1007
|
+
<!-- Header -->
|
|
1008
|
+
<header class="sticky top-0 z-50 border-b bg-white/80 backdrop-blur dark:bg-zinc-950/80">
|
|
1009
|
+
<div class="mx-auto flex h-16 max-w-7xl items-center justify-between px-4 lg:px-8">
|
|
1010
|
+
<div class="font-bold text-lg">Logo</div>
|
|
1011
|
+
<nav class="hidden md:flex gap-6 text-sm">
|
|
1012
|
+
<a href="#">Features</a>
|
|
1013
|
+
<a href="#">Pricing</a>
|
|
1014
|
+
</nav>
|
|
1015
|
+
<button class="md:hidden">☰</button>
|
|
1016
|
+
</div>
|
|
1017
|
+
</header>
|
|
1018
|
+
|
|
1019
|
+
<!-- Main with optional sidebar -->
|
|
1020
|
+
<div class="mx-auto flex w-full max-w-7xl flex-1 px-4 lg:px-8">
|
|
1021
|
+
<aside class="hidden lg:block w-64 shrink-0 border-r py-8 pr-6">
|
|
1022
|
+
Sidebar
|
|
1023
|
+
</aside>
|
|
1024
|
+
<main class="flex-1 py-8 lg:pl-8">
|
|
1025
|
+
Content
|
|
1026
|
+
</main>
|
|
1027
|
+
</div>
|
|
1028
|
+
|
|
1029
|
+
<!-- Footer -->
|
|
1030
|
+
<footer class="border-t py-8">
|
|
1031
|
+
<div class="mx-auto max-w-7xl px-4 lg:px-8 text-sm text-zinc-500">
|
|
1032
|
+
© 2025
|
|
1033
|
+
</div>
|
|
1034
|
+
</footer>
|
|
1035
|
+
</div>
|
|
1036
|
+
```
|
|
1037
|
+
|
|
1038
|
+
---
|
|
1039
|
+
|
|
1040
|
+
## Anti-Patterns
|
|
1041
|
+
|
|
1042
|
+
| ❌ Don't | ✅ Do |
|
|
1043
|
+
|---------|-------|
|
|
1044
|
+
| Desktop-first (override down) | Mobile-first (build up) |
|
|
1045
|
+
| Viewport breakpoints for components | Container queries `@md:` |
|
|
1046
|
+
| Fixed pixel widths everywhere | Use `max-w-7xl`, `w-full` |
|
|
1047
|
+
| Skip `aspect-ratio` | Use `aspect-video`, `aspect-square` |
|
|
1048
|
+
| Hard-code show/hide in JS | Use `hidden md:block` |
|
|
1049
|
+
|
|
1050
|
+
---
|
|
1051
|
+
|
|
1052
|
+
## 🔗 Related
|
|
1053
|
+
|
|
1054
|
+
| File | When to Read |
|
|
1055
|
+
|------|-------------|
|
|
1056
|
+
| [components.md](components.md) | Component extraction |
|
|
1057
|
+
| [v4-config.md](v4-config.md) | @theme setup + breakpoints |
|
|
1058
|
+
| [SKILL.md](../SKILL.md) | Layout patterns |
|
|
1059
|
+
|
|
1060
|
+
---
|
|
1061
|
+
|
|
1062
|
+
### Rule: v4-config
|
|
1063
|
+
|
|
1064
|
+
---
|
|
1065
|
+
title: Tailwind v4 Configuration
|
|
1066
|
+
impact: MEDIUM
|
|
1067
|
+
tags: tailwind-kit
|
|
1068
|
+
---
|
|
1069
|
+
|
|
1070
|
+
# Tailwind v4 Configuration
|
|
1071
|
+
|
|
1072
|
+
## Full Theme Configuration
|
|
1073
|
+
|
|
1074
|
+
```css
|
|
1075
|
+
@theme {
|
|
1076
|
+
/* Colors - OKLCH for perceptual uniformity */
|
|
1077
|
+
--color-primary: oklch(0.7 0.15 250);
|
|
1078
|
+
--color-primary-hover: oklch(0.65 0.18 250);
|
|
1079
|
+
--color-secondary: oklch(0.6 0.1 180);
|
|
1080
|
+
|
|
1081
|
+
--color-surface: oklch(0.98 0 0);
|
|
1082
|
+
--color-surface-dark: oklch(0.15 0 0);
|
|
1083
|
+
--color-surface-elevated: oklch(1 0 0);
|
|
1084
|
+
|
|
1085
|
+
--color-text: oklch(0.2 0 0);
|
|
1086
|
+
--color-text-muted: oklch(0.5 0 0);
|
|
1087
|
+
--color-text-inverse: oklch(0.95 0 0);
|
|
1088
|
+
|
|
1089
|
+
/* Spacing scale */
|
|
1090
|
+
--spacing-xs: 0.25rem;
|
|
1091
|
+
--spacing-sm: 0.5rem;
|
|
1092
|
+
--spacing-md: 1rem;
|
|
1093
|
+
--spacing-lg: 2rem;
|
|
1094
|
+
--spacing-xl: 4rem;
|
|
1095
|
+
|
|
1096
|
+
/* Typography */
|
|
1097
|
+
--font-sans: 'Inter', system-ui, sans-serif;
|
|
1098
|
+
--font-mono: 'JetBrains Mono', monospace;
|
|
1099
|
+
--font-display: 'Outfit', sans-serif;
|
|
1100
|
+
|
|
1101
|
+
/* Border radius */
|
|
1102
|
+
--radius-sm: 0.25rem;
|
|
1103
|
+
--radius-md: 0.5rem;
|
|
1104
|
+
--radius-lg: 1rem;
|
|
1105
|
+
--radius-full: 9999px;
|
|
1106
|
+
|
|
1107
|
+
/* Shadows */
|
|
1108
|
+
--shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
|
|
1109
|
+
--shadow-md: 0 4px 6px rgba(0,0,0,0.1);
|
|
1110
|
+
--shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
|
|
1111
|
+
}
|
|
1112
|
+
```
|
|
1113
|
+
|
|
1114
|
+
## Extending vs Overriding
|
|
1115
|
+
|
|
1116
|
+
| Action | Use When |
|
|
1117
|
+
|--------|----------|
|
|
1118
|
+
| **Extend** | Adding new values alongside defaults |
|
|
1119
|
+
| **Override** | Replacing default scale entirely |
|
|
1120
|
+
| **Semantic tokens** | Project-specific naming |
|
|
1121
|
+
|
|
1122
|
+
## OKLCH Color Format
|
|
1123
|
+
|
|
1124
|
+
```
|
|
1125
|
+
oklch(lightness chroma hue)
|
|
1126
|
+
0-1 0-0.4 0-360
|
|
1127
|
+
```
|
|
1128
|
+
|
|
1129
|
+
- **Lightness:** 0 = black, 1 = white
|
|
1130
|
+
- **Chroma:** 0 = gray, higher = more colorful
|
|
1131
|
+
- **Hue:** 0 = red, 120 = green, 240 = blue
|
|
1132
|
+
|
|
1133
|
+
---
|
|
1134
|
+
|
|
1135
|
+
⚡ PikaKit v3.9.134
|