Skill Setup
msgraph follows the Agent Skills specification. This page explains how to install it for different AI agents.
Directory Structure
Section titled “Directory Structure”The skill is contained in the skills/msgraph/ directory of the repository. When installed, the msgraph/ directory is placed in your agent’s skill folder:
msgraph/├── SKILL.md # Skill definition (required)├── scripts/│ ├── run.sh # macOS/Linux launcher│ ├── run.ps1 # Windows launcher│ └── bin/ # Binary cache (auto-populated)└── references/ ├── REFERENCE.md # API reference for agents ├── graph-api-index.db # Pre-processed OpenAPI index (SQLite FTS5) ├── samples-index.db # Samples index (SQLite FTS5) └── api-docs-index.db # API docs index (SQLite FTS5)No monorepo files (docs, CI, source code) are included in the installed skill.
Installation
Section titled “Installation”Option 1: Using skills.sh (Recommended)
Section titled “Option 1: Using skills.sh (Recommended)”npx skills add merill/msgraphThis automatically discovers the skill and installs it into your agent’s skill directory.
Option 2: Download from GitHub Releases
Section titled “Option 2: Download from GitHub Releases”Download msgraph.zip from the latest release and extract it:
curl -fsSL -o msgraph.zip https://github.com/merill/msgraph/releases/latest/download/msgraph.zipunzip msgraph.zip -d ~/.agent/skills/Option 3: Manual Symlink (for contributors)
Section titled “Option 3: Manual Symlink (for contributors)”If you’ve cloned the repo for development:
ln -s /path/to/msgraph/skills/msgraph ~/.agent/skills/msgraphHow the Agent Uses It
Section titled “How the Agent Uses It”- Discovery: The agent reads the
SKILL.mdfrontmatter (name + description) at startup - Activation: When the user asks about Microsoft 365 data, the agent loads the full
SKILL.md - Execution: The agent runs CLI commands via the launcher scripts
- Reference: If needed, the agent reads
references/REFERENCE.mdfor API details
Launcher Scripts
Section titled “Launcher Scripts”The launcher scripts (run.sh / run.ps1) handle platform management:
- Detect the platform (OS + architecture)
- Download the correct build for your platform
- Cache locally in
scripts/bin/ - Forward all arguments
# Via launcher script./msgraph/scripts/run.sh auth status
# Or directly with the CLImsgraph auth statusCustom Client ID
Section titled “Custom Client ID”If your organization requires a specific Entra ID app registration, set the environment variable before the agent runs:
export MSGRAPH_CLIENT_ID="your-custom-app-id"The agent skill automatically picks this up.