Agent skill

aai-cli Microsoft 365

by aai-labs in aai-labs/agent-barn

Guides work with Outlook, OneDrive, SharePoint, Teams, Excel, To Do and Planner through aai-cli's Microsoft Graph commands, starting from which service owns the data.

Apache-2.0Auto-check passedDocuments & Office

Install aai-cli Microsoft 365

skills CLI
$ npx skills add aai-labs/agent-barn --skill aai-microsoft -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aai-labs/agent-barn aai-microsoft --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aai-labs/agent-barn.git skills-src && mkdir -p .claude/skills && cp -r skills-src/api/domains/agents/aai_cli_skills/bundled/skills/aai-microsoft .claude/skills/aai-microsoft && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
aai-microsoft
GitHub stars
109
Token cost
~1.2k tokens
SKILL.md length
654 words
Files
3 (incl. references)
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guides work with Outlook, OneDrive, SharePoint, Teams, Excel, To Do and Planner through aai-cli's Microsoft Graph commands, starting from which service owns the data.

  • Reading or sending Outlook mail and calendar items through a CLI
  • SKILL.md covers Choose the service first and Excel and Word are different…
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Updating a SharePoint document library or a list of structured records

What it does

Rather than listing commands first, the skill starts from the Microsoft 365 ownership model: Outlook or Exchange owns a user's mail, calendar and contacts, OneDrive is a user's personal file area, SharePoint is the shared content layer with document libraries and list items, Teams is the conversation layer whose channel files actually live in SharePoint, Microsoft To Do is personal task management and Planner is shared plan and task management attached to a group or team. A generic microsoft request command reaches the broader Graph API when a typed command does not cover the needed operation.

Excel and Word are treated differently. microsoft excel calls the Graph workbook API for worksheets, ranges, tables and rows, and it needs a delegated profile with Files.ReadWrite access since Graph has no application-permission path for workbook operations; a SharePoint workbook also needs a document-library drive id. Word files have no editor in the CLI at all: Graph exposes .docx as plain driveItem content, so the agent downloads the file with microsoft files or microsoft sharepoint files, edits it with an external library, then uploads the full replacement, with a reminder to consider backups, version history and concurrent edits first.

When your agent uses it

  • Reading or sending Outlook mail and calendar items through a CLI
  • Updating a SharePoint document library or a list of structured records
  • Editing cells or tables in an Excel workbook stored in OneDrive or SharePoint
  • Moving a task between buckets in a Planner plan

Example prompts

  • “Read my unread Outlook mail from today using aai-cli.”
  • “Update the budget numbers in this SharePoint Excel workbook's Q3 table.”
  • “Add a new task to the Planner plan's Design bucket.”
  • “Download this Word document from OneDrive so I can edit it externally.”

Requirements

  • aai-cli configured with Microsoft Graph credentials
  • A delegated Graph profile with Files.ReadWrite for Excel workbook operations

What it can do on your machine

Read from SKILL.md and the folder at commit df5e0a7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

aai-cli Microsoft 365 loads about 1.2k tokens when it runs, and up to ~6.3k if it reads all its reference files. Until then it costs about 57 tokens; SKILL.md has 654 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aai-labs/agent-barn at commit df5e0a7, republished under its Apache-2.0 licence (© aai-labs). 654 words, ~1,230 tokens.

Download SKILL.mdSave it as .claude/skills/aai-microsoft/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
aai-microsoft
description
Work with Microsoft 365 through aai-cli by choosing the right Microsoft service and resource model, then using durable Graph credentials for Outlook, OneDrive, SharePoint, Teams, Excel, To Do, and Planner workflows.

aai-cli Microsoft Graph

Use this skill for Microsoft 365 work through aai-cli microsoft. Start from the user's intent and Microsoft 365 ownership model, not from the command list. Read the concepts reference before a cross-service or file-editing workflow.

Choose the service first

  • Outlook / Exchange owns a user's mail, calendar, and contacts. Use it for communication and scheduling tied to a mailbox.
  • OneDrive is a user's personal work-file area. Use it for files owned or staged by one user, even when those files may later be shared.
  • SharePoint is the shared content layer. A site contains document libraries (drive resources) for files and lists for structured rows/columns. Use document-library file commands for shared documents; use list-item commands for records such as requests, assets, or statuses.
  • Teams is the collaboration/conversation layer over teams and channels. Read channel messages and membership there, but treat channel files as SharePoint content. A standard channel uses the team's SharePoint site; private and shared channels can use separate sites.
  • Microsoft To Do is user-centered personal task management. Use it when the task belongs in one user's lists and daily workflow.
  • Planner is shared plan/task management, commonly attached to a Microsoft 365 group or Team. A plan contains buckets, and buckets organize tasks.
  • Microsoft Graph is the common API surface across these products. Use microsoft request only when the needed Graph operation lacks a typed command.

