# scripts/ ## new-agent.sh Scaffolds agent definition file(s) from a single root directory input. ``` Usage: new-agent.sh ``` Resolves scope by walking up from ``: a `type:`-bearing `apm.yml` found at or above `` → plugin/APM scope (single file at `/.apm/agents/.agent.md`; an `apm.yml` without `type:` is a marketplace-only manifest and is skipped); `` exactly `~` → user scope (`~/.claude/agents/` + `~/.copilot/agents/`); otherwise project scope (`/.claude/agents/` + `/.github/agents/`). Each file is a no-op if it already exists. See `--help` for full usage. Tests: `tests/new-agent.bats` (requires `bats-support` and `bats-assert`).