ms-teams-cli
Skill8 starsChanged 7 months agoApache-2.0View on GitHub
Perform Microsoft Teams operations using the Microsoft Graph API via curl. Use for posting channel messages, listing teams/channels, and looking up users.
- Sends data out
In this repository54 other files it gives its agents.
- alibabacloud-cliSkill
- ansible-cliSkill
- appdynamics-cliSkill
- argocd-cliSkill
- aws-cliSkill
- aws-cloudwatch-cliSkill
- azure-cliSkill
- bash-lintingSkill
- betterstack-cliSkill
- bitbucket-cliSkill
- chef-cliSkill
- code-reviewSkill
- commit-codeSkill
- create-dockerfileSkill
- create-terraform-helm-upgrade-planSkill
- datadog-cliSkill
- digitalocean-cliSkill
- dockerfile-lintingSkill
- dynatrace-cliSkill
- elasticsearch-cliSkill
- gcp-cliSkill
- github-cliSkill
- gitlab-cliSkill
- go-lintingSkill
- grafana-cliSkill
- grafana-loki-cliSkill
- graylog-cliSkill
- helm-cliSkill
- hetzner-cliSkill
- huaweicloud-cliSkill
- jaeger-cliSkill
- jenkins-cliSkill
- jira-and-confluence-cliSkill
- kibana-cliSkill
- kubernetes-cliSkill
- loggly-cliSkill
- maintenance-check-aws-eksSkill
- maintenance-create-ticket-on-jiraSkill
- mysql-cliSkill
- newrelic-cliSkill
- oci-cliSkill
- packer-cliSkill
- papertrail-cliSkill
- postgresql-cliSkill
- prometheus-cliSkill
- python-lintingSkill
- rollbar-cliSkill
- salesforce-cliSkill
- sentry-cliSkill
- slack-cliSkill
- splunk-cliSkill
- terraform-cliSkill
- terraform-lintingSkill
- vault-cliSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Update the tenant details below before using this skill:
- Very specific: line 30
All API calls use curl with the token read from the token file:
- Very specific: line 78
NEVER target any Azure AD tenant other than <your-tenant-id> configured above.
- Very specific: line 79
NEVER print, display, log, or store the contents of ~/.msteams/token or any credential value.
- Very specific: line 80
Always read the token inline with $(cat ~/.msteams/token) — never hardcode a token value in a command.
- Distinctive: line 81
NEVER post a channel or chat message without first confirming the exact team/channel and message text with the user.
- Distinctive: line 82
NEVER run DELETE operations without explicit user instruction — these are irreversible.
- Distinctive: line 83
If a team ID, channel ID, or user is unknown, always look it up first using the list/lookup endpoints above.
- Very specific: line 85
If ~/.msteams/token does not exist, inform the user and stop.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill 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
Microsoft Teams CLI Skill
Microsoft Teams has no official first-party CLI — use the Microsoft Graph API via curl for all operations.
Configuration
Update the tenant details below before using this skill:
| Setting | Value |
| Azure AD Tenant ID | <your-tenant-id> |
| App Registration Client ID | <your-client-id> |
| Token File | ~/.msteams/token |
Prerequisites (one-time setup by user)
Register an Azure AD application with ChannelMessage.Send, Team.ReadBasic.All, and Channel.ReadBasic.All Graph API permissions (admin consent required for most Teams scopes), then obtain an OAuth token and save it to the token file. Never print or display the token value. Do not perform these steps yourself.
mkdir -p ~/.msteams && echo "<your-access-token>" > ~/.msteams/token && chmod 600 ~/.msteams/tokenCommand Format
All API calls use curl with the token read from the token file:
curl -s -H "Authorization: Bearer $(cat ~/.msteams/token)" \
"https://graph.microsoft.com/v1.0/<endpoint>" | jq .Available API Endpoints
Read-only (safe, no confirmation needed)
| Endpoint | Method | Description |
/v1.0/me/joinedTeams | GET | List teams the authenticated user has joined |
/v1.0/teams/<team-id>/channels | GET | List channels in a team |
/v1.0/teams/<team-id>/channels/<channel-id>/messages | GET | List messages in a channel |
/v1.0/teams/<team-id>/channels/<channel-id>/messages/<message-id> | GET | Get a specific message |
/v1.0/users?$filter=<query> | GET | Look up users |
/v1.0/users/<user-id> | GET | Get a specific user |
Mutating operations (confirm with user before running)
| Endpoint | Method | Description |
/v1.0/teams/<team-id>/channels/<channel-id>/messages | POST | Post a message to a channel (confirm channel and text with user first) |
/v1.0/teams/<team-id>/channels | POST | Create a new channel |
/v1.0/chats/<chat-id>/messages | POST | Send a 1:1 or group chat message |
Never run — requires explicit human approval
| Endpoint | Method | Reason |
/v1.0/teams/<team-id>/channels/<channel-id> | DELETE | Irreversibly deletes a channel and its messages |
/v1.0/teams/<team-id>/channels/<channel-id>/messages/<message-id> | DELETE | Irreversible message deletion |
/v1.0/groups/<team-id> | DELETE | Irreversibly deletes the entire team |
/v1.0/teams/<team-id>/members/<membership-id> | DELETE | Removes a member from the team |
Example — post a message
curl -s -X POST -H "Authorization: Bearer $(cat ~/.msteams/token)" \
-H "Content-Type: application/json" \
--data '{"body": {"content": "<MESSAGE>"}}' \
"https://graph.microsoft.com/v1.0/teams/<team-id>/channels/<channel-id>/messages" | jq .Rules
- NEVER target any Azure AD tenant other than
<your-tenant-id>configured above. - NEVER print, display, log, or store the contents of
~/.msteams/tokenor any credential value. - Always read the token inline with
$(cat ~/.msteams/token)— never hardcode a token value in a command. - NEVER post a channel or chat message without first confirming the exact team/channel and message text with the user.
- NEVER run DELETE operations without explicit user instruction — these are irreversible.
- If a team ID, channel ID, or user is unknown, always look it up first using the list/lookup endpoints above.
- Access tokens for Graph API typically expire in ~1 hour — if a call fails with
401 Unauthorized, inform the user that the token likely needs refreshing rather than retrying repeatedly. - If
~/.msteams/tokendoes not exist, inform the user and stop. Do not attempt to find or guess the token.
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.

