Creates a new command module in server/commands/ following the { match(text, lcText, deps), execute(matchResult, deps) } shape used by all 21 existing modules. Use when user says 'add command', 'new bot command', 'add !something', 'create handler for X message', or when adding files to server/commands/. Handles admin-gate (ima !== 'admin'), deps destructuring, MessageFactory.text replies, registration in server/commands/index.js, and the required match() test in test/commands.test.js. Do NOT use for OAuth dialog logic (use bot-dialog skill), adaptive-card JSON authoring (use adaptive-card skill), card-submit handler routing changes inside TeamsActivityHandler (use bot-activity-handler skill), or editing the dispatcher in server/commands/index.js itself.
Writes node:test tests for the Teams Chat Bot. Use when user says 'add test', 'write a node:test', 'mock the consumer', 'test the queue', or creates files in test/*.test.js. Provides the canonical mock setup: `_setInternalsForTest({ redis, redisBot, adapter })` seam, hash-map-backed Redis mock with hget/hset/incr/pipeline/expire/lrem, adapter mock recording _calls[] with sentActivities/updatedActivities, NOTIF_TRACE_LOG=0 silencing, and beforeEach/after restoration. Do NOT use for Jest, Mocha, or Codeception — this project is strictly `node:test`.
Builds and enqueues notification envelopes onto Redis `notif:queue` in the canonical v=1 shape `{ v, id, ts, expires_at, room, type:'msg', message|card, extra:{ dedup_key, event_type, repo, _commit_sha, data }, fallback_webhook_url? }`. Covers channel resolution via `CHANNELS`, GitHub `dedup_key` auto-injection (`github:commit:{sha7}` / `github:pr:{repo}:{n}` / `github:issue:{repo}:{n}`), edit-window coalescing (`NOTIF_EDIT_WINDOW_MS`, 30 min), trackable batch-merge via `handleTrackableBatch`, announce-redirect via `decideAnnounceRedirect`, and dead-letter on `notif:dead`. Use when user says 'enqueue notification', 'queue a notification', 'add webhook event', 'send to notif queue', or modifies `server/queue/notificationConsumer.js`, `server/queue/filters.js`, `server/queue/channels.js`, or an external producer. Do NOT use for synchronous proactive sends via `POST /api/message` (those bypass the queue) or for daily-recap cards (`POST /api/dailyrecap` has its own pipeline).
Debugs notification-grouping bugs via `scripts/replay-notif.js` reading `.logs/notif-trace-YYYY-MM-DD.jsonl`. Covers `--mode timeline|grouped|raw`, filters (`--dedup`, `--commit`, `--room`, `--tick`, `--event`, `--kind`, `--since/--until`, `--activity`), and signature kinds (`recent_lookup`, `edit_skipped_no_convref`, `edit_fell_through`, `recent_saved`, `announce_redirect`, `batch_merge`, `batch_skipped`). Use when user reports 'commits not grouping', 'new message instead of edit', 'trace this dedup key', 'why did this fall through', or asks to inspect `notif:queue` historical behavior. Do NOT use for live-queue admin (use `!notif status`/`drain-dead`) or for non-queue bug investigation.
Expert knowledge for Azure AI Bot Service development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when building Azure AI bots with Direct Line/Web Chat, Teams/SMS channels, OAuth/SSO, skills, or proactive messages, and other Azure AI Bot Service related development tasks. Not for Azure Health Bot (use azure-health-bot), Azure Functions (use azure-functions), Azure App Service (use azure-app-service), Azure Logic Apps (use azure-logic-apps).
Optimize MongoDB client connection configuration (pools, timeouts, patterns) for any supported driver language. Use this skill when working/updating/reviewing on functions that instantiate or configure a MongoDB client (eg, when calling `connect()`), configuring connection pools, troubleshooting connection errors (ECONNREFUSED, timeouts, pool exhaustion), optimizing performance issues related to connections. This includes scenarios like building serverless functions with MongoDB, creating API endpoints that use MongoDB, optimizing high-traffic MongoDB applications, creating long-running tasks and concurrency, or debugging connection-related failures.
Help with MongoDB query optimization and indexing. Use only when the user asks for optimization or performance: "How do I optimize this query?", "How do I index this?", "Why is this query slow?", "Can you fix my slow queries?", "What are the slow queries on my cluster?", etc. Do not invoke for general MongoDB query writing unless user asks for performance or index help. Prefer indexing as optimization strategy. Use MongoDB MCP when available.
MongoDB schema design patterns and anti-patterns. Use when designing data models, reviewing schemas, migrating from SQL, or troubleshooting performance issues caused by schema problems. Triggers on "design schema", "embed vs reference", "MongoDB data model", "schema review", "unbounded arrays", "one-to-many", "tree structure", "16MB limit", "schema validation", "JSON Schema", "time series", "schema migration", "polymorphic", "TTL", "data lifecycle", "archive", "index explosion", "unnecessary indexes", "approximation pattern", "document versioning".