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

init

Skill1 starsChanged 6 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.

89 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use migrate, survey and 9 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.
  • genomewalkerSkill

    migrate

    Import soul data from SQLite or shared chitta files

    Also in 8 projects that use this

  • SNL-UCSBSkill

    survey

    Literature survey assistant with four modes: /survey intent (capture student goals, expertise, and success criteria), /survey triage (landscape mapping via NotebookLM), /survey deepen (structured reading with craft and visualization extraction), /survey synthesize (cross-paper analysis for related work, area exams, gap identification). Also: /survey expand (corpus growth proposals). Use when students mention reading papers, literature review, related work, area exam prep, paper corpus, or any systematic reading task.

    Also in 3 projects that use this

  • pvnarpSkill

    bug

    Investigates and resolves bugs using structured diagnosis. Categorizes by system, traces root cause, proposes minimal fix, and suggests prevention. Use when debugging issues or investigating unexpected behavior.

    Also in 3 projects that use this

  • AnthropicSkill

    uninstall

    Uninstall a community skill that was installed via the hub. Confirms before deleting files, refuses to touch first-party plugin skills, and logs every action. Use when the user wants to fully remove a community skill ("uninstall [skill]", "remove this skill") rather than just disable it.

    Also in 3 projects that use this

  • Eipi-TongSkill

    adopt

    Onboard an existing codebase into the starter kit. Use when the user says "adopt this project", "add the kit to my existing repo", or "set up the kit on existing code".

    Also in 3 projects that use this

  • mlz11Skill

    reset

    Completely reset ClaudeNotifier installation, removing all components and permissions

    Also in 3 projects that use this

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 80 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 80 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.