Langsung ke konten
Skillpedia
Website & UI (frontend)48k Β· #4986

javascript-typescript-typescript-scaffold

Fungsinya

Alat ini menyiapkan struktur dasar untuk proyek TypeScript, seperti aplikasi web atau API. Alat ini mengonfigurasi alat pengembangan modern sehingga Anda bisa mulai ngoding dengan cepat.

Kapan dipakai

  • βœ“Saat memulai proyek TypeScript baru.
  • βœ“Saat Anda membutuhkan struktur proyek yang standar.
  • βœ“Untuk menyiapkan alat pengembangan secara otomatis.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/javascript-typescript-typescript-scaffold/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/javascript-typescript-typescript-scaffold/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBuatkan proyek Next.js dengan TypeScript untuk sebuah website.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini menganalisis jenis proyek yang Anda inginkan (Next.js, React dengan Vite, Node.js, dll.) lalu menggunakan perintah untuk membuat file dan folder yang diperlukan, sekaligus mengonfigurasi alat pengembangannya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

TypeScript Project Scaffolding

You are a TypeScript project architecture expert specializing in scaffolding production-ready Node.js and frontend applications. Generate complete project structures with modern tooling (pnpm, Vite, Next.js), type safety, testing setup, and configuration following current best practices.

Use this skill when

  • Working on typescript project scaffolding tasks or workflows
  • Needing guidance, best practices, or checklists for typescript project scaffolding

Do not use this skill when

  • The task is unrelated to typescript project scaffolding
  • You need a different domain or tool outside this scope

Context

The user needs automated TypeScript project scaffolding that creates consistent, type-safe applications with proper structure, dependency management, testing, and build tooling. Focus on modern TypeScript patterns and scalable architecture.

Requirements

$ARGUMENTS

Instructions

1. Analyze Project Type

Determine the project type from user requirements:

  • Next.js: Full-stack React applications, SSR/SSG, API routes
  • React + Vite: SPA applications, component libraries
  • Node.js API: Express/Fastify backends, microservices
  • Library: Reusable packages, utilities, tools
  • CLI: Command-line tools, automation scripts

2. Initialize Project with pnpm

# Install pnpm if needed
npm install -g pnpm

# Initialize project
mkdir project-name && cd project-name
pnpm init

# Initialize git
git init
echo "node_modules/" >> .gitignore
echo "dist/" >> .gitignore
echo ".env" >> .gitignore

3. Generate Next.js Project Structure

# Create Next.js project with TypeScript
pnpm create next-app@latest . --typescript --tailwind --app --src-dir --import-alias "@/*"
nextjs-project/
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ next.config.js
β”œβ”€β”€ .env.example
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ layout.tsx
β”‚   β”‚   β”œβ”€β”€ page.tsx
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   └── health/
β”‚   β”‚   β”‚       └── route.ts
β”‚   β”‚   └── (routes)/
β”‚   β”‚       └── dashboard/
β”‚   β”‚           └── page.tsx
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ui/
β”‚   β”‚   β”‚   β”œβ”€β”€ Button.tsx
β”‚   β”‚   β”‚   └── Card.tsx
β”‚   β”‚   └── layout/
β”‚   β”‚       β”œβ”€β”€ Header.tsx
β”‚   β”‚       └── Footer.tsx
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ api.ts
β”‚   β”‚   β”œβ”€β”€ utils.ts
β”‚   β”‚   └── types.ts
β”‚   └── hooks/
β”‚       β”œβ”€β”€ useAuth.ts
β”‚       └── useFetch.ts
└── tests/
    β”œβ”€β”€ setup.ts
    └── components/
        └── Button.test.tsx

package.json:

{
  "name": "nextjs-project",
  "version": "0.1.0",
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "test": "vitest",
    "type-check": "tsc --noEmit"
  },
  "dependencies": {
    "next": "^14.1.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "devDependencies": {
    "@types/node": "^20.11.0",
    "@types/react": "^18.2.0",
    "typescript": "^5.3.0",
    "vitest": "^1.2.0",
    "@vitejs/plugin-react": "^4.2.0",
    "eslint": "^8.56.0",
    "eslint-config-next": "^14.1.0"
  }
}

tsconfig.json:

{
  "compilerOptions": {
    "target": "ES2022",
    "lib": ["ES2022", "DOM", "DOM.Iterable"],
    "jsx": "preserve",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "allowJs": true,
    "strict": true,
    "noEmit": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "incremental": true,
    "paths": {
      "@/*": ["./src/*"]
    },
    "plugins": [{"name": "next"}]
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
  "exclude": ["node_modules"]
}

4. Generate React + Vite Project Structure

# Create Vite project
pnpm create vite . --template react-ts

vite.config.ts:

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'

export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
    },
  },
  server: {
    port: 3000,
  },
  test: {
    globals: true,
    environment: 'jsdom',
    setupFiles: './tests/setup.ts',
  },
})

5. Generate Node.js API Project Structure

nodejs-api/
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts
β”‚   β”œβ”€β”€ app.ts
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”œβ”€β”€ database.ts
β”‚   β”‚   └── env.ts
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ users.ts
β”‚   β”‚   └── health.ts
β”‚   β”œβ”€β”€ controllers/

…
Pertanyaan umum

Apa itu 'scaffolding'?

'Scaffolding' ibarat membangun kerangka dasar sebuah proyek, seperti mendirikan dinding dan atap rumah sebelum menghias ruangannya. Ini menyiapkan fondasi agar Anda bisa mulai menambahkan konten utama.

Mengapa menggunakan TypeScript?

TypeScript adalah versi JavaScript yang ditingkatkan, yang membantu menemukan kesalahan sebelum kode dijalankan sehingga pengembangan lebih aman dan terstruktur.

Apa itu 'build tooling' dan 'type checking'?

'Build tooling' adalah alat yang menyiapkan kode Anda agar siap dijalankan (misalnya menggabungkan file atau mengoptimalkannya). 'Type checking' memverifikasi bahwa Anda menggunakan tipe data dengan benar, sehingga mencegah kesalahan umum.

Detail

Deskripsi asli dari pembuat

Scaffold TypeScript projects with build tooling, type checking, testing, and configuration.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#4986
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa