agentleFS
trevorbyrumtrevorbyrum/claude-skills-suite/skills/init/SKILL.md

init

Skill1 starsChanged 5 months agoMITView on GitHub

Initializes a project from any starting state — greenfield, joining existing code, partitioning a sub-project, or pivoting scope. Auto-detects which path applies. Invoke with /init.

137 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use daily-arxiv, exp-eval and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LambenthanSkill

    daily-arxiv

    每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新

    Also in 5 projects that use this

  • LambenthanSkill

    exp-eval

    实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges

    Also in 5 projects that use this

  • skyllwtSkill

    exp-pilot-eval

    Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.

    Also in 4 projects that use this

  • skyllwtSkill

    exp-pilot-run

    Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.

    Also in 4 projects that use this

  • gaebalaiSkill

    codex-system

    PROACTIVELY consult Codex CLI, your highly capable supporter with exceptional reasoning and task completion abilities. Codex is a trusted expert you should ALWAYS consult BEFORE making decisions on: design choices, implementation approaches, debugging strategies, refactoring plans, or any non-trivial problem. When uncertain, consult Codex. Don't hesitate - Codex provides better analysis. Explicit triggers: "think deeper", "analyze", "second opinion", "consult codex".

    Also in 3 projects that use this

  • +6 more from Lambenthan
  • +1 more from skyllwt

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 125 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the detection script:

    line 37
  2. Very specific:

    If ambiguous, ask via AskUserQuestion:

    line 47
  3. Distinctive:

    Read the matching reference:

    line 55
  4. Very specific:

    Before completing, read and follow ../../references/cross-cutting-rules.md.

    line 155

“Common” is measured: kept by at least 6 in 10 of the 125 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Init

Take a project from any starting state to an approved build plan ready for /execute. Four pathways share one detection layer; the matching reference drives the actual flow.

  • Greenfield — empty directory, no git, no docs
  • Join-existing — code/repo exists, no project-context.md, you're onboarding
  • Sub-project — partition a parent project into a focused sub-workspace
  • Pivot — direction change in an existing project (scope rewrite)

Inputs

InputSourceRequired
Project nameUser prompt or cwd basenameYes
Project root pathUser prompt or cwdYes
Initial descriptionUser promptYes (greenfield) / Optional (others)

Outputs

  • Repo scaffold (greenfield only — directories, template files, .gitignore, README.md stub)
  • GitHub repo (greenfield, optional — user confirms)
  • project-context.md in repo root
  • project-plan.md in repo root (approved)
  • artifacts/project.db (SQLite + FTS5)

Instructions

Phase 0: Detect mode

Run the detection script:

bash skills/init/scripts/detect-state.sh

Output is one of: greenfield | join-existing | sub-project | pivot | ambiguous.

A fifth path — sub-project-merge — is user-triggered explicitly (/init merge, "merge the sub-project back," or "wrap up the sub-project"). The detect script doesn't auto-detect this; the user knows when work is done.

If ambiguous, ask via AskUserQuestion:

"I see <observed state>. Which path?

  • Greenfield — start fresh from this empty dir
  • Join existing — there's code, I'm onboarding
  • Sub-project — partition this from a parent project
  • Sub-project merge — fold a completed sub-project back into its parent
  • Pivot — existing project, but the direction changed"

Read the matching reference:

  • greenfield → references/greenfield.md
  • join-existing → references/join-existing.md
  • sub-project → references/sub-project.md
  • sub-project-merge → references/sub-project-merge.md
  • pivot → references/pivot.md

Phase 1: Confirm project name + slug

Used as the project identifier (e.g., for the artifacts/research/<NNN>-<topic>/ naming and any downstream tooling). Default:

SLUG=$(basename "$(pwd)" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')

Confirm with the user via AskUserQuestion before continuing. The slug is hard to rename later once research artifacts and DB entries reference it.

Phase 2: Run the path

Each reference (greenfield.md, join-existing.md, sub-project.md, pivot.md) drives its own phase chain. They cover the work, then return here for Phase 3.

Across all paths, certain phases recur — they're documented inline in each reference but follow a common shape:

  • Interview (inline, interactive) — uses agents/questions.md for the prompt structure
  • Write project-context.md (inline OR via agents/context-write.md subagent)
  • Research plan (optional, spawns Sonnet research subagents or skips with a note)
  • Build plan (calls /build-plan from-scratch mode)

See references/meta-skill-guards.md for shared timeout and stall-detection rules used across these multi-phase paths.

Phase 3: Init artifact DB

source references/db.sh
db_init

Creates artifacts/project.db with the schema. Idempotent — re-running on a project that already has the DB is safe.

Phase 4: Final decision gate

Present the user a summary:

  • Project name + slug
  • Files created (context, plan)
  • DB initialized
  • Build plan approved with N work units

Ask via AskUserQuestion:

"Project initialized. What next?

  • Start building — run /execute to implement the plan
  • Review first — run /review to stress-test the plan
  • Done for now — stop here, return later"

References (on-demand)

  • references/greenfield.md — scaffold → repo create → interview → context → research → plan
  • references/join-existing.md — discover → interview (scoped) → context → plan-or-validate
  • references/sub-project.md — partition from parent → context → plan (linked to parent)
  • references/pivot.md — adversarial scope rewrite → updated context → updated plan
  • references/meta-skill-guards.md — shared timeout + stall detection rules

Agent prompts (on-demand)

  • agents/questions.md — interview prompt template (used by all paths in different scopes)
  • agents/scaffold.md — Sonnet subagent for repo scaffolding (greenfield)
  • agents/context-write.md — Sonnet subagent for drafting project-context.md

Examples

User: /init — new project, real-time collab tool called collab-space
→ Phase 0: empty dir, no git → greenfield. Phase 1: slug = "collab-space".
  Phase 2 (greenfield.md): scaffold → repo create → interview → context → research → plan.
  Phase 3: db_init. Phase 4: user picks "Start building" → suggest /execute.
User: /init — I cloned this repo, never touched it before
→ Phase 0: .git exists, no project-context.md → join-existing.
  Phase 2 (join-existing.md): discover stack, read existing docs, scoped interview,
  draft context, propose initial plan (or validate existing one).
User: /init — this should be a sub-project of payments-core
→ Phase 0: ambiguous, AskUserQuestion → sub-project.
  Phase 1: slug = "payments-rewrite" (or what user names). Phase 2 (sub-project.md):
  detect parent at ../payments-core, partition scope, write linked context.
User: /init — we just pivoted from B2C to B2B
→ Phase 0: existing project + pivot cue → pivot.
  Phase 2 (pivot.md): adversarial review of current context vs new direction,
  scoped rewrite of project-context.md, fresh project-plan.md, archive prior plan.

Before completing, read and follow ../../references/cross-cutting-rules.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.