scaffold
Scaffold a new Microsoft Teams bot, Graph bot or tab on Teams SDK 2.1 with the Teams Developer CLI 3 Arguments: <project-name> [echo|graph|tab].
Files1
View on GitHubSKILL.mdteams-dev/skills/scaffold/SKILL.md
GitHub/teams-dev:scaffold
Creates a new Microsoft Teams project in the current directory with @microsoft/teams.cli 3.x. Arguments:
$1— project name (required), for examplequote-agent; the CLI turns it into a package name.$2— template (optional, defaultecho). The CLI 3.0 shipsecho,graphandtabfor TypeScript.
Steps
Check the toolchain. Node must be 22.12 or newer; the CLI must be installed:
node --version teams --versionIf
teamsis missing, install it withnpm install -g @microsoft/teams.cli(no dist-tag;latestis the stable 3.x line).Check the sign-in with
teams status --json. If the user is not logged in, stop and ask them to runteams loginthemselves; never run the sign-in on their behalf. Registration (step 5) needs it, scaffolding does not.Scaffold. Without a TTY the CLI does not prompt, and
--jsongives machine-readable output:teams project new typescript "$1" -t "${2:-echo}" --jsonIf it answers
Unknown template, runteams project new typescript --helpand use a template from that list.Install dependencies in the new directory:
cd "$1" && npm installTell the user what comes next, and invoke the skill that owns each step:
- Test without registering anything: the Agents Playground —
Skill: agents-playground. It needs the local-only opt-inDANGEROUSLY_ALLOW_UNAUTHENTICATED_REQUESTS=true; never put it in a committed file. - Register the bot, get credentials, set up a tunnel: the official walkthrough —
Skill: teams-sdk-teams-dev→references/guide-create-bot-infra.md(teams app create --name … --endpoint https://<tunnel-host>/api/messages --env .env). - Write code:
/teams-dev:add-feature, or the skillsmessaging,adaptive-cards,ai-agents.
- Test without registering anything: the Agents Playground —
Notes
echois a message-echo bot withnew App()and no plugins; pick it unless the user asked otherwise.graphsigns the user in and calls Microsoft Graph. It needs an Azure-managed bot with an OAuth connection (Skill: authentication) and is written in the SDK 2.0 style; offer to rewrite it toaddOAuthFlow.tabis a bot plus a Vite/React tab with@microsoft/teams.clientand anapp.function()(Skill: tabs).- There is no AI, MCP or A2A template. Scaffold
echoand add the feature with/teams-dev:add-feature ai. - Credentials land in
.env. Do not commit it, and do not paste real client ids, secrets or tenant ids into files that are committed.