AgentSkillsCN

project-scaffolding

为全新代码库提供项目脚手架与样板生成服务。

SKILL.md
--- frontmatter
name: project-scaffolding
description: Project scaffolding and boilerplate generation for new codebases

Project Scaffolding Skill

Overview

Standardized project initialization workflow with templates, boilerplate generation, and structure patterns. Ensures new projects start with consistent, well-organized foundations.

Type

workflow

When to Invoke

Trigger keywords: scaffold, new project, boilerplate, template, initialize, project structure, bootstrap, starter, setup

Trigger phrases:

  • "create a new project"
  • "set up a new app"
  • "initialize the project"
  • "bootstrap a new..."
  • "scaffold a..."

Project Type Selection

TypeUse WhenKey Files
Web AppFrontend/fullstack, browser-basedpackage.json, index.html, src/, public/
API/BackendREST/GraphQL servicesapp.py or main.ts, routes/, models/
CLI ToolCommand-line applicationscli.py or index.ts, commands/
LibraryReusable package/modulelib/, src/, package.json or pyproject.toml
MicroserviceDistributed serviceDockerfile, kubernetes/, src/
MonorepoMultiple packagespackages/, apps/, turbo.json or nx.json

Essential Files Checklist

Every project MUST have:

Root Files

  • .gitignore - Appropriate for language/framework
  • README.md - Project overview, setup, usage
  • LICENSE - If open source

Configuration

  • Language config (pyproject.toml, package.json, cargo.toml)
  • Editor config (.editorconfig or IDE settings)
  • Linter/formatter config (eslint, prettier, ruff, black)

Development

  • ./tmp/ - For temporary/test files
  • ./docs/ - Documentation folder (invoke documentation-standards skill)
  • Test directory (tests/, __tests__/, spec/)

Optional but Recommended

  • Dockerfile - Container definition
  • docker-compose.yml - Local development
  • .env.example - Environment variable template
  • Makefile or justfile - Common commands

Directory Structures

Python Project

code
project/
├── src/
│   └── project/
│       ├── __init__.py
│       ├── main.py
│       └── modules/
├── tests/
│   ├── __init__.py
│   ├── test_main.py
│   └── fixtures/
├── docs/
├── tmp/
├── pyproject.toml
├── README.md
└── .gitignore

TypeScript/Node Project

code
project/
├── src/
│   ├── index.ts
│   ├── types/
│   └── modules/
├── tests/
│   └── *.test.ts
├── docs/
├── tmp/
├── package.json
├── tsconfig.json
├── README.md
└── .gitignore

API Project

code
project/
├── src/
│   ├── app.ts (or main.py)
│   ├── routes/
│   ├── controllers/
│   ├── models/
│   ├── services/
│   ├── middleware/
│   └── utils/
├── tests/
├── docs/
│   ├── API_REFERENCE.md
│   └── SCHEMAS.md
├── tmp/
├── Dockerfile
├── docker-compose.yml
└── README.md

Technology Selection Framework

When choosing tech stack, consider:

Language Selection

FactorPythonTypeScriptGoRust
Rapid prototypingExcellentGoodModerateSlow
PerformanceModerateModerateExcellentExcellent
Type safetyOptionalExcellentGoodExcellent
EcosystemMassiveMassiveGrowingGrowing
Learning curveLowLowModerateHigh

Framework Selection

Use CasePythonTypeScriptGo
REST APIFastAPI, FlaskExpress, FastifyGin, Echo
Web AppDjango, FastAPINext.js, Nuxt-
CLIClick, TyperCommander, YargsCobra
DataPandas, Polars--

Database Selection

TypeOptionsUse When
RelationalPostgreSQL, SQLiteStructured data, transactions
DocumentMongoDBFlexible schemas, rapid iteration
Key-ValueRedisCaching, sessions
GraphNeo4jRelationship-heavy data

Initialization Workflow

Step 1: Define Project Type

  • What problem does this solve?
  • Who is the user?
  • What's the deployment target?

Step 2: Select Technology

  • Language based on requirements
  • Framework based on use case
  • Database based on data model

Step 3: Create Structure

  • Use appropriate directory template
  • Create all essential files
  • Initialize version control

Step 4: Configure Development

  • Set up linting/formatting
  • Configure testing framework
  • Create development environment

Step 5: Document

  • Write README with setup instructions
  • Invoke documentation-standards skill
  • Create initial architecture docs

Anti-Patterns to Avoid

Anti-PatternWhy BadDo Instead
No .gitignoreCommits secrets, artifactsAlways create appropriate .gitignore
Flat structureDoesn't scaleUse module/feature folders
No tests folderTesting becomes afterthoughtCreate tests/ from start
Hardcoded configEnvironment-specificUse .env files
No docs folderDocumentation neglectedCreate docs/ immediately

Integration

Works with:

  • documentation-standards - For project documentation
  • tdd-workflow - For test setup
  • architecture-patterns - For design decisions
  • /newapp command - Invokes this skill automatically

Ensures consistent, well-structured project initialization