detect-stack — detect the repo's stack and install the matching skills
Read the repository, decide which technology stacks it uses, then install the
per-stack skills + agents tagged for exactly those stacks. Core SDLC skills (anything
with no stack: tag) install regardless. This is a one-time (re-runnable) bootstrap.
Inputs
Run from the root of the target repo (or a codebase/-of-repos umbrella). No artifact
inputs — you discover everything from the files on disk. If your instruction names harness
targets (claude-code, cursor, codex), use them; otherwise infer them (below).
Stack vocabulary
Emit only these tokens (they match the stack: tags on the skills/agents):
go · java · kotlin · python · react · vue · angular · node · rust ·
flutter · android · db
Detection method
Scan for manifests and sources (breadth-first; ignore node_modules, vendor,
.git, build output). Map signals to tokens — a repo can match several:
| Signal (files / dependencies) |
Stack token |
go.mod, *.go |
go |
pom.xml, build.gradle(.kts), *.java (Spring Boot / Quarkus deps still ⇒ java) |
java |
*.kt, *.kts, Kotlin Gradle plugin |
kotlin |
requirements.txt, pyproject.toml, setup.py, Pipfile, *.py (Django/FastAPI deps ⇒ still python) |
python |
package.json with react/next |
react |
package.json with vue/nuxt |
vue |
package.json with @angular/core |
angular |
package.json with @nestjs/*, or Node/TS backend without a UI framework |
node |
Cargo.toml |
rust |
pubspec.yaml |
flutter |
AndroidManifest.xml, com.android.* Gradle plugin |
android |
SQL migrations dir, or postgres/mysql/redis/prisma/clickhouse deps |
db |
Prefer dependency evidence over file extensions when they disagree (a .ts file in
a Go repo's tooling dir is not a node stack). Only emit a token you can point to a
concrete signal for; list that evidence.
De-duplicate and sort the tokens.
Install step
- Pick harness targets. Include every already-installed Maestro host you can evidence:
.claude/skills/maestro/SKILL.md ⇒ claude-code,
.cursor/skills/maestro/SKILL.md ⇒ cursor, and
.agents/skills/maestro/SKILL.md ⇒ codex. If none is present, default to
claude-code. Do not treat a generic .agents/ folder as proof that Maestro was installed
for Codex.
- Run the installer with the detected filter. Prefer the repo-local wrapper; fall back
to the installer script:
./maestro install <harness-targets> --stack <detected-tokens>
# or, if there is no ./maestro wrapper:
bash install.sh <harness-targets> --stack <detected-tokens>
e.g. ./maestro install codex --stack go,react,db. The installer always adds the
core SDLC skills; --stack only gates the per-stack ones.
- Report what installed (the installer prints
N installed, M skipped by --stack).
Standards
- Detect what the repo actually uses today — never install a stack you can't evidence.
- Re-runnable: re-running re-detects and re-installs; it overwrites the installed copies,
never the
skills/ source of truth.
- If you detect a stack the vocabulary doesn't cover, say so plainly and skip it (don't
invent a token — the installer would match nothing).
Safety
- Read-only against application code. The only thing you run is the installer, which writes
ONLY into harness config dirs (
.claude/, .cursor/, .agents/) — never application code, never
.maestro/ run state.
- If no stack is detected, install just the core pack (
--stack with no tokens installs
everything; to install core-only, pass a token that matches nothing is wrong — instead
report "no stack detected" and let the human choose).
Output contract
Return stacks (the detected stack tokens, comma-separated), installed_count (skills +
agents installed), and summary (one line naming the stacks and harness targets).
1---2name: detect-stack3description: Scan the codebase to detect its technology stack(s), then install only the matching stack-tagged skills and agents (plus the always-installed core SDLC pack) by running the installer with a --stack filter. Front door for /detect-stack.4---56# detect-stack — detect the repo's stack and install the matching skills78Read the repository, decide which technology **stacks** it uses, then install the9per-stack skills + agents tagged for exactly those stacks. Core SDLC skills (anything10with no `stack:` tag) install regardless. This is a one-time (re-runnable) bootstrap.1112## Inputs13Run from the root of the target repo (or a `codebase/`-of-repos umbrella). No artifact14inputs — you discover everything from the files on disk. If your instruction names harness15targets (`claude-code`, `cursor`, `codex`), use them; otherwise infer them (below).1617## Stack vocabulary18Emit only these tokens (they match the `stack:` tags on the skills/agents):1920`go` · `java` · `kotlin` · `python` · `react` · `vue` · `angular` · `node` · `rust` ·21`flutter` · `android` · `db`2223## Detection method241. **Scan for manifests and sources** (breadth-first; ignore `node_modules`, `vendor`,25 `.git`, build output). Map signals to tokens — a repo can match several:2627 | Signal (files / dependencies) | Stack token |28 | --- | --- |29 | `go.mod`, `*.go` | `go` |30 | `pom.xml`, `build.gradle`(.kts), `*.java` (Spring Boot / Quarkus deps still ⇒ java) | `java` |31 | `*.kt`, `*.kts`, Kotlin Gradle plugin | `kotlin` |32 | `requirements.txt`, `pyproject.toml`, `setup.py`, `Pipfile`, `*.py` (Django/FastAPI deps ⇒ still python) | `python` |33 | `package.json` with `react`/`next` | `react` |34 | `package.json` with `vue`/`nuxt` | `vue` |35 | `package.json` with `@angular/core` | `angular` |36 | `package.json` with `@nestjs/*`, or Node/TS backend without a UI framework | `node` |37 | `Cargo.toml` | `rust` |38 | `pubspec.yaml` | `flutter` |39 | `AndroidManifest.xml`, `com.android.*` Gradle plugin | `android` |40 | SQL migrations dir, or `postgres`/`mysql`/`redis`/`prisma`/`clickhouse` deps | `db` |41422. **Prefer dependency evidence over file extensions** when they disagree (a `.ts` file in43 a Go repo's tooling dir is not a `node` stack). Only emit a token you can point to a44 concrete signal for; list that evidence.453. **De-duplicate and sort** the tokens.4647## Install step481. **Pick harness targets.** Include every already-installed Maestro host you can evidence:49 `.claude/skills/maestro/SKILL.md` ⇒ `claude-code`,50 `.cursor/skills/maestro/SKILL.md` ⇒ `cursor`, and51 `.agents/skills/maestro/SKILL.md` ⇒ `codex`. If none is present, default to52 `claude-code`. Do not treat a generic `.agents/` folder as proof that Maestro was installed53 for Codex.542. **Run the installer with the detected filter.** Prefer the repo-local wrapper; fall back55 to the installer script:56 ```bash57 ./maestro install <harness-targets> --stack <detected-tokens>58 # or, if there is no ./maestro wrapper:59 bash install.sh <harness-targets> --stack <detected-tokens>60 ```61 e.g. `./maestro install codex --stack go,react,db`. The installer always adds the62 core SDLC skills; `--stack` only gates the per-stack ones.633. **Report** what installed (the installer prints `N installed, M skipped by --stack`).6465## Standards66- Detect what the repo **actually uses today** — never install a stack you can't evidence.67- Re-runnable: re-running re-detects and re-installs; it overwrites the installed copies,68 never the `skills/` source of truth.69- If you detect a stack the vocabulary doesn't cover, say so plainly and skip it (don't70 invent a token — the installer would match nothing).7172## Safety73- Read-only against application code. The only thing you run is the installer, which writes74 ONLY into harness config dirs (`.claude/`, `.cursor/`, `.agents/`) — never application code, never75 `.maestro/` run state.76- If no stack is detected, install just the core pack (`--stack` with no tokens installs77 everything; to install core-only, pass a token that matches nothing is wrong — instead78 report "no stack detected" and let the human choose).7980## Output contract81Return `stacks` (the detected stack tokens, comma-separated), `installed_count` (skills +82agents installed), and `summary` (one line naming the stacks and harness targets).