Project Scaffold技能使用说明
2026-04-01
新闻来源:网淘吧
围观:7
电脑广告
手机广告
项目脚手架
使用最佳实践的项目结构、工具和配置来搭建新项目。
使用方法
当Colt(或你)需要启动一个新项目时,使用此技能来生成完整的项目模板。

决策树
询问或推断项目类型:
Web应用(React / Next.js)
my-app/
├── src/
│ ├── app/ # Next.js app router
│ ├── components/ # Reusable UI components
│ ├── lib/ # Utilities, helpers, API clients
│ ├── styles/ # Global styles, Tailwind config
│ └── types/ # TypeScript type definitions
├── public/ # Static assets
├── tests/ # Test files
├── .gitignore
├── .eslintrc.json
├── tailwind.config.ts
├── tsconfig.json
├── package.json
└── README.md
初始化命令:
npx create-next-app@latest my-app --typescript --tailwind --eslint --app --src-dir
cd my-app && npm install
API / 后端(FastAPI)
my-api/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI app entry
│ ├── routers/ # Route modules
│ ├── models/ # Pydantic models / DB models
│ ├── services/ # Business logic
│ └── config.py # Settings / env vars
├── tests/
├── .gitignore
├── pyproject.toml
├── requirements.txt
└── README.md
初始化命令:
mkdir my-api && cd my-api
uv init && uv pip install fastapi uvicorn
移动应用(SwiftUI)
MyApp/
├── MyApp/
│ ├── App.swift
│ ├── ContentView.swift
│ ├── Models/
│ ├── Views/
│ ├── ViewModels/
│ └── Services/
├── MyAppTests/
├── MyAppUITests/
└── README.md
初始化:使用Xcode或swift package init --type executable
CLI工具(Node / Python)
my-cli/
├── src/
│ └── index.ts # Entry point
├── bin/
│ └── my-cli # Executable wrapper
├── tests/
├── .gitignore
├── tsconfig.json
├── package.json
└── README.md
浏览器扩展
my-extension/
├── src/
│ ├── background.ts
│ ├── content.ts
│ ├── popup/
│ │ ├── popup.html
│ │ ├── popup.ts
│ │ └── popup.css
│ └── options/
├── icons/
├── manifest.json
├── .gitignore
├── tsconfig.json
├── package.json
└── README.md
脚手架搭建后检查清单
生成项目结构后:
git init && git add -A && git commit -m "Initial scaffold"- 创建
.gitignore适合项目类型的 - 设置代码检查配置(ESLint / Ruff)
- 添加基础README文件,包含项目名称和设置说明
- 添加基础测试文件以验证测试运行器正常工作
资源模板
.gitignore(通用基础版)
node_modules/
__pycache__/
.env
.env.local
dist/
build/
.next/
*.pyc
.DS_Store
*.log
coverage/
文章底部电脑广告
手机广告位-内容正文底部
上一篇:roku技能使用说明
下一篇:Build Discipline技能使用说明


微信扫一扫,打赏作者吧~