Receber por email
← Voltar para o catálogo

project-setup

Project configuration initialization. Use when: first-time setup, auto-detecting framework, replacing CLAUDE.md placeholders. Not for: ongoing config checks (use claude-health), skill creation (use skill-creator). Output: configured CLAUDE.md + project settings + rules + hooks.

172estrelas
Atualizado há 5 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add sd0xdev/sd0x-dev-flow

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/project-setup-sd0xdev/svg)](https://www.skillteca.com.br/skills/project-setup-sd0xdev)
#ai

Skills relacionadas

Ver todas de DevOps e Infra →

Alerta por categoria

Receba novas skills de DevOps e Infra toda segunda

1 email curto, só com as skills novas de DevOps e Infra. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Project Setup

Trigger

  • Keywords: project setup, init, initialize, configure project, setup CLAUDE.md, customize placeholders

When NOT to Use

  • CLAUDE.md placeholders are already fully replaced (no {...} remaining)
  • Non Node.js/TypeScript project without a recognized manifest file -- run with --detect-only to see what can be auto-detected. Manual configuration may be needed for: {FRAMEWORK}, {CONFIG_FILE}, {BOOTSTRAP_FILE}. Script commands ({TEST_COMMAND}, etc.) can often be detected from manifest files
  • Only want to modify a single placeholder -- just Edit CLAUDE.md directly

Workflow

Phase 1: Detect project environment
    │
    ├─ Read package.json (dependencies, devDependencies, scripts)
    ├─ Detect lockfile (pnpm-lock.yaml / yarn.lock / package-lock.json)
    ├─ Detect entrypoints (glob src/)
    └─ Compile results
    │
Phase 2: Confirm detection results
    │
    ├─ Present detection results table
    └─ Wait for user confirmation or corrections
    │
Phase 3: Write to .claude/CLAUDE.md (unless --detect-only)
    │
    ├─ Read CLAUDE.template.md, filter ecosystem blocks
    └─ Replace placeholders, write to .claude/CLAUDE.md
    │
Phase 4: Verify CLAUDE.md
    │
    ├─ Read .claude/CLAUDE.md to confirm no remaining placeholders
    └─ Output placeholder summary
    │
Phase 5: Install Rules + Backfill CLAUDE.md (unless --no-rules or --lite)
    │
    ├─ Locate plugin rules dir (3-level fallback)
    ├─ mkdir -p .claude/rules/ → copy 11 managed rules + 1 override template
    ├─ Backfill: ensure .claude/CLAUDE.md has @rules/ references
    └─ Output rules install report
    │
Phase 6: Install Hooks (unless --no-hooks or --lite)
    │
    ├─ Locate plugin hooks dir (3-level fallback)
    ├─ mkdir -p .claude/hooks/ → copy 5 hooks + chmod +x
    ├─ Merge hook definitions into .claude/settings.json
    └─ Output hooks install report
    │
Phase 6.5: Install Scripts (unless --lite or --detect-only)
    │
    ├─ Locate plugin scripts dir (3-level fallback)
    ├─ mkdir -p .claude/scripts/lib → copy 3 scripts
    ├─ Update manifest .sd0x/install-state.json
    └─ Output scripts install report
    │
Phase 6.7: Configure Environment Variables (unless --detect-only or --lite)
    │
    ├─ Detect model context size (1M → recommend auto-compact window)
    ├─ Build env var catalog (STOP_GUARD_MODE + model-aware vars)
    ├─ Present recommendations, wait for user confirmation
    ├─ Merge into .claude/settings.json env object
    └─ Output env config report
    │
Phase 7: Final Verification Report
    │
    ├─ Summarize all phases
    ├─ Closed-loop check (CLAUDE.md + rules + hooks + env)
    └─ Output next steps

Flag Short-Circuit Semantics

| Flag | Phase 1-2 | Phase 3-4 | Phase 5-6.5 | Phase 6.7 | Phase 7 | |------|-----------|-----------|-----------|-----------|---------| | (none) | Execute | Execute | Execute | Execute | Full report | | --detect-only | Execute | Skip | Skip | Skip | Detection results only | | --lite | Execute | Execute | Skip | Skip | CLAUDE.md only | | --no-rules | Execute | Execute | Skip rules | Execute | Report | | --no-hooks | Execute | Execute | Skip hooks | Execute | Report | | --env-only | Skip | Skip | Skip | Execute | Env report only (skill-level directive) | | --guard-mode warn | Execute | Execute | Execute | Execute (STOP_GUARD_MODE=warn) | Report |

Phase 1: Detect Project Environment

Execute the following detections in order; see references/detection-rules.md for detailed rules:

Detection Steps

  1. Detect Ecosystem — Glob for manifest files (package.json, pyproject.toml, Cargo.toml, go.mod, build.gradle, pom.xml, Gemfile). Priority order in references/detection-rules.md.
  2. Read manifest — Extract project name, dependencies, scripts (Node.js: package.json; others: ecosystem manifest)
  3. Detect Package Manager — Lockfile detection (Node.js only): pnpm-lock.yaml → pnpm, yarn.lock → yarn, else npm (priority order per references/detection-rules.md)
  4. Detect Framework — From dependencies. See references/detection-rules.md#framework
  5. Detect Database — From dependencies. See references/detection-rules.md#database
  6. Detect Entrypoints — Glob framework-specific candidates. See references/detection-rules.md#entrypoints
  7. Detect Scripts — From manifest scripts field. See references/detection-rules.md#scripts. Missing scripts → # N/A (no script found)

For non-Node.js ecosystems, skip Node-specific steps and use ecosystem-specific detection from references/detection-rules.md.

Phase 2: Confirm Detection Results

Present a table of all 9 auto-detected placeholders with | Placeholder | Detected Value | Source | columns. Additional manual placeholders ({TICKET_PATTERN}, {ISSUE_TRACKER_URL}, {TARGET_BRANCH}) may remain if not auto-detectable — these are acceptable and should be noted as "manual" in Phase 4 verification. Wait for user confirmation before proceeding to Phase 3.

Phase 2.5: Select Ecosystem Blocks

Based on detected manifest (from Phase 1.0):

| Manifest | Ecosystem tag | |----------|--------------| | package.json | node-ts | | pyproject.toml | python | | go.mod | go | | Cargo.toml | rust | | Gemfile | ruby | | pom.xml / build.gradle | java |

Phase 3: Write to .claude/CLAUDE.md

Prerequisite: User has confirmed, and not in --detect-only mode.

  1. Read CLAUDE.template.md (if not found, fallback to CLAUDE.md)
  2. Remove <!-- block:X -->...<!-- /block --> sections NOT matching detected ecosystem
  3. Remove remaining block markers (<!-- block:... -->, <!-- /block -->)
  4. Execute Edit for each placeholder (using replace_all: true)
  5. Write to .claude/CLAUDE.md (create directory if needed)

If .claude/CLAUDE.md does not exist, create it from the rendered template.

Phase 4: Verify CLAUDE.md

  1. Read .claude/CLAUDE.md
  2. Grep: \{[A-Z_]+\} — confirm no remaining auto-detected placeholders. Exclude ${...} shell variable matches (e.g., ${CLAUDE_PLUGIN_ROOT}) from the count — these are intentional env var references, not unfilled placeholders.
  3. Output summary table with all placeholder values and remaining count

If --detect-only or --lite, skip to Phase 7.

Phase 5: Install Rules + Backfill CLAUDE.md

Skip if: --no-rules or --lite or --detect-only.

5.1 Locate Plugin Rules Directory

Find the plugin's rules/ directory using this priority (short-circuit on first match):

  1. Glob search — search known Claude plugin locations:

`` Glob: ~/.claude/plugins/**/sd0x-dev-flow/rules/auto-loop.md Glob: ${REPO_ROOT}/node_modules/sd0x-dev-flow/rules/auto-loop.md ``

  1. Plugin-relative fallback — try reading @rules/auto-loop.md to confirm accessibility. If readable, derive the rules directory.
  2. Not found → hard error for this phase (do not silently skip). Output explicit failure with remediation steps:

``` ⛔ Rule source not found. Auto-loop rules cannot be installed.

Remediation (choose one):

  1. Install the plugin: /plugin marketplace add sd0xdev/sd0x-dev-flow && /plugin install sd0x-dev-flow@sd0xdev-marketplace
  2. Copy rules manually from a machine that has the plugin installed
  3. Re-run with --no-rules to skip (rules layer will be missing)

```

Then skip Phase 5 and continue to Phase 6. Phase 7 will report this as ⚠️ Partial.

5.2 Copy Rules

  1. mkdir -p ${REPO_ROOT}/.claude/rules/
  2. Copy all 11 managed rules:

| Rule | Purpose | |------|---------| | auto-loop.md | Auto review loop enforcement | | codex-invocation.md | Codex independent research requirement | | fix-all-issues.md | Zero tolerance for unfixed issues | | framework.md | Framework conventions | | testing.md | Test structure and requirements | | security.md | OWASP security checklist | | git-workflow.md | Git branch and commit conventions | | `l

Compartilhar X LinkedIn