Designs, implements, and deploys Microsoft 365 Copilot agents using TypeSpec and ATK CLI. Provides architectural guidance, capability configuration, security patterns, and lifecycle management.
Ships in sebastienlevert-m365-copilot-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This comprehensive skill provides expert guidance on the Microsoft 365 Copilot agent development lifecycle: from architectural design through TypeSpec implementation to deployment and publishing using the Agents Toolkit (ATK) CLI.
⚠️ For creating new projects, use the m365-agent-scaffolder skill first ⚠️
🚨 CRITICAL DEPLOYMENT RULE 🚨
When using this skill to make edits to an agent, you MUST ALWAYS deploy the agent using atk provision before returning to the user. This ensures changes are immediately reflected in M365 Copilot. Never return to the user with undeployed changes.
Use this skill when:
Do NOT use this skill for creating new empty projects - use the m365-agent-scaffolder skill instead.
Follow these step-by-step instructions when working with M365 Copilot agents:
Action: Gather and analyze the agent requirements:
Why it's important: Clear requirements drive architectural decisions and ensure the agent meets user needs.
Action: Create a comprehensive architectural design:
Reference: Follow the Architectural Design section and patterns-and-frameworks.md
Action: Write type-safe agent code using TypeSpec:
@agent decorator@docReference: Follow TypeSpec Best Practices and official typespec-decorators.md
⚠️ IMPORTANT: After making any edits to TypeSpec code, you MUST compile and deploy the agent (Steps 4-5) before returning to the user.
Action: Compile TypeSpec to validate the implementation:
npm run compile
Why it's important: Compilation catches syntax errors and validates decorator usage before deployment.
Action: Provision required Azure resources and register the agent:
npx -p @microsoft/m365agentstoolkit-cli@latest atk provision --env local
Result: Returns a test URL like https://m365.cloud.microsoft/chat/?titleId=U_abc123xyz
Action: Test the agent in Microsoft 365 Copilot:
Action: Deploy to staging/production environments:
npx -p @microsoft/m365agentstoolkit-cli@latest atk provision --env prod
Reference: Follow deployment.md for environment management and CI/CD patterns
Action: Package and share the agent:
# Package the agent
npx -p @microsoft/m365agentstoolkit-cli@latest atk provision --env dev
# Share to tenant (for shared agents)
npx -p @microsoft/m365agentstoolkit-cli@latest atk share --scope tenant --env dev
Reference: See deployment.md for sharing strategies
RULE: When making any changes to an agent (TypeSpec code, instructions, capabilities, API plugins), you MUST complete the following workflow before returning to the user:
npm run compilenpx -p @microsoft/m365agentstoolkit-cli@latest atk provision --env localWhy this is critical:
Never skip deployment: Even for minor changes like updating instructions or conversation starters, always redeploy. M365 Copilot only sees the deployed version.
RULE: Every time you work on an agent project, check for and remove unused or obsolete files:
Files to check and potentially remove:
TODO.md or planning files no longer needed.bak, .old, .orig).env.old, .env.backup)Why this is critical:
Before returning to the user: Always verify the project contains only necessary, actively-used files.
Follow these best practices for successful M365 Copilot agent development:
| Category | Key Focus |
|---|---|
| Security | Least privilege scoping, credential management, input validation |
| Performance | Scoped queries, efficient API design, caching strategies |
| Error Handling | Graceful degradation, clear messages, retry logic |
| Testing | Conversation starters, edge cases, security testing |
| Compliance | Data residency, retention policies, RBAC |
| Maintainability | Documentation, naming conventions, version control |
| Conversation Design | Clear instructions, actionable starters, appropriate tone |
| Deployment | Environment strategy, CI/CD, version management |
Reference: best-practices.md for detailed guidelines.
Common workflow examples for M365 Copilot agent development:
| Example | Description |
|---|---|
| Compile and Validate | Local TypeSpec validation before deployment |
| Development and Provisioning | Full dev workflow with test URL |
| Provision and Share | Deploy and share agent with tenant users |
| Package for Distribution | Create distributable package for production |
Reference: examples.md for complete workflow scripts.
README.md (opens in a new tab)references/api-plugins.md (opens in a new tab)references/best-practices.md (opens in a new tab)references/common-pitfalls.md (opens in a new tab)references/conversation-design.md (opens in a new tab)references/deployment.md (opens in a new tab)references/examples.md (opens in a new tab)references/patterns-and-frameworks.md (opens in a new tab)references/security-guidelines.md (opens in a new tab)references/typespec-best-practices.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
m365-copilot, agents-toolkit, atk, agent-deployment, copilot-agent
2 skills in this plugin
Other plugins' skills for the same job
/sebastienlevert-m365-copilot-skills:m365-agent-developerfrom sebastienlevert-m365-copilot-skills
sebastienlevert-m365-copilot-skills@cascade-code-general-misc-4 is listed by joshuarweaver/cascade-code-general-misc-4 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-general-misc-4 --plugin sebastienlevert-m365-copilot-skills