squadai-init

squadai-init is a command for Claude Code from PedroMosquera/squadai. It costs 0 tokens per session (1,036 once invoked), scanned A, original, MIT.

A repository-review command that examines a codebase and adjusts configured coding-agent instruction files to fit it. It keeps the project's existing working method intact.

In plain words
What is it for?
Use it when setting up or refining agent roles for a repository. It can review project settings, language manifests, source and test files, and existing instruction files before proposing changes.
Why use it?
Agent instructions written for one project may be inaccurate in another. This command uses the repository's files and configuration to make those instructions more relevant.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/pedromosquera/squadai/squadai-init
Clone the repo
git clone --depth 1 https://github.com/PedroMosquera/squadai

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for squadai-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/pedromosquera/squadai/squadai-init.svg)](https://agentmods.dev/commands/pedromosquera/squadai/squadai-init)
Your own site
<a href="https://agentmods.dev/commands/pedromosquera/squadai/squadai-init"><img src="https://agentmods.dev/badge/commands/pedromosquera/squadai/squadai-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,036 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01036
Opus 5 $0.00000 $0.00518
Sonnet 5 $0.00000 $0.00207
Haiku 4.5 $0.00000 $0.00104

Measured 5d ago against content hash aca2b730125c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

squadai-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

internal/assets/commands/squadai-init.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/squadai-init

You are running the squadai squadai-init routine: read the current repository, understand what it actually contains, and refine each configured agent's role files (or solo instructions file) so they are tuned to this codebase — without losing any methodology semantics squadai installed.

Playbook: the detailed procedure for every phase lives in the squadai-init-playbook skill — find SKILL.md under your skills directory at shared/squadai-init-playbook/ (glob for **/shared/squadai-init-playbook/SKILL.md if unsure). Load it once after the user confirms, then follow the phase procedures from it as you go.

Token-cost disclosure (FIRST ACTION — DO NOT SKIP)

Before reading any file, print exactly this block and wait for confirmation:

/squadai-init will:
  • read .squadai/project.json
  • sample your language manifests (go.mod, package.json, etc.)
  • read up to 10 representative source/test files
  • read CLAUDE.md / AGENTS.md if present
Estimated cost: 1,500–4,000 input tokens (one-time per refinement).
Output: a proposed diff per role/instructions file, each populated
with (a) repo context and (b) the role's delegation/task contract
(orchestrator: delegation-first, parallelism, model-tier-per-task,
token budgets; sub-agent: scope, return contract, token efficiency).
Nothing is written without your explicit accept.

Proceed? [Y/n]

Any reply other than Y/y/yes/<empty> → stop immediately: Squad-init cancelled.

Preflight

  1. .squadai/project.json must exist, else stop: /squadai-init requires a squadai project. Run squadai init first.
  2. Parse it: methodology, enabled adapters, meta block (language(s), test/build/lint commands, framework, package manager), team roles.
  3. .squadai/.squad-refined absent → first-run mode; present → re-run mode (playbook: "Re-run handling"). If methodology_at_last_run differs from the current methodology, every target needs fresh refinement — skip hand-edit prompts.

Read the full file on GitHub · 88 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 88 lines · 0 tokens per session scan A aca2b730125c

Subscribe to this mod's changes

squadai-init is a command published in the GitHub repository PedroMosquera/squadai (8 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,036 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.