정보
이 스킬은 기존 Next.js 또는 Node.js 프로젝트에 Tailwind CSS와 TypeScript를 설정합니다. 설치, PostCSS 설정, TypeScript 엄격 모드 구성, 경로 별칭, IDE 통합을 처리합니다. 프로젝트에 Tailwind/TypeScript를 추가하거나 프레임워크 업그레이드 후 재구성할 때 사용하세요.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/setup-tailwind-typescriptClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
name: setup-tailwind-typescript description: > Tailwind CSS und TypeScript in einem bestehenden Next.js- oder Node.js-Projekt konfigurieren. Behandelt Installation, PostCSS-Setup, TypeScript-Strenge-Einstellungen, Pfad-Aliase und IDE-Integration. Verwenden, wenn Tailwind/TypeScript zu einem vorhandenen Projekt hinzugefügt werden soll oder wenn die Konfiguration nach einem Framework-Upgrade neu eingerichtet werden muss. license: MIT locale: de source_locale: en source_commit: 6f65f316 translator: claude-opus-4-6 translation_date: 2026-03-16 allowed-tools: Read Write Edit Bash Grep Glob metadata: author: Philipp Thoss version: "1.0" domain: web-dev complexity: basic language: TypeScript tags: tailwind, typescript, nextjs, postcss, configuration
Tailwind CSS + TypeScript einrichten
Tailwind CSS und TypeScript in einem bestehenden Webprojekt konfigurieren, mit korrektem PostCSS-Setup und IDE-Integration.
Wann verwenden
- Tailwind CSS zu einem vorhandenen Next.js- oder React-Projekt hinzufügen
- TypeScript-Konfiguration in einem bestehenden JavaScript-Projekt einrichten
- Beides nach einem Framework-Upgrade neu konfigurieren
- Pfad-Aliase und IDE-Unterstützung für ein Projekt einrichten
Eingaben
- Erforderlich: Vorhandenes Node.js-Projekt mit
package.json - Optional: Framework (Next.js, Vite, Create React App — beeinflusst Konfigurationsdetails)
- Optional: TypeScript-Strenge-Level (strict, empfohlen, minimal)
- Optional: Ob Pfad-Aliase eingerichtet werden sollen (Standard: ja)
Vorgehensweise
Schritt 1: Tailwind CSS installieren
Tailwind und seine Peer-Dependencies installieren.
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
Dies erstellt:
tailwind.config.js(oder.tsfür TypeScript-Projekte)postcss.config.js
Für TypeScript-Projekte den Konfigurationstyp aktualisieren:
# tailwind.config.js in tailwind.config.ts umbenennen
mv tailwind.config.js tailwind.config.ts
Erwartet: tailwind.config.ts und postcss.config.js in Projektroot erstellt.
Bei Fehler: Wenn npx tailwindcss fehlschlägt, mit npm install -D tailwindcss@latest die neueste Version sicherstellen.
Schritt 2: Tailwind konfigurieren
tailwind.config.ts bearbeiten, um alle Template-Dateien einzuschließen.
// tailwind.config.ts
import type { Config } from 'tailwindcss'
const config: Config = {
content: [
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
// Eigene Design-Tokens hier hinzufügen
colors: {
brand: {
50: '#f0f9ff',
500: '#0ea5e9',
900: '#0c4a6e',
},
},
},
},
plugins: [],
}
export default config
Erwartet: content-Array enthält alle Quell-Dateipfade. TypeScript erkennt Konfigurationstypen ohne Fehler.
Bei Fehler: Wenn Klassen nicht angewendet werden, überprüfen, dass content-Pfade mit der tatsächlichen Dateistruktur übereinstimmen. npx tailwindcss --content './src/**/*.tsx' --output /dev/null zum Testen verwenden.
Schritt 3: Tailwind-Direktiven zu CSS hinzufügen
Die Tailwind-Schicht-Direktiven in die globale CSS-Datei einfügen.
/* src/app/globals.css oder src/styles/globals.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
/* Eigene Basis-Styles darunter */
@layer base {
h1 {
@apply text-2xl font-bold;
}
}
@layer components {
.btn-primary {
@apply px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600;
}
}
Erwartet: CSS-Datei hat alle drei @tailwind-Direktiven. Benutzerdefinierte Layer-Definitionen kompilieren ohne Fehler.
Bei Fehler: Wenn @tailwind-Direktiven nicht erkannt werden, sicherstellen, dass PostCSS korrekt konfiguriert ist und tailwindcss im plugins-Array in postcss.config.js steht.
Schritt 4: TypeScript konfigurieren
tsconfig.json mit geeigneten Strenge-Einstellungen und Pfad-Aliasen einrichten.
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"],
"@/components/*": ["./src/components/*"],
"@/lib/*": ["./src/lib/*"],
"@/types/*": ["./src/types/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
Erwartet: tsconfig.json wird von TypeScript ohne Fehler geladen. Pfad-Aliase lösen korrekt auf.
Bei Fehler: Wenn moduleResolution: "bundler" Fehler verursacht (benötigt TypeScript 5.0+), auf "node16" oder "node" zurückfallen.
Schritt 5: VS Code-Integration einrichten
.vscode/settings.json für Tailwind CSS IntelliSense und TypeScript-Unterstützung konfigurieren.
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
],
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
Empfohlene VS Code-Erweiterungen (.vscode/extensions.json):
{
"recommendations": [
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-next"
]
}
Erwartet: Tailwind IntelliSense zeigt Klassen-Vervollständigung in TypeScript-Dateien. TypeScript-Fehler erscheinen inline.
Bei Fehler: Wenn IntelliSense fehlt, sicherstellen, dass die Tailwind CSS IntelliSense-Erweiterung installiert ist und tailwindCSS.experimental.classRegex korrekt konfiguriert ist.
Schritt 6: Konfiguration verifizieren
Prüfen, ob Tailwind und TypeScript korrekt zusammenarbeiten.
# TypeScript-Kompilierung ohne Ausgabe prüfen
npx tsc --noEmit
# CSS auf Tailwind-Klassen testen
echo '<div class="bg-blue-500 text-white p-4">Test</div>' > /tmp/test.html
npx tailwindcss -i ./src/app/globals.css -o /tmp/output.css --content '/tmp/test.html'
grep "bg-blue-500" /tmp/output.css
Erwartet: tsc --noEmit meldet 0 Fehler. Tailwind-Output-CSS enthält bg-blue-500-Klasse.
Bei Fehler: TypeScript-Fehler identifizieren, indem tsc --noEmit 2>&1 | head -20 ausgeführt wird. Wenn Tailwind-Klassen fehlen, Pfade im content-Array von tailwind.config.ts überprüfen.
Validierung
-
tailwind.config.tsmit korrektencontent-Pfaden vorhanden -
postcss.config.jsmit Tailwind CSS-Plugin vorhanden - Globale CSS-Datei hat alle drei
@tailwind-Direktiven -
tsconfig.jsonmitstrict: trueund Pfad-Aliasen konfiguriert -
tsc --noEmitmeldet keine Fehler - Tailwind-Klassen erscheinen in kompiliertem CSS
- VS Code IntelliSense funktioniert für Tailwind-Klassen
Haeufige Stolperfallen
- Fehlende
content-Pfade: Wenn Tailwind-Klassen nicht in der Ausgabe erscheinen, liegt es fast immer daran, dass die Dateipfade nicht mit demcontent-Array übereinstimmen. Alle Dateiextensionen und Verzeichnisse explizit auflisten. - PostCSS-Reihenfolge: In
postcss.config.jsmusstailwindcssvorautoprefixererscheinen. - TypeScript
pathsohne baseUrl: Bei Verwendung vonpathsentwederbaseUrlsetzen oder sicherstellen, dass das Bundler-Modul-Auflösung unterstützt. @tailwind-Direktiven vs Imports:@import 'tailwindcss/...'funktioniert auch, aber@tailwind base/components/utilitiesist idiomatischer in Tailwind v3.- Klassen-Übersteuerung in
@layer: Benutzerdefinierte Klassen im@layer componentskönnen von Utilities mit demselben Namen nicht überschrieben werden — Utility-Klassen haben immer höhere Spezifität. - TypeScript
strictnach der Einführung: Das nachträgliche Aktivieren vonstrict: trueerzeugt oft Hunderte von Fehlern. Schrittweise mitexactOptionalPropertyTypes,noUncheckedIndexedAccessusw. aktivieren.
Verwandte Skills
scaffold-nextjs-app— neues Next.js-Projekt mit Tailwind + TypeScript erstellendeploy-to-vercel— Tailwind + TypeScript-App auf Vercel deployen
GitHub 저장소
Frequently asked questions
What is the setup-tailwind-typescript skill?
setup-tailwind-typescript is a Claude Skill by pjt222. Skills package instructions and resources that Claude loads on demand, so Claude can perform setup-tailwind-typescript-related tasks without extra prompting.
How do I install setup-tailwind-typescript?
Use the install commands on this page: add setup-tailwind-typescript to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.
What category does setup-tailwind-typescript belong to?
setup-tailwind-typescript is in the Other category, tagged ai.
Is setup-tailwind-typescript free to use?
Yes. setup-tailwind-typescript is listed on AIMCP and free to install. It runs inside Claude, so no separate service account is required to use the skill itself.
연관 스킬
LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.
이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.
이 Claude Skill은 스프레드, 오버/언더, 프로프 베트를 포함한 스포츠 베팅 시장을 분석합니다. 역사적 추이와 상황별 통계를 검토하여 가치 베트를 발견하고, 교육적 목적으로 실행 가능한 권장 사항이 담긴 구조화된 마크다운 결과를 제공합니다. 개발자는 이 기능을 스포츠 베팅 분석 도구에 활용할 수 있으며, 단순히 엔터테인먼트/교육 목적으로만 설계되었음을 유의해야 합니다.
이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.
