new-command

Installation
SKILL.md

Building a New Command for CLI for Microsoft 365

Build a complete, production-ready CLI command from a GitHub issue spec. The workflow produces four artifacts: command implementation, unit tests, documentation page, and sidebar registration — then verifies everything against the PR checklist.

Prerequisites

A GitHub issue containing the command spec (name, description, options, examples, API details). If no issue is provided, STOP — ask the user for the issue URL or spec before proceeding.

Workflow

Execute each phase in order. Do not skip phases.

Phase 1: Parse the Spec

  1. Read the GitHub issue thoroughly.
  2. Extract: command name, description, service/workload, options (required/optional, types, aliases, allowed values, option sets), API endpoints used, example usage, and expected response shape.
  3. STOP — Verify API details are complete. The spec must include the full API endpoint(s), HTTP method(s), request payloads, and response shapes. If any of these are missing, ask the user to provide them or point to API documentation. NEVER fabricate or infer API request/response shapes — even if similar commands exist in the codebase.
  4. Identify the base class. Look at existing commands in src/m365/<service>/commands/ to determine which base class to extend (SpoCommand, GraphCommand, GraphApplicationCommand, AzmgmtCommand, etc.).
  5. Check that every word in the command name exists in the dictionary in eslint.config.mjs. If a word is missing, add it to the dictionary array (keep alphabetical order).
Installs
2
GitHub Stars
1.5K
First Seen
Sep 17, 2026