src/agents/plugins/claude/plugin/skills/msgraph/SKILL.md
Work with Microsoft 365 services via the Graph API — emails, calendar events, SharePoint sites (read and write), Teams chats and channel messages, OneDrive files, OneNote notebooks, contacts, and org chart. Use this skill whenever the user asks about their emails, inbox, unread messages, meetings, calendar, Teams messages or chats, channel messages, SharePoint documents, OneDrive files, OneNote notes or notebooks, colleagues, manager, direct reports, or any personal/organizational Microsoft data. Invoke proactively any time the user mentions Outlook, Teams, SharePoint, OneDrive, OneNote, or wants to interact with their Microsoft 365 account. The skill uses a local Node.js CLI (msgraph.js) that handles authentication, token caching, and all API calls.
npx skillsauth add codemie-ai/codemie-code msgraphInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill lets you interact with Microsoft 365 services on behalf of the user using the
Microsoft Graph API. The Node.js CLI at scripts/msgraph.js handles everything — no Python
or extra packages needed, only the Node.js that CodeMie already requires.
Check login status first — always run this before any other command:
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js status
Output interpretation:
Logged in as: [email protected] → proceed with any command belowNOT_LOGGED_IN → follow the Login Flow belowTOKEN_EXPIRED → session expired, also follow the Login Flow belownode ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js login
This opens the system browser for Microsoft authentication (PKCE flow). If the browser
does not open automatically, a URL will be printed in the terminal — navigate to it manually.
After successful sign-in, the token is cached at ~/.ms_graph_token_cache.json and all
subsequent commands run silently.
Use --force to re-authenticate even when already logged in:
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js login --force
If status returns NOT_LOGGED_IN or TOKEN_EXPIRED, tell the user:
"You need to log in to Microsoft first. Run this command in your terminal:
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js loginYour browser will open for Microsoft sign-in. If it doesn't open automatically, a URL will appear in the terminal — navigate to it to complete authentication."
# Your profile
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js me
# Your manager
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js org --manager
# Your direct reports
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js org --reports
# List recent emails (default 10)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails
# More emails
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --limit 25
# Unread only
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --unread
# Search emails
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --search "invoice Q4"
# Read a specific email by ID (copy ID from list output)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --read MESSAGE_ID
# Send an email
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --send [email protected] --subject "Hello" --body "Message text"
# Browse specific folder (inbox, sentitems, drafts, deleteditems, junkemail)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --folder sentitems --limit 5
# Machine-readable JSON output
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --json
# Upcoming events (default 10)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js calendar
# More events
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js calendar --limit 20
# Create an event
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js calendar --create "Team Standup" \
--start "2024-03-20T09:00" --end "2024-03-20T09:30" \
--location "Teams" --timezone "Europe/Berlin"
# Check availability for a time window
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js calendar --availability \
--start "2024-03-20T09:00:00" --end "2024-03-20T18:00:00"
# List followed/joined SharePoint sites
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js sharepoint --sites
# Browse files in a specific site (use ID from --sites output)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js sharepoint --site SITE_ID
# Browse a subfolder within a site
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js sharepoint --site SITE_ID --path "Documents/Reports"
# Download a file
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js sharepoint --download ITEM_ID --output report.xlsx
# List all Teams chats
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js teams --chats
# Read messages from a chat (use chat ID from --chats output)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js teams --messages CHAT_ID
# Send a message to a chat
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js teams --send "Hello team!" --chat-id CHAT_ID
# List teams you're a member of
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js teams --teams-list
# List root files
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onedrive
# Browse a folder
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onedrive --path "Documents"
# Upload a file
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onedrive --upload ./report.pdf --dest "Documents/report.pdf"
# Download a file by ID
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onedrive --download ITEM_ID --output local_copy.pdf
# File metadata
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onedrive --info ITEM_ID
# List all notebooks
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onenote --notebooks
# List sections in a notebook (use ID from --notebooks output)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onenote --sections NOTEBOOK_ID
# List pages in a section (use ID from --sections output)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onenote --pages SECTION_ID
# Read a page's content (use ID from --pages output)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onenote --read PAGE_ID
# Search pages across all notebooks
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onenote --search "meeting notes"
# Create a new page in a section
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onenote --create "My Note" \
--section SECTION_ID --body "Note content here"
# Machine-readable JSON output
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onenote --notebooks --json
# List channels in a team (use team ID from teams --teams-list)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js channels --team-id TEAM_ID --list
# Read recent messages in a channel
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js channels --team-id TEAM_ID --channel-id CHANNEL_ID --messages
# Post a message to a channel
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js channels --team-id TEAM_ID --channel-id CHANNEL_ID --send "Hello channel!"
# List online meetings in a date range (defaults to last 7 days)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js transcripts --start 2026-03-06
# List online meetings in a specific date range
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js transcripts --start 2026-03-06 --end 2026-03-07
# Find meetings by subject keyword and show their transcripts
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js transcripts --start 2026-03-06 --subject "standup"
# List transcripts for a known meeting ID
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js transcripts --meeting MEETING_ID
# Read transcript content (plain text, printed to stdout)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js transcripts --meeting MEETING_ID --transcript TRANSCRIPT_ID
# Save transcript to a file
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js transcripts --meeting MEETING_ID --transcript TRANSCRIPT_ID --output meeting.txt
# Download as VTT (timestamped captions format)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js transcripts --meeting MEETING_ID --transcript TRANSCRIPT_ID --vtt --output meeting.vtt
# Frequent collaborators (AI-ranked by Microsoft)
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js people
# Search people by name
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js people --search "Alice"
# Outlook address book contacts
node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js people --contacts
status → check loginemails --limit 15 → show resultsemails --read IDcalendar --limit 10sharepoint --sites → list sitessharepoint --site SITE_ID → browse files--path to drill into folders--download ITEM_ID if user wants the fileteams --chats → list chatsteams --messages CHAT_IDonenote --notebooks → list notebooksonenote --sections NOTEBOOK_ID → list sectionsonenote --pages SECTION_ID → list pages, or use onenote --search "keyword" to search directlyonenote --read PAGE_ID → display page contenttranscripts --start YYYY-MM-DD --subject "standup" → finds the meeting and lists transcript IDstranscripts --meeting MEETING_ID --transcript TRANSCRIPT_ID → reads full transcript texttranscripts --start YYYY-MM-DD → lists all online meetings for the daytranscripts --meeting MEETING_ID → lists available transcripts per meetingtranscripts --meeting MEETING_ID --transcript TRANSCRIPT_ID --output meeting.txt → saves each transcriptteams --teams-list → get the team IDchannels --team-id TEAM_ID --list → get the channel IDchannels --team-id TEAM_ID --channel-id CHANNEL_ID --send "message"org --manager or org --reports| Exit code | Meaning |
|-----------|---------|
| 0 | Success |
| 1 | API error (shown in output) |
| 2 | NOT_LOGGED_IN — user must run login |
When you see Permission denied errors, it means the OAuth scope isn't granted for that operation.
This can happen if the user's organization has restricted certain Graph API permissions.
None — the script uses only built-in Node.js modules (https, fs, path, os).
Node.js >= 18 is required, which is already a CodeMie prerequisite.
IMPORTANT: you must work with current date (get it from sh/bash)
tools
CodeMie Analytics expert — use this skill whenever the user asks about CodeMie usage data, AI adoption metrics, user leaderboards, CLI insights, spending, LiteLLM costs, token usage, or wants to build a dashboard/report from CodeMie or LiteLLM APIs. Also triggers for: "who uses CodeMie most", "show me AI analytics", "get spending data", "generate a report", "leaderboard", "cost analysis", "LiteLLM customer info", "enrich CSV with costs", "top performers", "AI champions", "tier distribution", or any custom analytics query against the platform. Always use this skill when CodeMie analytics, reporting, or cost data is involved.
tools
Manage CodeMie platform assets (assistants, workflows, datasources, integrations, skills, users, assistant-categories) directly from CLI using CodeMie SDK. Use when user says "create assistant", "list workflows", "update datasource", "delete assistant", "show my assistants", "get workflow details", "manage integrations", "create integration", "list integrations", "list llm models", "list embedding models", "list skills", "get skill", "create skill", "update skill", "delete skill", "publish skill", "import skill", "export skill", "attach skill", "list assistant categories", "get assistant category", "create assistant category", "delete assistant category", "who am i", "current user", "my profile", "user info", or any request to manage CodeMie platform resources. NOTE: For analytics requests (usage analytics, summaries, spending, users activity, leaderboards, etc.) use the codemie-analytics skill instead.
development
Build static HTML pages, reports, dashboards, and mockups that match the CodeMie UI design system. Use this skill whenever the user asks to create an HTML report, dashboard, analytics page, status page, data visualization page, or any static HTML document that should look like the CodeMie/EPAM AI/Run product. Also use it when the user says "make it look like CodeMie", "use the style guide", "dark-themed report", "CodeMie styles", or references the style-guide directory. Trigger for any HTML output task in a project that includes the style-guide folder. IMPORTANT: This skill MUST be used for ALL HTML generation requests — whenever a user asks for an HTML report, HTML analysis output, HTML dashboard, HTML visualization, or any HTML document. Claude must always use this skill to generate HTML in CodeMie styles to ensure consistent, professional, branded output across all HTML artifacts.
tools
This skill should be used when the user wants to report a bug, file an issue, or suggest a feature for the CodeMie Code CLI tool (codemie-ai/codemie-code repository on GitHub). Trigger phrases include: "report a bug", "open an issue", "submit an issue", "file a bug report", "something is broken in CodeMie", "report to GitHub", "create a GitHub issue", "suggest a feature for CodeMie", "request an enhancement", "I have a feature idea", "codemie is not working", or any mention of filing a report for CodeMie. This skill automatically collects diagnostic context (OS, Node.js, CLI version, installed agents, active profile, codemie doctor output, recent debug logs) and creates a structured GitHub issue via `gh issue create` with a user-confirmed preview step before submission.