Skip to content
Development
Skill

/crew-init

Analyzes a project codebase, builds 3-layer index, generates project profile, and auto-configures the agent team with relevant skills. The main initialization skill for CodeCrew.

From plugin
codecrew
1312 skills11 agents10 commands1 hook
Install
$ npx -y skills add d3x293/code-crew --skill crew-init --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/crew-init

Context preview

The summary Claude sees to decide when to auto-load this skill.

Analyzes a project codebase, builds 3-layer index, generates project profile, and auto-configures the agent team with relevant skills. The main initialization skill for CodeCrew.

SKILL.md

crew-init.SKILL.md
name: crew-init
description: Analyzes a project codebase, builds 3-layer index, generates project profile, and auto-configures the agent team with relevant skills. The main initialization skill for CodeCrew.

Crew Init - Project Analysis & Team Setup

Full project initialization that transforms any codebase into a CodeCrew workspace with indexed code, profiled architecture, and a configured agent team.

When to Activate

  • User runs `/crew init`
  • User runs `/crew` with `init` argument
  • First time using CodeCrew in a project

Initialization Pipeline

Phase 1: Project Discovery

Scan the project to understand what we're working with:

**1.1 Detect project type and languages:**

Use Glob to check for:
- package.json, tsconfig.json → Node.js / TypeScript
- requirements.txt, pyproject.toml, setup.py → Python
- go.mod → Go
- Cargo.toml → Rust
- pom.xml, build.gradle → Java / Kotlin
- Gemfile → Ruby
- composer.json → PHP
- Makefile, CMakeLists.txt → C/C++
- pubspec.yaml → Dart/Flutter
- *.sln, *.csproj → .NET/C#

**1.2 Detect frameworks:**

Read package.json (or equivalent) for:
- react, next, vue, angular, svelte → Frontend framework
- express, fastify, koa, django, flask, gin, actix → Backend framework
- playwright, jest, pytest, mocha → Testing framework
- eslint, prettier, black, gofmt → Linting/formatting
- docker, kubernetes → Container/orchestration

**1.3 Map project structure:**

Use Glob for directory layout:
- src/, lib/, app/ → Source code
- test/, tests/, __tests__, spec/ → Tests
- docs/, doc/ → Documentation
- .github/, .gitlab-ci.yml → CI/CD
- Dockerfile, docker-compose.yml → Docker
- scripts/, bin/ → Build/deploy scripts

**1.4 Read existing context:**

  • Read CLAUDE.md if it exists (project-specific instructions)
  • Read README.md for project description
  • Check git log for recent activity areas (if git repo)

Phase 2: Build Codebase Index

Invoke the **codebase-index** skill in full-build mode:

1. Discover all source files (excluding node_modules, dist, build, etc.) 2. For each file: read, hash, extract metadata (exports, imports, functions, classes, line count) 3. Build call graph from import/export relationships 4. Write `.claude/crew-index.json` (Layer 1 - compact) 5. Write `.claude/crew-symbols.json` (Layer 2 - symbols)

This enables the Index-First Protocol for all future agent interactions.

Phase 3: Generate Project Profile

Write `.claude/crew-profile.md` with:

# Crew Profile: {project-name}

## Overview
- **Type**: {web-app | api | cli | library | scraper | mobile | etc.}
- **Languages**: {detected languages}
- **Frameworks**: {detected frameworks}
- **Size**: {total files} files, {total lines} lines

## Architecture
- **Entry Point**: {main file}
- **Pipeline/Flow**: {data flow description}
- **Patterns**: {MVC, pipeline, event-driven, microservice, etc.}

## Key Directories
- **Source**: {src paths}
- **Tests**: {test paths}
- **Config**: {config files}
- **Docs**: {doc paths}

## Tech Stack
- **Runtime**: {node, python, go, etc.}
- **Package Manager**: {npm, pip, cargo, etc.}
- **Testing**: {jest, pytest, etc.}
- **Linting**: {eslint, prettier, etc.}
- **CI/CD**: {github actions, gitlab ci, etc.}
- **Deployment**: {docker, k8s, vercel, etc.}

## Index Status
- **Files Indexed**: {count}
- **Symbols Mapped**: {count}
- **Last Indexed**: {timestamp}
- **Index Files**: .claude/crew-index.json, .claude/crew-symbols.json

Phase 4: Configure Agent Team

Based on detected stack, determine which agents are active and what skills they need.

Write `.claude/crew-team.json`:

{
  "project": "project-name",
  "configured": "2026-04-04T12:00:00Z",
  "agents": {
    "ceo": {
      "model": "opus",
      "active": true,
      "role": "Task triage, decomposition, delegation, architecture decisions"
    },
    "vp-engineering": {
      "model": "sonnet",
      "active": true,
      "role": "Tech decisions, architecture review, complex planning"
    },
    "vp-quality": {
      "model": "sonnet",
      "active": true,
      "role": "Quality gates, test strategy, review coordination"
    },
    "senior-dev": {
      "model": "sonnet",
      "active": true,
      "role": "Complex implementation, multi-file changes"
    },
    "junior-dev": {
      "model": "haiku",
      "active": true,
      "role": "Simple fixes, formatting, small changes"
    },
    "code-reviewer": {
      "model": "sonnet",
      "active": true,
      "role": "Code review, quality assessment"
    },
    "debugger": {
      "model": "sonnet",
      "active": true,
      "role": "Bug investigation, root cause analysis"
    },
    "security-analyst": {
      "model": "sonnet",
      "active": false,
      "activateWhen": "security-related tasks or pre-deploy review"
    },
    "devops-engineer": {
      "model": "haiku",
      "active": false,
      "activateWhen": "Docker/CI/CD/deployment tasks detected"
    },
    "doc-writer": {
      "model": "haiku",
      "active": true,
      "role": "Documentation, comments, READMEs"
    },
    "test-engineer": {
      "model": "sonnet",
      "active": false,
      "activateWhen": "test directory detected or testing tasks"
    }
  },
  "activationRules": {
    "hasDocker": ["devops-engineer"],
    "hasTests": ["test-engineer"],
    "hasSecurity": ["security-analyst"],
    "always": ["ceo", "vp-engineering", "senior-dev", "junior-dev", "code-reviewer", "debugger", "doc-writer"]
  }
}

Activate conditional agents based on detected stack:

  • Found `Dockerfile` or `docker-compose.yml` → activate `devops-engineer`
  • Found `test/` or testing framework → activate `test-engineer`
  • Found `.env` or security configs → activate `security-analyst`

Phase 5: Suggest Custom Agents

Based on Phase 1 detection results (languages, frameworks, tools), suggest project-specific custom agents that extend the built-in team. The number of suggestions is **dynamic** — more frameworks/tools detected = more suggest

Read more
Ships withcodecrew

A virtual dev crew for Claude Code — 11 specialized AI agents that decompose, implement, review, and ship your tasks. Instead of one AI doing everything, CodeCrew breaks work into subtasks and routes each to the right specialist on the right model.

Get the whole plugin

Other skills on codecrew.