Borrowing it
Nothing to install: this file belongs to pnp/cli-microsoft365-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/pnp/cli-microsoft365-mcp-server/main/.github/skills/cli-microsoft365-script/SKILL.mdgit clone --depth 1 https://github.com/pnp/cli-microsoft365-mcp-serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/pnp/cli-microsoft365-mcp-server/cli-microsoft365-script)<a href="https://agentmods.dev/skills/pnp/cli-microsoft365-mcp-server/cli-microsoft365-script"><img src="https://agentmods.dev/badge/skills/pnp/cli-microsoft365-mcp-server/cli-microsoft365-script/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/pnp/cli-microsoft365-mcp-server/cli-microsoft365-script"><img src="https://agentmods.dev/badge/skills/pnp/cli-microsoft365-mcp-server/cli-microsoft365-script.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00085 | $0.03438 |
| Opus 5.5 | $0.00034 | $0.01375 |
| Sonnet 5.5 | $0.00017 | $0.00688 |
| Haiku 4.5 | $0.00009 | $0.00344 |
Grade A, and why
cli-microsoft365-script scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 464 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLI for Microsoft 365 — PowerShell Scripting
You are an expert at writing PowerShell scripts that use CLI for Microsoft 365 (m365) to automate Microsoft 365 management tasks. Follow these instructions when the user asks you to write a PowerShell script that uses CLI for Microsoft 365 commands.
Script Setup
Every PowerShell script using CLI for Microsoft 365 should start with proper configuration. Use this template as a starting point:
#!/usr/bin/env pwsh
$ErrorActionPreference = "Stop"
# Configure CLI for scripting
m365 cli config set --key "output" --value "json"
m365 cli config set --key "errorOutput" --value "stdout"
m365 cli config set --key "showHelpOnFailure" --value "false"
m365 cli config set --key "printErrorsAsPlainText" --value "false"
m365 cli config set --key "prompt" --value "false"
$env:CLIMICROSOFT365_NOUPDATE = "1"
# Ensure authentication
m365 login --ensure
Why these settings matter
| Setting | Value | Purpose |
|---|---|---|
output |
json |
Structured data for reliable parsing |
errorOutput |
stdout |
Allows PowerShell to capture errors in variables |
showHelpOnFailure |
false |
Prevents help text from polluting output |
printErrorsAsPlainText |
false |
Returns errors as JSON for structured handling |
prompt |
false |
Prevents interactive prompts that block automation |
The $env:CLIMICROSOFT365_NOUPDATE = "1" environment variable disables update checks to avoid delays in automated scripts.
Authentication
Check and establish authentication
Always use m365 login --ensure at the start of every script. This command checks if you are already authenticated and only prompts for login if necessary:
m365 login --ensure
Authentication for automation and CI/CD
For unattended scripts, use certificate-based or secret-based authentication:
# Certificate-based (recommended for CI/CD)
m365 login --authType certificate --certificateFile "C:\certs\app.pfx" --password $env:CERT_PASSWORD
# Client secret
m365 login --authType secret --secret $env:CLIENT_SECRET
# Managed identity (Azure-hosted only)
m365 login --authType identity
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 464 lines · 85 tokens per session scan A 8a07b7dcec28
cli-microsoft365-script is a skill published in the GitHub repository pnp/cli-microsoft365-mcp-server (135 stars, last pushed 4d ago), licensed MIT. It adds 85 tokens to every session and 3,438 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
cli-microsoft365-script compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cli-microsoft365-scriptpnp/cli-microsoft365-mcp-server | Skill | 135 | 4d ago | MIT | A | 85 | Claude Code, Codex |
| zdx-investigate-multi-app-outagezscaler/zscaler-mcp-server | Skill | 55 | 10d ago | MIT | A | 155 | Claude Code |
| microsoft365-expertpersonamanagmentlayer/pcl | Skill | 44 | 11d ago | Apache-2.0 | A | 78 | Claude Code |
| gke-compute-classesgoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 83 | Claude Code, Codex |
| gke-reliabilitygoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 85 | Claude Code, Codex |
| gke-workload-securitygoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 171 | Claude Code, Codex |
| nemo-automodel-launcher-configNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 30 | Claude Code |