microsoft-security-agent-toolkit
Copilot instructions2 starsChanged 5 months agoMITView on GitHub
This file is automatically loaded as context by GitHub Copilot Chat in VS Code (and respected by most other VS Code AI agents) when working in this repo. Always read HANDOFF.md at the repo root before making any change. It contains the design decisions, conventions, and open work prioritization that you will not be able to infer from the code alone. The action layer for AI agents working on Microsoft Security. Pairs with microsoft-security-skills (skills give the agent knowledge; this…
- Reads credentials
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this copilot-instructions.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
No live tenant calls in tests, demos, or samples: Use synthetic data.
- Very specific: line 40
Do not rename these without updating INTEGRATIONS.md in both this repo and microsoft-security-skills.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
Copilot / AI agent instructions for microsoft-security-agent-toolkit
This file is automatically loaded as context by GitHub Copilot Chat in VS Code (and respected by most other VS Code AI agents) when working in this repo.
Read this first
Always read HANDOFF.md at the repo root before making any change. It contains the design decisions, conventions, and open work prioritization that you will not be able to infer from the code alone.
What this repo is
The action layer for AI agents working on Microsoft Security. Pairs with microsoft-security-skills (skills give the agent knowledge; this toolkit lets it act on live tenant data).
Status: preview. Scaffold complete; MCP server implementations pending.
Hard rules
- Never log or commit a tenant secret.
.envis gitignored. Do not add it back. Do not paste realCLIENT_SECRET/ tokens into commits, tests, or docs. - Every write tool (anything that mutates tenant state) must take an explicit
confirm: trueparameter, must be marked(write)in the server README's tool table, and must use the separate write-app registration documented indocs/permissions-required.md. - Skills do not bundle this toolkit. They only declare
tools_requiredin front-matter. The host routes the declaration to whichever provider is registered. Do not change this contract without updating both repos. - No offensive tooling. This is defensive-and-governance only. Generic red-team content belongs elsewhere.
- No live tenant calls in tests, demos, or samples. Use synthetic data.
Conventions
- Conventional-commit-ish messages (
scaffold:,feat(sentinel-mcp):,docs:,kql:). Always includeCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>when AI-assisted. - Branch off
main, open a PR — do not merge directly. - One server / one snippet pack / one demo per PR.
- KQL files in
kql-snippets/must have the header documented inkql-snippets/README.md(Title / MITRE / Data source / Use case / Tuning / Author / License). - MCP server READMEs must follow the contract documented in
HANDOFF.md(Tool ID table → Configuration → Alternatives → Cross-links).
Tool surface (the contract you are building toward)
The full skill ↔ tool matrix is in INTEGRATIONS.md. Stable tool IDs:
sentinel.run_kql,sentinel.list_incidents,sentinel.get_incident,sentinel.update_incident(write)defender_xdr.list_alerts,defender_xdr.get_incident,defender_xdr.run_advanced_hunting,defender_xdr.update_incident(write),defender_xdr.isolate_device(write)graph.signins,graph.risky_users,graph.directory_audit,graph.revoke_sessions(write),graph.disable_user(write)purview_audit.search,purview_audit.export
Do not rename these without updating INTEGRATIONS.md in both this repo and microsoft-security-skills.
Companion repo
microsoft-security-skillsv0.2.0, 88 skills.- Validators:
validation/check-structure.mjs(offline),validation/check-links.mjs(network). - Quirk: the section header
## Approachmust match literally; use### Subsectionunderneath, never## Approach (X).
When stuck
Pick the topmost unchecked item from the "Open work" section in HANDOFF.md. Phase 1 (sentinel-mcp end-to-end) is currently the highest-ROI starting point.
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.

