Scaffolds new projects with README.md, AGENTS.md, and CI/CD (GitLab CI, GitHub Actions). Handles project type (generic / Flask backend / React frontend / Taro miniapp), tech stack, coding standards, quality level, and SDD (OpenSpec, SpecKit, GSD). All init flows (Flask, React, Taro) and conventions (backend-python-cicd, frontend-codegen, flask-backend-codegen, QA/testing, agent-roles/subagents) are built-in; no separate skills. Docs default to Chinese. Use when creating a project, initializing a repo, or setting up CI/CD/SDD.
A skill for scaffolding new projects with consistent README.md, AGENTS.md, and CI/CD pipelines — all wired together with an SDD (Spec-Driven Development) framework.
Overview
The skill does five things:
Interview — Understand the project's goals, tech stack, coding standards, quality requirements, CI platform(s), and preferred SDD workflow.
Generate — Create README.md, AGENTS.md, and CI pipeline file(s) from templates.
Integrate — Install SDD framework tools and initialize project structure; wire coding standards and quality checks into the CI pipeline.
Tag — Embed a machine-readable project identity tag in AGENTS.md so server-side CI can verify the project was properly initialized.
Verify consistency — Make sure all generated files agree with each other (same tech stack, same quality gates, same SDD expectations).
CRITICAL — Template Fidelity: Reproduce every CI pipeline template verbatim. Substitute only the
{{PLACEHOLDER}}
tokens. Do not remove, merge, rename, or omit any stages, jobs, or comment blocks. The complete job set in each template is the minimum viable pipeline; dropping any job will break SDD checks, project-tag validation, or coverage gates. For demo projects, dial down strictness through placeholder values (e.g., set
{{COVERAGE_THRESHOLD}}
to
0
,
{{SECURITY_SCAN_CMD}}
to
echo "skipped"
) — never by removing jobs.
After gathering information, generate files. Use the templates in
assets/templates/
as starting points and fill in the placeholders.
Path resolution — read this before running any script:
<skill_dir>
= the directory that contains this SKILL.md file (e.g.
.agents/skills/project-initializer
). All script paths below are relative to
<skill_dir>
.
<project_root>
= the root of the project being initialized — pass
.
if you are already inside it, or the absolute path if not. Never pass a path outside the project the user is working on.
File locations:
README.md
— project root
AGENTS.md
— project root
.gitlab-ci.yml
— project root (if GitLab CI selected)
.github/workflows/ci.yml
— project root (if GitHub Actions selected)
Placeholder convention used in templates:
{{VARIABLE_NAME}}
After creating all files, do a consistency pass:
The tech stack in README.md must match AGENTS.md and the CI environment images
Quality gates in CI files must reflect what's specified in AGENTS.md
The SDD check script path must match the framework chosen
Both CI files (if both selected) must use the same quality thresholds, check scripts, and branch names
README.md
Read
assets/templates/README.template.md
. Fill in:
{{PROJECT_NAME}}
— project name
{{PROJECT_DESCRIPTION}}
— one-paragraph description
{{TECH_STACK_LIST}}
— bulleted list of stack components
{{SDD_FRAMEWORK}}
— name of chosen SDD framework
{{SDD_DOCS_PATH}}
— where SDD documents live (see framework reference)
{{GETTING_STARTED_STEPS}}
— installation and run steps appropriate for the tech stack
Language: Generate this file in the language chosen in Phase 1 (default: Chinese/中文).
AGENTS.md
Read
assets/templates/AGENTS.template.md
. Fill in:
{{PROJECT_NAME}}
— project name
{{PROJECT_DESCRIPTION}}
— concise single-sentence summary
{{TECH_STACK_DETAILS}}
— structured tech stack list with versions if known
{{SDD_FRAMEWORK}}
— framework display name (e.g., "OpenSpec")
{{SDD_FRAMEWORK_ID}}
— framework lowercase id:
openspec
,
speckit
, or
gsd
{{SDD_WORKFLOW_SUMMARY}}
— 3-5 bullet points describing the team's SDD workflow from the reference doc
{{QUALITY_LEVEL}}
— "demo" or "production" (display)
{{QUALITY_LEVEL_ID}}
— "demo" or "production" (machine-readable, same as display)
{{CI_PLATFORMS_ID}}
—
gitlab
,
github
, or
gitlab,github
(no spaces)
{{COVERAGE_THRESHOLD}}
— number (e.g., "80") or "N/A" for demo
{{LINT_TOOL}}
— linter/formatter names (from coding standards or tech stack defaults)
{{SECURITY_TOOLS}}
— security scan tools or "N/A"
{{IGNORE_TAG_DOCS}}
— the git commit ignore tag reference for the chosen framework (see reference docs)
{{CODING_STANDARDS_SUMMARY}}
— see Coding Standards Composition section above
{{INITIALIZED_DATE}}
— today's date in
YYYY-MM-DD
format
{{MAIN_BRANCH}}
— release branch name
Language: Generate this file in the language chosen in Phase 1 (default: Chinese/中文).
Important: AGENTS.md is a living document. Keep it minimal at creation time. Agents should append to it during development but never remove existing entries. The initial version is just the skeleton — it will grow.
Coding Standards Composition
If the user provided coding standards:
Read the content (from the pasted text or the file path).
Extract the key rules relevant to: naming conventions, file structure, formatting, forbidden patterns, and required patterns.
Summarize them into the
## Coding Standards
section of AGENTS.md (concise bullet-point form — the full doc lives separately).
If the standards specify a linter/formatter config, reference it in the
{{LINT_CMD}}
for CI (e.g.,
eslint --config .eslintrc.json
,
ruff check --config pyproject.toml
).
If the user provided a file path, also add a reference to that file in AGENTS.md so agents know where the canonical source is.
If no standards were provided, write a minimal placeholder in the Coding Standards section appropriate for the tech stack (e.g., "Follow PEP 8" for Python, "Follow Airbnb JavaScript Style Guide" for JS).
MANDATORY — do not skip or substitute manually.
You MUST run the script below. Do NOT create SDD framework directories or documents by hand. Manually created files will be incomplete, wrongly structured, and will fail CI checks. If the script encounters an error, report it to the user — do not work around it by creating files yourself.
Do not modify this block after creation except through a deliberate re-initialization
The CI check script (
assets/scripts/check_project_tag.sh
) reads this tag and exits non-zero if it is missing or malformed. It is installed automatically by the
install_scripts.py
step described in Phase 2 —
check_project_tag
is always included regardless of the chosen SDD framework. The framework's initialize script (Phase 3) must complete successfully before this tag is validated.
Phase 6: Consistency Verification
After generating all files, perform this checklist:
AGENTS.md
starts with a valid
<!-- @project-initializer
tag
sdd_framework
in tag matches chosen framework
ci_platforms
in tag matches files actually generated
Docker/runner image in CI file(s) matches tech stack
AGENTS.md
tech stack section matches
README.md
Coverage threshold in CI file(s) matches
AGENTS.md
→ Quality Standards
SDD framework name consistent across all generated files
The correct SDD check script is referenced (OpenSpec/SpecKit/GSD)
Both CI platform files (if both generated) use identical quality thresholds
Branch name in CI rules matches the stated main branch
Each check is available in three runtime variants, stored in the skill's
assets/scripts/
directory. The install_scripts.py command copies these into the target project's
scripts/
directory — which variant gets invoked in CI depends on the runner OS and what's available.
Script
Shell (Linux/macOS)
PowerShell (Windows/cross-platform)
Node.js (any platform)
Project tag
check_project_tag.sh
check_project_tag.ps1
check_project_tag.js
OpenSpec
check_sdd_openspec.sh
check_sdd_openspec.ps1
check_sdd_openspec.js
SpecKit
check_sdd_speckit.sh
check_sdd_speckit.ps1
check_sdd_speckit.js
GSD
check_sdd_gsd.sh
check_sdd_gsd.ps1
check_sdd_gsd.js
Selecting which variant to use in CI
When generating CI pipeline files, choose the invocation command based on the project's runner environment:
Runner environment
CI invocation
Linux / macOS (bash available)
bash scripts/check_sdd_<fw>.sh
Windows (PowerShell 7+ available)
pwsh scripts/check_sdd_<fw>.ps1
Any (Node.js ≥ 18 available)
node scripts/check_sdd_<fw>.js
Unknown / mixed
Use Node.js — it works everywhere Node.js is installed
The Node.js variants are the most portable choice if the runner environment is uncertain. They require no npm dependencies — only the Node.js built-in modules (
fs
,
path
,
child_process
).
The GitLab CI and GitHub Actions templates default to the shell variant. If the user's CI runners are Windows-based or they prefer Node.js, update the
script:
/
run:
lines accordingly. All three variants implement identical logic and exit codes.