agentleFS
wxxb789wxxb789/hoa/skills/teams-cdp/SKILL.md

teams-cdp

Skill2 starsChanged 50 days agoMITView on GitHub

Find people or existing group chats in Microsoft Teams, or send an authorized plain-text message to an exact person email or discovered group-chat identity through an already signed-in desktop Teams CDP session. Use for Teams UI discovery and sending, not channels, meetings, browser login, or Microsoft Graph.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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
  1. Very specific:

    Prefer open-window through the app-provided action in the existing profile.

    line 35
  2. Very specific:

    Keep request/response JSON, screenshots, HTML, and diagnostic data only in a dedicated .tmp-artifacts/<bundle>/ under the repository root.

    line 51
  3. Distinctive:

    Do not copy cookies/tokens, bypass tenant controls, disable sandboxing, change registry/environment settings, or enable remote CDP exposure.

    line 54
  4. Very specific:

    Use Bun >= 1.3 (verified with 1.4.4).

    line 61
  5. Distinctive:

    If the endpoint is unavailable, read Windows startup.

    line 87
  6. Very specific:

    Read the request and result contract before constructing a request.

    line 94
  7. Very specific:

    Run once. Success is JSON { "ok": true, "result": ...

    line 103
  8. Distinctive:

    Not supported: guaranteed concurrent global discovery, sending from an unverified per-chat/new-message popout, channels, meeting chats, …

    line 121

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Teams CDP

Outcome

Return structured person/group discovery results, or a new message identifier with the Teams UI's Sent receipt for an authorized exact destination. The next consumer is the calling agent or user. A click, an empty composer, an old matching message, or successful script exit without a receipt is not a send.

This skill reuses the current signed-in Teams desktop profile over local CDP. It can request the app's native new-message window; it does not create an independent profile, copy authentication, create a raw Teams browser page, call private Teams APIs, or change operating-system policy. It supports the observed English Teams v2 UI; unsupported or ambiguous UI fails explicitly.

Authority and safety

  • Choose an automation-owned native window before discovery/sending. An exact --target is mandatory, but naming a target does not authorize taking over the human's window. Sharing the main window requires explicit user permission and sequential use; never run it concurrently with human interaction.
  • Prefer open-window through the app-provided action in the existing profile. A blank or limited popout is a real stop, not permission to fall back to the main window. The observed client has not established a separate globally searchable main window; see native-window evidence.
  • Find is read-only with respect to messages, but may open existing conversations and change the selected chat/search. Send only when the user has authorized the exact recipient and message. Discovery results never authorize a send.
  • A person destination must be an explicit email, not a display name. A group destination must contain both the exact id and name returned by discovery. Duplicate names are resolved by ID; missing, changed, or ambiguous IDs stop before composing. Do not silently substitute a person, group, channel, or meeting.
  • Preserve drafts. The adapter refuses nonempty composers, visible draft text, or media/attachments detected in the composer footer. It never clears an existing draft. If composing fails, inspect the retained new draft manually.
  • An error at or after the single Send click is an uncertain outcome. Never retry automatically: inspect the exact chat first, even if the click timed out.
  • Keep request/response JSON, screenshots, HTML, and diagnostic data only in a dedicated .tmp-artifacts/<bundle>/ under the repository root. Discovery contains personal data; do not commit it or paste unrelated messages.
  • Do not copy cookies/tokens, bypass tenant controls, disable sandboxing, change registry/environment settings, or enable remote CDP exposure. If CDP is not available, obtain the approved application-start procedure rather than inventing flags or changing system configuration.

Prerequisites and commands

Use Bun >= 1.3 (verified with 1.4.4). With only Node/npm, replace bun with npx --yes bun. No global Playwright install or browser download is needed. The independent package includes locked dependencies and strict TypeScript settings. Install from skills/teams-cdp/scripts/ when authorized:

bun install --frozen-lockfile

For an installed skill, replace skills/teams-cdp with this SKILL.md's directory and quote paths containing spaces. Keep request JSON in the caller's private artifact directory. Only local CDP endpoints are supported:

bun skills/teams-cdp/scripts/teams.ts --help
bun skills/teams-cdp/scripts/teams.ts --endpoint http://127.0.0.1:9222 --targets
bun skills/teams-cdp/scripts/teams.ts --endpoint http://127.0.0.1:9222 --target EXACT_TARGET_ID --request .tmp-artifacts/teams-run/request.json

--request - reads JSON from stdin. Every request requires --target, an exact CDP target ID rather than a URL/title substring. The runner attaches only to the named existing page and disconnects without closing Teams. Target IDs and titles do not prove window ownership or recipient identity. Hidden bootstrap pages and native popouts can share the main window's URL. See the UI evidence when diagnosing target/selector drift.

If the endpoint is unavailable, read Windows startup. It supplies the observed process-scoped WebView2 launch procedure. Obtain permission for any necessary restart; never kill existing Teams processes, persist debug flags, or add automatic connection/send retries.

Workflow

Read the request and result contract before constructing a request. Validate it before UI mutation. Prefer open-window for an owned native popup; report unsupported capabilities rather than falling back to the main window.

An explicit person email can use the popup's recipient picker. Global find requires a full main window authorized for sequential use; its results are not a complete directory. Send only to the authorized exact email or unchanged group reference, preserving the text and line breaks without adding a signature.

Run once. Success is JSON { "ok": true, "result": ... } with a new message ID and Sent evidence. Errors use stderr and nonzero exit. Report the exact destination and receipt without unrelated private data. An uncertain outcome stops further sends until a human or authorized inspection has reconciled it.

Supported boundary

Supported: native new-message windows, person and existing non-meeting group discovery, and plain-text sends to exact identities. Global discovery needs the full search/profile frame. Empty new-message popups support exact-email persons; existing recipient selections, picker queries, and drafts cause a stop.

Existing-group popouts can send when their composer ID and rendered name match the request. Open one through More chat options → Open in new window while the group is already selected. This does not navigate the main chat. The adapter enforces directory identity and concrete composer/Send binding; UI evidence defines those checks.

Not supported: guaranteed concurrent global discovery, sending from an unverified per-chat/new-message popout, channels, meeting chats, group creation or membership changes, attachments, edits/deletes, rich formatting, mentions, localized UI variants, background delivery guarantees, or read receipts. A Sent UI receipt does not prove the recipient read the message. An existing chat draft, tenant restriction, changed UI, or missing identity evidence is a real stop, not permission to guess.

Provenance and verification limits

Live integration on 2026-10-28 verified an exact-email self-send with an empty line, a fresh Sent receipt, and an unchanged main-window conversation/draft. Other-person/group delivery and fresh-host activation remain unverified. Behavioral fixtures are in scripts/teams.test.ts; live evidence and its limits are recorded in UI evidence.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.