AgentSkillsCN

project-init

为新项目提供初始化指导。优先使用框架或包管理器命令,而非手动搭建脚手架。

SKILL.md
--- frontmatter
name: project-init
description: Guidance for initializing new projects. Use framework/package manager commands instead of manual scaffolding.

Project Initialization Best Practices

When creating new projects, always prefer official CLI tools and scaffolding commands over manually creating files and directories. These tools:

  • Set up correct project structure and config
  • Install dependencies with compatible versions
  • Configure build tools, linting, testing
  • Follow framework best practices

JavaScript/TypeScript

FrameworkCommand
Vitebun create vite or npm create vite@latest
Next.jsbunx create-next-app or npx create-next-app@latest
Remixbunx create-remix or npx create-remix@latest
Astrobun create astro or npm create astro@latest
SvelteKitbun create svelte or npm create svelte@latest
Nuxtbunx nuxi init or npx nuxi@latest init
React Nativenpx @react-native-community/cli init
Expobunx create-expo-app or npx create-expo-app
Electronnpm init electron-app@latest
Tauribun create tauri-app or npm create tauri-app@latest

Python

ToolCommand
uv (recommended)uv init or uv init --lib for libraries
Poetrypoetry new <name> or poetry init
PDMpdm init
Hatchhatch new <name>
Djangodjango-admin startproject <name>
FlaskUse cookiecutter or manual (minimal structure)
FastAPIUse cookiecutter or fastapi-cli

Other Languages

Language/FrameworkCommand
Rustcargo new <name> or cargo init
Gogo mod init <module>
Ruby on Railsrails new <name>
.NETdotnet new <template>
Java (Spring)Use start.spring.io or Spring CLI
Kotlingradle init or IntelliJ

Monorepo Tools

ToolCommand
Turborepobunx create-turbo or npx create-turbo@latest
Nxbunx create-nx-workspace or npx create-nx-workspace
Lernanpx lerna init

Key Principles

  1. Don't manually create config files - Let the CLI generate them
  2. Use interactive prompts - Most CLIs ask about TypeScript, linting, testing
  3. Check framework docs - Commands change; verify current syntax
  4. Prefer bun/bunx when available - Faster than npm/npx
  5. Use templates - Many CLIs offer starter templates (e.g., --template react-ts)

When Manual Setup is OK

  • Adding to existing monorepo with specific conventions
  • Learning how tools work under the hood
  • Very minimal projects (single script)
  • Custom build requirements not covered by templates