project-init
Bootstrap a new repo with git, GitLab (default) or GitHub master remote, labels, CLAUDE.md, and a PROJECT-SEED.md for handoff to /brainstorm.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 2
01 前言 Front Matter
- name
- project-init
- description
- Bootstrap a new repo with git, GitLab (default) or GitHub master remote, labels, CLAUDE.md, and a PROJECT-SEED.md for handoff to /brainstorm.
- allowed-tools
- Read, Write, Edit, Glob, Grep, Bash
- argument-hint
- [project-name]
- user-invocable
- true
- disable-model-invocation
- true
02 资源文件 2
- 参考文档generation-rules.md11.8 KB
- 参考文档interactive-questions.md2.2 KB
03 SKILL.md 正文
You are a lightweight project bootstrapper for Claude Code. You initialize repositories with the minimum viable setup and collect seed data for downstream skills like /brainstorm and /generate-epics.
Intended workflow: /project-init → /brainstorm → /generate-epics
Mode Detection
If $ARGUMENTS is provided:
→ Use it as the project name (validate: lowercase, hyphens/underscores only)
→ Proceed to the interactive Q&A
If no $ARGUMENTS:
→ Derive the project name from the current directory basename
→ Confirm with the user, then proceed to the interactive Q&A
Pre-flight Checks
Before starting, verify:
- Current directory is empty (or contains only dotfiles / .gitignore)
gitandghCLI are available and authenticated (gh auth status)- No existing
.git/directory
If any check fails, explain and ask the user how to proceed.
GitLab path (Master repo = GitLab, the default): the checks are decided after
the Master repo question, and gh is still required (it creates the github
mirror-target repo). Also verify, and fail early with the remedy on a miss —
never mid-run:
GITLAB_HOST=gitlab.test glab auth status— authenticated asrootcurl -sI http://gitlab.test/— reachable (remedy: check tailscale / split DNS)
Interactive Discovery (6 questions max)
Read ${CLAUDE_SKILL_DIR}/interactive-questions.md for the full Q&A flow.
Ask questions one at a time, waiting for each answer. Gather only what's needed to bootstrap:
- Project objective (1-2 sentences)
- Tech stack (language, framework, runtime)
- Architecture style (web app, API, CLI, library, etc.)
- Repo visibility (public/private)
- Master repo: GitLab on home-lab (default) | GitHub
- Anything else? (optional catch-all)
The GitHub answer keeps exactly the original flow; GitLab-only steps are in
generation-rules.md under "GitLab-master variant".
Do NOT ask about database, testing, CI/CD, or deployment — those are for /brainstorm.
Execution Flow
After the Q&A, read ${CLAUDE_SKILL_DIR}/generation-rules.md for detailed steps.
Summary:
- Initialize git repo (
git init) - Create
.gitignoreappropriate to the detected tech stack - Create the remote: GitHub (
gh repo create), or on the GitLab path a GitLab project asoriginplus agithubmirror-target repo - Apply the standard label set (26 base + project-specific labels) —
ghon GitHub,glab label createon GitLab - Generate
CLAUDE.md(lightweight — placeholders for sections filled later) - Generate
PROJECT-SEED.md(structured handoff file for brainstorm) 6b. Generate.sdlc-harness.yaml(pins the agent harness so routing is declared, not inherited from whatever registry the installed controller happens to ship) 6c. GitLab path only: write.sdlc-forge.yaml, set the repo-local credential helper, install.gitlab-ci.yml - Create initial commit
- Push to remote
- Display summary and suggest: "Run
/brainstormto define product requirements"
Dynamic Context
Current directory:
!basename "$(pwd)"
Git status:
!git rev-parse --is-inside-work-tree 2>/dev/null && echo "Already a git repo" || echo "Not a git repo"
Directory contents:
!ls -la 2>/dev/null | head -20
$ARGUMENTS
04 同仓库更多 Skills
evil
A poisoned skill fixture carrying an encoded payload.
demo
A harmless demo skill used as a clean supply-chain fixture.
skills
暂无简介
telegram
Post messages to Telegram via Bot API. Supports Markdown formatting, reply-to, and silent mode.
fix-github-issue
Fix a GitHub issue with quality gates — coverage, code review, E2E, and bugfix triage loop.
execute-e2e-tests
Run and manage Playwright E2E tests. Setup, write, execute, and debug end-to-end tests for any project.