teams-message-formatting
Skill60 starsChanged 2 months agoMITView on GitHub
Format or debug Microsoft Teams bot text, Adaptive Card text, and Graph chatMessage bodies. Use for markup, mentions, links, escaping, or client rendering issues; not card layout/actions or ordinary Teams conversation retrieval.
In this repository10 other files it gives its agents.
- bazelSkill
- clean-ddd-hexagonalSkill
- feature-slicingSkill
- mermaid-diagramsSkill
- modern-cssSkill
- modern-javascriptSkill
- postgres-drizzleSkill
- slack-block-kitSkill
- slack-mrkdwnSkill
- teams-adaptive-cardsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use the content, destination field, and existing payload or SDK as input.
- Distinctive: line 26
Keep visible mention text and its metadata synchronized.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Teams Message Formatting
Format supplied text for the Teams surface that receives it. The user's explicit instructions take precedence over this skill's guidelines.
Identify the text system
Use the content, destination field, and existing payload or SDK as input. Infer the text system from that context; ask for the destination when the missing choice changes syntax or mention metadata.
| Surface | Text format | Mention metadata |
Bot activity text | Bot Markdown or textFormat: "xml" subset | Activity entities |
Adaptive Card TextBlock / facts | Limited Markdown, no HTML | Root msteams.entities |
Graph chatMessage.body | text or Teams-restricted html | Body <at id="N"> plus matching mentions entry |
Hero/thumbnail card text | XML/HTML subset | Surface-specific; titles/subtitles are unformatted |
Slack mrkdwn is not Teams markup. Adaptive Card Markdown does not support headings, tables, images, code fences, or blockquotes; use supported card elements when those structures are requested. Text-only content does not require a card.
Preserve text and identity
- Escape for the receiving syntax, then serialize JSON. Do not concatenate unescaped user text into HTML/XML or mention markup.
- Keep visible mention text and its metadata synchronized. Use supplied or resolved IDs; display names are not identity evidence.
- Respect client differences, such as bot-list support on mobile. Do not change a transport just to fix punctuation.
- For a Graph payload, distinguish ordinary delegated sends from migration permissions. An app-only notification requires a supported delivery path; explain a missing capability without pretending the payload creates it.
Return the requested text, corrected string/object, or integration patch, preserving meaning and the known surface. Identify any missing runtime IDs or unverified client behavior. Posting is separate from formatting and requires the user's request or existing authorization.
References
Load the relevant format or metadata details only.
| Task | Reference |
| Bot Markdown/XML, card Markdown, hero cards, legacy text | MARKDOWN-HTML.md |
| Bot/card/Graph mentions; users, tags, teams, channels | MENTIONS.md |
| Graph HTML, code/emoji tags, attachments, permissions | GRAPH-CHATMESSAGE.md |
| Compact surface and syntax lookup | CHEATSHEET.md |
For card layout/actions, use teams-adaptive-cards if installed or the Teams card documentation. This text-formatting workflow does not depend on another skill being installed.
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.