Excel and Word are different kinds of files

  • Excel workbooks: microsoft excel calls the documented Graph workbook API for worksheets, ranges, tables, and table rows. It requires a delegated profile with Files.ReadWrite access; application profiles are rejected because Graph does not support application permissions for workbook operations. For SharePoint workbooks, pass the document-library --drive-id.
  • Word documents: Graph exposes .docx files as driveItem content, not as paragraphs or tables. There is no microsoft word editor in this CLI. Download the file with microsoft files or microsoft sharepoint files, edit it with an external library/program, then upload the complete replacement. Consider a backup, version history, concurrent edits, and features the external library may not preserve.
  • Teams files: channel files are SharePoint files, so use the SharePoint file workflow rather than treating them as Teams messages.

Read Microsoft 365 concepts and routing before acting when the request crosses products, refers to a Team or SharePoint URL rather than IDs, or leaves ownership/visibility ambiguous. It explains resource relationships, identifier choice, auth choice, and common workflows.

Show full SKILL.md (255 more words)Show less

Confirm the active profile or pass --profile. App-only profiles are best for unattended organization-owned automation. Delegated profiles act on behalf of one user and are required by this CLI for complete Microsoft To Do CRUD. Both obtain short-lived access tokens automatically from credentials saved in the encrypted secret store; never request or copy an access token into a command.

Prefer typed commands for supported operations. Use microsoft request only for a Graph endpoint without a typed command. Writes through request require --allow-write.

Most user resources accept --user-id; otherwise they use profile.user_id. IDs belong to different resource types and are not interchangeable: a Team/group ID is not a site, drive, list, channel, plan, or bucket ID. SharePoint list commands require site and list IDs. Use microsoft files for OneDrive and the explicit microsoft sharepoint files commands with --drive-id for a SharePoint document library. Use microsoft excel with --item-id or --path for workbook operations. Planner task update/delete require the current @odata.etag from a preceding get/create/update response.

Treat creates, sends, updates, and deletes as external side effects. Read the target first when practical, use stable identifiers, and report what changed. Supply request bodies through --json PATH or --json - for complex or sensitive values rather than shell-inline JSON.

List commands aggregate Graph pages up to --limit and return the provider's value array. Successful output is JSON on stdout; errors are structured JSON on stderr. Downloaded file bytes go only to --output.

See the command reference only after choosing the service/resource. It contains exact command shapes, bodies, and mutation mechanics.

© aai-labs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in api/domains/agents/aai_cli_skills/bundled/skills/aai-microsoft of aai-labs/agent-barn.

  • SKILL.md
  • references/command-reference.md
  • references/microsoft-365-concepts.md

Open the folder on GitHubat commit df5e0a7

Compare with similar skills

aai-cli Microsoft 365 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

aai-cli Microsoft 365 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
aai-cli Microsoft 365 this skillaai-labs/agent-barn109—~1.2kAutomated safety check: PassApache-2.0
Add Data Sourcemicrosoft/power-platform-skills9791 repos~1.1kAutomated safety check: PassMIT
Add Excelmicrosoft/power-platform-skills979—~796Automated safety check: NotesMIT
Sharepoint Safe HTMLpnp/sharepoint-skills132—~6.4kAutomated safety check: PassMIT
Msgraphcodemie-ai/codemie-code294—~4.1kAutomated safety check: PassApache-2.0
Workiqmicrosoft/work-iq1k—~15kAutomated safety check: PassCustom licence

Similar skills

  • Add Data Source

    microsoft/power-platform-skills

    Official

    Guide the user to add a data source, connection, or API connector to a Canvas App via Power Apps Studio, then verify and continue.

    979 GitHub starsUsed in 1 repo~1.1k tokens
    Documents & OfficeAuto-check passed
  • Add Excel

    microsoft/power-platform-skills

    Official

    Adds Excel Online (Business) connector to a Power Apps code app.

    979 GitHub stars~796 tokensUpdated today
    Documents & OfficeAuto-check: notes
  • Sharepoint Safe HTML

    pnp/sharepoint-skills

    Creates accessible, single-file HTML artifacts that render reliably in SharePoint, OneDrive, Teams, File Viewer, and embedded iframe preview surfaces.

    132 GitHub stars~6.4k tokensUpdated 3 days ago
    Documents & OfficeAuto-check passed
  • Msgraph

    codemie-ai/codemie-code

    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, Planner task…

    294 GitHub stars~4.1k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Workiq

    microsoft/work-iq

    Official

    WorkIQ tools for Microsoft 365 workplace data and actions. An agent skill from microsoft/work-iq.

    1k GitHub stars~15k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • Workiq Preview

    microsoft/work-iq

    Official

    WorkIQ tools for Microsoft 365 workplace data and actions. An agent skill from microsoft/work-iq.

    1k GitHub stars~3.3k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed

More from aai-labs/agent-barn

All 12 skills in this repo
  • aai-cli Spreadsheet Editor

    aai-labs/agent-barn

    Uses aai-cli to create and edit local Excel and CSV files, manage sheet tabs and read, update or clear cell ranges.

    109 GitHub stars~608 tokensUpdated yesterday
    Auto-check passed
  • aai-cli Google Drive

    aai-labs/agent-barn

    Finds, inspects, downloads and uploads Google Drive files from the command line with aai-cli, including exports of Docs, Sheets and Slides, and read-only sharing checks.

    109 GitHub stars~463 tokensUpdated yesterday
    Auto-check passed
  • OpenPanel Analytics Reader

    aai-labs/agent-barn

    Reads OpenPanel analytics through aai-cli: projects, raw event exports, aggregated insights for pages, referrers, devices and geography, and user profiles.

    109 GitHub stars~469 tokensUpdated yesterday
    Auto-check passed
  • Aai Pipedrive

    aai-labs/agent-barn

    Use aai-cli to manage Pipedrive leads, persons, organizations, deals, labels, activities, notes, file attachments, field definitions, users, pipelines and stages, deal flow/stage history, and synced…

    109 GitHub stars~518 tokensUpdated yesterday
    Auto-check passed
  • Aai Bitbucket

    aai-labs/agent-barn

    Use aai-cli to inspect and manage Bitbucket repositories, pull requests, branches, commits, source files, comments, and pipelines.

    109 GitHub stars~256 tokensUpdated yesterday
    Auto-check passed
  • Aai Confluence

    aai-labs/agent-barn

    Use aai-cli to inspect and manage Confluence spaces, pages, comments, attachments, and page moves.

    109 GitHub stars~199 tokensUpdated yesterday
    Auto-check passed

Questions about aai-cli Microsoft 365

What does aai-cli Microsoft 365 do?

Guides work with Outlook, OneDrive, SharePoint, Teams, Excel, To Do and Planner through aai-cli's Microsoft Graph commands, starting from which service owns the data. Rather than listing commands first, the skill starts from the Microsoft 365 ownership model: Outlook or Exchange owns a user's mail, calendar and contacts, OneDrive is a user's personal file area, SharePoint is the shared content layer with document libraries and list items, Teams is the conversation layer whose channel files actually live in SharePoint, Microsoft To Do is personal task management and Planner is shared plan and task management attached to a group or team. A generic microsoft request command reaches the broader Graph API when a typed command does not cover the needed operation.

When should I use aai-cli Microsoft 365?

aai-cli Microsoft 365 fits situations like: reading or sending Outlook mail and calendar items through a CLI; updating a SharePoint document library or a list of structured records; editing cells or tables in an Excel workbook stored in OneDrive or SharePoint; moving a task between buckets in a Planner plan.

How do I install aai-cli Microsoft 365 in Claude Code?

Run `npx skills add aai-labs/agent-barn --skill aai-microsoft -a claude-code`. Or copy the skill folder (api/domains/agents/aai_cli_skills/bundled/skills/aai-microsoft in aai-labs/agent-barn) into .claude/skills/aai-microsoft in your project. Claude Code loads it when a task matches its description.

How do I install aai-cli Microsoft 365 in Codex?

Run `npx skills add aai-labs/agent-barn --skill aai-microsoft -a codex`. Or copy the skill folder (api/domains/agents/aai_cli_skills/bundled/skills/aai-microsoft in aai-labs/agent-barn) into .agents/skills/aai-microsoft in your project. Codex loads it when a task matches its description.

Can I use aai-cli Microsoft 365 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aai-labs/agent-barn --skill aai-microsoft -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/aai-microsoft, .gemini/skills/aai-microsoft, .github/skills/aai-microsoft and .opencode/skills/aai-microsoft in your project.

What does aai-cli Microsoft 365 need to run?

SKILL.md names no scripts, command-line tools or credentials: aai-cli Microsoft 365 is instructions for the agent only. Our summary lists: aai-cli configured with Microsoft Graph credentials; A delegated Graph profile with Files.ReadWrite for Excel workbook operations.

Does aai-cli Microsoft 365 access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is aai-cli Microsoft 365 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does aai-cli Microsoft 365 use?

aai-cli Microsoft 365 is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does aai-cli Microsoft 365 use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.1k tokens, read only when the agent opens those files.

What are the alternatives to aai-cli Microsoft 365?

Skills that share tags, products or a category with aai-cli Microsoft 365: Add Data Source (microsoft/power-platform-skills, 979 stars), Add Excel (microsoft/power-platform-skills, 979 stars), Sharepoint Safe HTML (pnp/sharepoint-skills, 132 stars) and Msgraph (codemie-ai/codemie-code, 294 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains aai-cli Microsoft 365?

aai-labs (a GitHub organization) maintains it in aai-labs/agent-barn, which has 109 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.

Source: aai-labs/agent-barn on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.