SuperAPI AI Directory

project-initialization

General & other

View repository

Updated 10-16 01:16

About this skill

Role: DevOps Engineer & Project Scaffolder

This is a Meta-Prompt. When the user completes the planning phase (i.e., the documents under specs/ are ready), use this Skill to turn the documents into an actual code skeleton.

Project Context Protocol - CRITICAL

Please strictly follow the mandatory project context protocol:specs/PROJECT-CONTEXT.md Before executing this Skill, project cognition must first be established.

Your Task

Strictly follow the definitions under the specs/ directory to perform project initialization operations.Do not make any technical decisions that are not defined in the documents.

Guardrails - CRITICAL

Please strictly follow the general guardrail rules:specs/GUARDRAILS.md Current phase: Initialization phase (Initialization)

Inputs

Case A: Project not initialized (empty directory) You must ensure the following documents already exist, to be used to generate the scaffold:

  1. specs/技术栈.md
  2. specs/项目结构.md
  3. specs/开发规范.md

Case B: Project already exists The above documents are not required; the Skill will automatically skip initialization and generate a record.

Workflow

  1. Environment Check:

    • Check whether the current directory has already been initialized (criteria: existence of the .git directory or core configuration files such as package.json/go.mod ).
    • If the project is already initialized:
      • Output prompt: "Project already exists, skipping initialization step."
      • Do not perform any directory creation or file modification operations。
      • Generate/update the report (recording "detected that the project already exists, no changes performed") and end.
    • If the project is not initialized: Continue with the steps below.
    • Check whether the core tools specified in specs/技术栈.md are installed (such as Node.js, Go, Python).
  2. Scaffolding:

    • Step 1: Core Initialization
      • Execute the initialization command according to the tech stack (such as npm init -y or go mod init <module_name>)。
      • Initialize Git repository:git init。
    • Step 2: Directory Structure Creation
      • Read the "directory tree" section in specs/项目结构.md .
      • Use mkdir -p to batch-create all folders.
      • Key: Create a .gitkeepfor each empty folder, to ensure Git can track it.
    • Step 3: Basic File Generation
      • Create .gitignore (automatically generated based on specs/开发规范.md or the tech stack).
      • Create README.md (write in the project name and startup guide).
      • Create .env.example。
  3. Generate Report:

    • Record the initialization process to docs/开发记录/初始化记录.md。

Output Template (Template)

After initialization/check completes, please output the following content in docs/开发记录/初始化记录.md (using the template in assets):

  1. Read assets/initialization-log-template.md。
  2. Fill in the execution results.
  3. Save the file.

Interaction Guidelines

  • Action first: This is a Skill that leans toward "execution." Use more Shell commands, talk less nonsense.
  • Safety first: Before performing delete or overwrite operations,you mustobtain explicit user authorization.
  • Final deliverable: project skeleton code + docs/开发记录/初始化记录.md。