oprogramadorreal/optimus-claude / skills/init
init
UnverifiedBootstraps a project for Claude Code or Codex — generates routed project guidance from detected structure, reconciles existing docs, and offers test infrastructure. Claude Code can also install formatter hooks. Writes .claude/, CLAUDE.md, AGENTS.md and subproject docs/; may append to README/.gitignore and, with approval, install dev dependencies. Preserves existing guidance through review and recorded ownership. Use for initial setup or upgrades.
references/multi-repo-detection.md
View on GitHub# Multi-Repo Workspace Detection
Canonical detection algorithm. Each consuming skill applies its own policy after detection.
## Detection Algorithm
A **multi-repo workspace** is a directory that meets ALL of these conditions:
1. The current directory is outside a Git working tree and is not a bare repository.
2. Two or more immediate child directories are independent Git working-tree roots, including linked worktrees; confirmed submodules are excluded.
### Steps
1. Run `git rev-parse --is-inside-work-tree` in the current directory.
- `true` → **not a multi-repo workspace**. Resolve `git rev-parse --show-toplevel` and proceed in that working tree. This covers normal checkouts, linked worktrees, and a session started in a subdirectory.
- `false` → check `git rev-parse --is-bare-repository`: `true` → stop and explain that a working checkout is required.
- Exit 128 with `fatal: not a git repository` is the normal signal for a directory outside any repository (a workspace root or a fresh directory): continue to step 2.
- Any other failure (dubious ownership, permission or configuration errors, Git missing) is not evidence that no repository exists. Report it and preserve files; do not repair Git configuration silently or infer submodules from `.git` file shape. Detection remains unverified.
2. Scan immediate subdirectories (skip dot-directories like `.git`, `.vscode`, and non-project directories like `node_modules`, `vendor`, `dist`, `build`, `target`, etc.)
- For each candidate, run `git -C "<child>" rev-parse --is-inside-work-tree` and `git -C "<child>" rev-parse --show-toplevel`. Count it only when the resolved toplevel is that child, not an inherited ancestor repository; compare canonical paths, case-insensitively on case-insensitive filesystems (Git reports on-disk case on Windows).
- Exclude confirmed submodules: `git -C "<child>" rev-parse --show-superproject-working-tree` is nonempty, or the containing repository's `.gitmodules` explicitly registers that path. A `.git` file alone proves neither submodule nor linked-worktree status.
3. Count qualifying subdirectories:
- **2+** → confirmed multi-repo workspace. Enumerate repos with their paths
- **1** → not a workspace. The single repo is the likely target — suggest the user `cd` into it
- **0** → not a recognized project structure
### Output
When a multi-repo workspace is detected, produce a list of repos with their directory names and relative paths. This list is used by the consuming skill to determine which repo(s) to operate on.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |