outlook-graph-skill
AGENTS.md2 starsChanged 49 days agoMITView on GitHub
Guidance for AI agents (and people) working in this repository. The Outlook skill for AI coding agents - Microsoft 365 email and calendar via the Microsoft Graph API. It follows the Agent Skills layout (skills/<name>/SKILL.md) and ships as a Claude Code plugin. Two audiences, kept apart deliberately. skills/*/SKILL.md and skills/*/references/ are loaded by the agent at runtime and ship with the skill. docs/ is for people and is not installed - so a fact needed at runtime belongs in the…
1 other project uses a version of this.
Adopted by
Most recently taken up by
- dbhq-uk/outlook-skillword for word, first seen Sep 25, 2026
Other versions1 project uses a version of this.
Word for word · 1
- dbhq-uk/outlook-skill★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- outlookSkill
- outlook-to-mdSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
No secrets in the repo - credentials live under ~/.dbhq/outlook/.
- Very specific: line 36
A verb that sends is a decision, not an edit: Every new verb must be classed in send_gap_test.sh as read or write, and only a verb that …
- Very specific: line 41
Never add ask rules to a user's settings without their yes.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Guidance for AI agents (and people) working in this repository.
What this is
The Outlook skill for AI coding agents - Microsoft 365 email and calendar via the Microsoft Graph API. It follows the Agent Skills layout (skills/<name>/SKILL.md) and ships as a Claude Code plugin.
Layout
.claude-plugin/plugin.json # plugin manifest
.github/workflows/validate.yml # CI: parse, unit tests, frontmatter, py matrix, macOS
hooks/ # Claude Code send gap: PreToolUse hook, ask rules, their installer
skills/outlook/SKILL.md # the live mail/calendar skill (agent-facing)
skills/outlook/scripts/ # bash scripts (jq + curl + az)
skills/outlook/scripts/lib/ # graph.sh: token code shared by the scripts, sourced not run
skills/outlook/references/ # commands.md (full command reference) and setup.md (manual setup); ship with the skill
skills/outlook-to-md/SKILL.md # the offline archive skill (agent-facing)
skills/outlook-to-md/scripts/ # outlook_to_md.py, run from its own .venv
docs/ # human-facing documentation, see docs/README.md
install.sh / install-codex.sh # local symlink installers (Claude / Codex)Two audiences, kept apart deliberately. skills/*/SKILL.md and skills/*/references/ are
loaded by the agent at runtime and ship with the skill. docs/ is for people and is not
installed - so a fact needed at runtime belongs in the skill, not only in docs/.
Conventions
- Scripts read credentials from
~/.dbhq/outlook/<account>/. Their one bundled dependency isscripts/lib/graph.sh, which holds the token code and is sourced from beside each script's real location (symlinks followed), so they run from any location. Token or refresh logic goes in that file, never back into a script: it was once copied into three scripts, and a bug in it existed three times. - SKILL.md references scripts via
${CLAUDE_SKILL_DIR}(the skill's own directory), which Claude Code substitutes for personal, project, and plugin installs alike.install.shtherefore symlinks the whole skill directory into~/.claude/skills/(no rewrite).install-codex.shstill rewrites the variable to the install path, since Codex does not substitute it. - Each skill folder stands alone.
npx skills addinstallsoutlookandoutlook-to-mdseparately, and the installers skip a skill whose tools are missing, so neither can count on the other being there. A skill names the other one ("the outlook skill'sexportverb") and says what to do without it; it never runs a path like${CLAUDE_SKILL_DIR}/../<other>/.docs_test.shfails if a SKILL.md or reference does. - Shell scripts use
set -e; errors go to stderr, structured output to stdout. - No secrets in the repo - credentials live under
~/.dbhq/outlook/. - A verb that sends is a decision, not an edit. Every new verb must be classed in
send_gap_test.shas read or write, and only a verb that reads goes in the script'sREAD_ONLY_VERBS. If it sends, it also needs a rule inhooks/ask-rules.jsonand a case inhooks/send-gate.sh, andsend_gate_test.shmust list it. Seedocs/architecture.md, "The send gap". - Never add ask rules to a user's settings without their yes.
install.shoffers them on a terminal or with--ask-rules, and not otherwise. - Scripts run on GNU tools (Linux, WSL) and on BSD tools with bash 3.2 (macOS). A
date,dd,sedorstatflag that only one of them has needs a fallback for the other, and no bash 4 features (associative arrays,mapfile,${x,,}). ThemacosCI job runs the offline suites with the Mac's own tools and/bin/bash. SKILL.mdloads in full on every trigger, so it keeps to the rules and a one-line command index, under 1,500 words. The full syntax goes inreferences/commands.md. A new verb needs a line in one of them;docs_test.shfails otherwise.- House style: British English, plain hyphens.
Validating a change
bash -n skills/outlook/scripts/*.sh # scripts parse
shellcheck skills/outlook/scripts/*.sh # lint (warnings should be clean)
bash skills/outlook/tests/helpers_test.sh # offline unit tests (no account needed)
bash skills/outlook/tests/token_test.sh # token refresh against a fake curl
bash skills/outlook/tests/calendar_test.sh # calendar verbs against a fake curl
bash skills/outlook/tests/mail_test.sh # draft From, send summary, reply-all and the chain marker, against a fake curl
bash skills/outlook/tests/chain_marker_test.sh # the live chain marker check, against a fake Exchange
bash skills/outlook/tests/move_id_test.sh # the live move ID check, against a fake Exchange
bash skills/outlook/tests/graph_test.sh # timeouts, 429/503 retries, batch-move failures, immutable IDs on every request
bash skills/outlook/tests/setup_test.sh # setup: public client, PKCE, no secret, the old-secret path
bash skills/outlook/tests/docs_test.sh # SKILL.md word limit and dashes; every verb documented; no path into the other skill
bash skills/outlook/tests/send_gap_test.sh # read-only mode and the calendar send flags
bash skills/outlook/tests/send_gate_test.sh # the hook, the ask rules and their installer
python3 -m pytest skills/outlook-to-md/tests/ -q # archive suite (no PST needed)
claude plugin validate . # manifest + structuretests/helpers_test.sh extracts the pure helpers (search encoding/paging/sort,
folder resolution, token-expiry logic) from the scripts and runs them against a
mocked Graph API, so it catches regressions without a live mailbox.
tests/token_test.sh sources scripts/lib/graph.sh and runs the real refresh
against a fake curl and a throwaway HOME, so it never touches real
credentials. Anything that needs real Graph calls (actual search results) still
wants a manual smoke test against a configured account.
Two such questions have their own scripts. The first: update mdbody keeps a reply's quoted
history by finding an empty <span data-mdreply-chain-start="1"></span> in the
draft, so it depends on Exchange keeping that span when it saves a draft. Run
this against a configured account after a change to the marker or to
update mdbody, or if a reply ever loses its history:
bash skills/outlook/tests/chain_marker_live.sh [--account <name>]It creates a draft with no recipients, writes the marker as mdreply does,
runs the real update mdbody, reads the body back after each step, and moves
the draft to Deleted Items. It sends nothing. Exit 0 means the history is safe;
exit 1 names the step that lost it. CI does not run it, because it needs a
real mailbox.
The second: every request asks Graph for immutable IDs, so a message should keep its ID when it moves. Run this after a change to how requests are made, or if an ID ever stops working after a move:
bash skills/outlook/tests/move_id_live.sh [--account <name>]It creates a draft with no recipients, moves it to Deleted Items with the real
delete, then reads it with the real read by the ID it had before the move.
It sends nothing, and the draft stays in Deleted Items. Exit 0 means the ID
survived the move.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

