AGENT SKILL

workspace-init

Set up or refresh a multi-repo workspace from the parent folder of its sibling repos — the hub repo (repos registry, cross-repo backlog and decisions) that /vibe:next-task reads, and the local, untracked workspace-root CLAUDE.md that indexes the hub and the siblings

License 许可
MIT
最近更新
2026-11-13
Stars
★ 0
Forks
0

01 前言 Front Matter

name
workspace-init
model
claude-sonnet-5-5
version
1.1.0
description
Set up or refresh a multi-repo workspace from the parent folder of its sibling repos — the hub repo (repos registry, cross-repo backlog and decisions) that /vibe:next-task reads, and the local, untracked workspace-root CLAUDE.md that indexes the hub and the siblings
argument-hint
[hub repo dir name, e.g. roadmap] (only used on first bootstrap)

03 SKILL.md 正文

/vibe:workspace-init — Multi-Repo Workspace Bootstrap

A workspace is a parent folder — never itself a Git repo — holding several sibling repos. This skill sets up, or idempotently refreshes, two things:

  • the hub repo: a Git repo with no application code that plans across the others — repos.md (registry of siblings) plus a workspace-scoped .vibe/backlog/ and .vibe/decisions/. Recognized by a structural marker, never a fixed name: a directory with .git/ and repos.md at its root;
  • the workspace-root CLAUDE.md: a local, never-committed file at the parent folder's root pointing to the hub and listing the siblings.

Re-run whenever a repo is added, retired, or renamed. This skill never pushes.

Step 1 — Where are we?

Run git rev-parse --show-toplevel in cwd — a subdirectory of a repo has no .git/ of its own and would pass for a workspace root:

  • it prints a directory with the marker → inside the hub repo: the workspace root is that directory's parent; go to Step 3.
  • it prints a directory without repos.md → inside a code repo: stop with "Run /vibe:workspace-init from the workspace root (the parent folder, not inside a repo), or from the hub repo itself."
  • it fails (not in a work tree) → cwd is the workspace root; go to Step 2.

Step 2 — Locate or create the hub repo

Prefer the pointer: the ## Hub repo line of a workspace-root CLAUDE.md from a previous run — valid if that directory still has the marker. Otherwise scan cwd's direct subdirectories for the marker.

Not found → first bootstrap. The hub directory name is $ARGUMENTS when given — do not ask it again — otherwise AskUserQuestion for it, suggesting a neutral name such as "roadmap"; ask for an optional Git remote either way; mkdir + git init (+ git remote add origin), or git init in place if the directory exists without .git/. Then invoke the vibe:clarify skill with "the purpose of this new multi-repo workspace — why these repos belong together and what it's meant to achieve": settled/partial → its ### Synthesis is the workspace vision used in Step 5; abandoned → no vision paragraph.

Step 3 — Task list

Invoke the vibe:tasks skill with: Update repos registry → Ensure .vibe/ scaffolding → Write hub repo CLAUDE.md → Refresh hub repo README → Refresh workspace CLAUDE.md.

Step 4 — repos.md

