Skip to content
Back to skills

Team Init

ASecurity

Use when setting up agent-team in a product repo for the first time — creates .agent-team/, drafts project.md from the codebase, and writes the permission settings for hands-off runs. Also use (`team-init upgrade`) to bring a repo set up by an older agent-team version up to date.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 17, 2026
ai-agentspythonbashgitapi

Works with

  • claude code
  • cli
  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add mishraaditya595/agent-team --skill team-init --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Team Init?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Team Init
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mishraaditya595-team-init/badge)](https://www.skillsdirectory.com/skills/mishraaditya595-team-init)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: team-init
description: Use when setting up agent-team in a product repo for the first time — creates .agent-team/, drafts project.md from the codebase, and writes the permission settings for hands-off runs. Also use (`team-init upgrade`) to bring a repo set up by an older agent-team version up to date.
metadata:
  kind: workflow
---

# team-init · `team-init upgrade`

Run once per product repo. Afterwards every role can work on this project. The person running it is the **owner** unless they say otherwise.

## Steps

1. **Check the repo.** It must be a git repo with a GitHub remote (`gh repo view` works). `D=$(agent-team default-branch)` (if `agent-team` isn't on PATH, use `python3 <team-build skill folder>/scripts/agent_team.py`; suggest running `install.sh`). If anything is missing, stop and say what.
2. **Create `.agent-team/`** with an empty `features/` folder, and add `.agent-team/worktrees/` to the repo's `.gitignore` (team-build keeps its worktrees there, inside the project, so tool permissions and sandboxes cover them). If `.agent-team/project.md` already exists (here, or on `agent-team/meta` — `git show origin/agent-team/meta:.agent-team/project.md`), don't redo it: run the **Upgrade** steps below instead, and mention that `team-init` from scratch is still possible if the owner asks for it explicitly.
3. **Draft `project.md`** from `references/project-template.md`. Fill it by reading only what's cheap and telling: README, package manifests (`pubspec.yaml`, `package.json`, `pyproject.toml`, …), CI config, test config, top-level folder names. Don't read the whole codebase. Keep it ≤ 60 lines. If top-level folders are their own git repos and gitignored here (a **workspace**), add `## Repos` (one `### <path>` per repo: `- Role:`, optional `- Branch:`, its `- Install/Build/Test:` from that repo's manifests/CI) and `## Cross-repo rules` (`- Order: …` earliest-shipping first, then `unknown — owner to fill`). Budget: ≤ 60 lines plus ≤ 8 per repo. Never write anything into the product repos. `## Owner`: the owner's name and `gh api user -q .login`. Write `unknown — owner to fill` rather than guessing positioning, voice or channels. Fill `## Intent docs` with the paths of any ADRs (`docs/adr*/`, `docs/decisions/`), PRDs or specs, `PRODUCT.md`, `CONTEXT.md` and `DESIGN.md` you find by listing (don't read them); `none` if there are none. If the project uses code generation the template's defaults don't cover, list its output globs under `## Diff excludes`.
4. **Write the permission settings** so the build workflow doesn't stop for prompts. First, `git status --porcelain -- .gitignore .claude/settings.json .codex/config.toml`: if any of them has uncommitted changes of the owner's, stop and ask them to commit or stash those first — the setup commit takes whole files, and must not sweep in their edits.
   - Claude Code: merge `references/claude-settings.json` into `.claude/settings.json`. Keep every existing key; add only missing allow entries. Replace `{{TEST_COMMANDS}}` with one `Bash(<cmd>:*)` entry per install/build/test command from `## Build & test` and, in a workspace, from each `### <path>` under `## Repos` (`agent-team upgrade` / `merged_allow` does this).
   - Codex: merge `references/codex-project.toml` into the project's `.codex/config.toml` (create it if needed; keep existing keys).
   - Gemini CLI: nothing to write; see the team-build skill's `references/dispatch-gemini.md` for its approval settings.
   Anything not on the list still prompts — that's intended.
5. **Commit and push only these paths.** If the checkout isn't on `$D`, stop and tell the owner. `agent-team docs-commit -m "chore: init agent-team" --title "agent-team: setup" .agent-team .gitignore .claude/settings.json .codex/config.toml`. `agent-team docs-commit` commits from a temporary worktree — never on your local default branch — and pushes to `$D`, or, if `$D` is protected, an `agent-team/meta` PR is still open, or `project.md` sets `docs-push: pr-only`, to `agent-team/meta`, opening or reusing its PR. Anything else the owner has staged or changed stays untouched.
6. If it went to `agent-team/meta`, tell the owner to merge that PR and run `agent-team pull` (or `git pull`) before running `team-build` (feature branches start from `$D`, and the permission settings apply only once they're in the checkout). `team-ideate` works before the merge, but may ask for permissions.
7. **Tell the owner** to read `project.md` once and fix anything wrong — especially `## Positioning & voice` and `## Channels`. Next step: run `team-ideate`.

## Upgrade (repos set up by an older version)

Adds only what's missing; never rewrites what the owner wrote.

1. Same checks as step 1, and the checkout must be on `$D` (else stop and tell the owner). `agent-team pull` (instead of `git pull`: it first puts back any doc copy `docs-pull` wrote that nobody edited, then pulls `--ff-only` and brings in docs still waiting on an `agent-team/meta` PR). If it fails, stop and show the owner its message.
2. `agent-team upgrade`. It adds missing `project.md` sections (filling `## Owner` from git/gh), merges the current permission allow-list (with this project's install/build/test commands) into `.claude/settings.json`, creates `.codex/config.toml` if missing, and adds `.agent-team/worktrees/` to `.gitignore`. It prints what changed.
3. If it printed `nothing — already up to date`, say so and stop.
4. Fill any new section you can from cheap reads (as in step 3 above; fill the drafted `### <path>` blocks the same way); leave voice, positioning and channels as `unknown — owner to fill`. If `## Intent docs` was added, list the repo for ADRs (`docs/adr*/`, `docs/decisions/`), PRDs or specs, `PRODUCT.md`, `CONTEXT.md` and `DESIGN.md` and write their paths, or `none` if there really are none — older repos are where these usually exist.
5. Commit only the paths it listed: `agent-team docs-commit -m "chore: upgrade agent-team setup" --title "agent-team: setup" <paths>` (see step 5 above).
6. Tell the owner what was added, and which sections still say `unknown — owner to fill`.

## Never

- Never overwrite an existing `.claude/settings.json` or `.codex/config.toml`; merge into them.
- Never add broad permissions (`Bash(*)`, full-auto/danger modes, `--approval-mode yolo`).
- Never force-push or bypass branch protection.

Files in this skill

  • SKILL.md5.2 KB
  • references/claude-settings.json678 B
  • references/codex-project.toml362 B
  • references/project-template.md1.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.