A sibling is a direct subdirectory of the workspace root whose .git is a directory, the hub excluded; nothing is scanned deeper (a repo nested in a sibling is that sibling's business) and folders without .git are ignored. Not siblings — named in the report, never registered: a directory whose .git is a file (a linked worktree, a second checkout of a repo registered elsewhere) and a bare repository (something.git, no working tree to work in).

repos.md is never regenerated, only edited: a refresh adds rows in the columns the file already has (a hand-made registry may have its own), fills a Remote still — once the repo has an origin, and leaves every other cell, column and section — ## Naming convention included — as it found them.

Already listed → keep status and role exactly as they are (never overwrite a human judgment). New sibling → status: active if it has .vibe/backlog/, otherwise AskUserQuestion for the status (active picked by /vibe:next-task / planned no code yet / idea no repo yet / archived retired, kept for the record, never picked) and a one-line role — never guess the role. An active row whose directory is gone → report it and ask: mark it archived (the default — the row keeps what the workspace knew of it) or remove the row. A planned, idea or archived row needs no directory: never question it.

# Repos registry

Maintained by /vibe:workspace-init — re-run after adding, retiring, or renaming a repo.

| Repo | Status | Role | Remote |
|---|---|---|---|
| api | active | REST backend, owns the `orders` domain | git@github.com:acme/api.git |
| sdk | planned | Shared TS client — not started | — |
| legacy-portal | archived | Old customer portal, replaced by `api` | — |

## Naming convention
[the workspace's repo-naming pattern, or "None documented yet."]

Then create .vibe/backlog/ and .vibe/decisions/ in the hub if absent, each with a .gitkeep while it is empty (git commits no empty directory, so a clone of the hub would lack them), never touching existing items or ADRs.

Step 5 — Hub repo CLAUDE.md

Written here, not by vibe:init (whose stack detection and DoD assume application code):

# CLAUDE.md — [hub repo name] (workspace hub — no code)

> Auto-generated by /vibe:workspace-init. Edit freely. Add `<!-- keep -->` on a section heading to preserve it on regeneration.

## Role

This repo holds no application code. It is the source of truth for cross-repo planning: [repos.md](repos.md) registers every sibling repo (status, role, remote); `.vibe/backlog/` and `.vibe/decisions/` hold Product Owner decisions and ADRs spanning more than one repo.

[Vision paragraph: on a bootstrap, the Step 2 synthesis in the project's language; on a refresh, the paragraph standing here in the existing file, carried over unchanged — a refresh never drops it.]

**Items here are never implementable work** — never picked up by `/vibe:feature`, `/vibe:fix`, or `/vibe:auto`. Run `/vibe:next-task` from the workspace root to pick and ship actual work in the right repo.

## Backlog & decisions

Same format as any vibe-managed repo, scoped to workspace-level concerns: which repo owns what, cross-repo sequencing, naming conventions. `/vibe:backlog` works here too. Managed by hand, never by an autonomous run.

Then invoke the vibe:docs skill (README skeleton or refresh) and the vibe:sync skill — a hub has little source; "nothing to update" is a normal outcome, noted in the report.

Step 6 — Workspace-root CLAUDE.md

Full idempotent overwrite (with <!-- keep --> support), never committed — the folder is not a repo and the file regenerates from repos.md:

# CLAUDE.md — [workspace name] (workspace root — not a git repo)

> Auto-generated by /vibe:workspace-init. Not version-controlled: local-only context. Add `<!-- keep -->` on a section heading to preserve it.

## Hub repo
`[hub-dir]/` — source of truth for cross-repo planning (`repos.md`, workspace-scope backlog/decisions in `.vibe/`). Its items are Product Owner decisions, never implementable work.

## Sibling repos
| Repo | Status | Role |
|---|---|---|
[mirrored from repos.md]

## Cross-repo workflow
Run `/vibe:next-task` from this directory to pick, implement, and ship the next eligible task across active repos.

The ## Hub repo line is the pointer Step 2 and /vibe:next-task read — keep the exact directory name in the backticks.

Step 7 — Commit and report

In the hub: stage everything this run wrote or changed — repos.md, .vibe/, CLAUDE.md, README.md, and whatever vibe:docs and vibe:sync produced (docs/ included) — in one commit: chore: bootstrap hub repo on first init, chore: refresh workspace registry otherwise; nothing changed → say so. Report, short and plain: hub location (created / existed); repos added, updated, flagged missing; files refreshed; commit or "nothing to commit"; a reminder to push the hub when convenient.

04 同仓库更多 Skills

neolao
neolao/claude-plugin-vibe

usage-report

Usage report of a vibe workflow: counts, while the work runs, the bricks called, the loop rounds, the findings, the questions asked to the user and the fixes, then writes these statistics to `.vibe/usage-reports/` in the project at the end. Invoked by `vibe:feature` and `vibe:fix` through their shared workflow, at the start of the work and at the end. Never triggered by a user request.

★ 0
neolao
neolao/claude-plugin-vibe

tasks

Creates and tracks a vibe workflow's task list and keeps it up to date until the end — through the native task system (TaskCreate / TaskUpdate / TaskList / TaskGet) when it is available, otherwise through a `tasks.tsv` file in the scratchpad, kept by a script that reproduces the same model (ids, statuses, blockedBy dependencies, owner). Invoked internally by other vibe skills, never directly by users.

★ 0
neolao
neolao/claude-plugin-vibe

sync

Sync .vibe/ — generate on first run, incrementally update on subsequent runs

★ 0
neolao
neolao/claude-plugin-vibe

rewrite

暂无简介

★ 0
neolao
neolao/claude-plugin-vibe

review

Runs the project's active review agents on a scope and returns their raw findings — one owner per dimension, the shared finding contract injected into every prompt — without judging, fixing or committing anything. Invoked by the build workflow (`vibe:feature`, `vibe:fix`) as its internal review step and by `vibe:audit`, never directly by users.

★ 0
neolao
neolao/claude-plugin-vibe

release

Create a versioned release — bump version, finalize CHANGELOG.md, commit and tag

★ 0