Skip to content

jezweb/claude-skills / plugins/integrations/skills/google-chat-messages

google-chat-messages

Verified

Send Google Chat messages via incoming webhooks — text, rich cards (cardsV2), threaded replies. TypeScript types, card builder utility, widget reference inline. Use whenever the user wants to post to Google Chat from a script, build a chatbot reply, send a notification card, build a Google Chat webhook integration, or troubleshoot card / threading issues.

FileKindSize
SKILL.mdskill md9.6 KB
assets/card-builder.tsscript1.5 KB
assets/types.tsscript1.5 KB
assets/webhook-sender.tsscript1.8 KB

assets/card-builder.ts

View on GitHub
import type { CardWithId, CardHeader, CardSection, WebhookMessage, Thread } from './types';

interface BuildCardOptions {
  cardId: string;
  title: string;
  subtitle?: string;
  imageUrl?: string;
  imageType?: 'SQUARE' | 'CIRCLE';
  sections: CardSection[];
}

/**
 * Build a cardsV2 webhook message.
 *
 * Usage:
 *   const message = buildCard({ cardId: 'my-card', title: 'Hello', sections: [...] });
 *   await sendWebhook(webhookUrl, message);
 */
export function buildCard(
  options: BuildCardOptions,
  thread?: { threadKey: string }
): WebhookMessage {
  const header: CardHeader = {
    title: options.title,
    ...(options.subtitle && { subtitle: options.subtitle }),
    ...(options.imageUrl && { imageUrl: options.imageUrl }),
    ...(options.imageType && { imageType: options.imageType }),
  };

  const card: CardWithId = {
    cardId: options.cardId,
    card: {
      header,
      sections: options.sections,
    },
  };

  const message: WebhookMessage = {
    cardsV2: [card],
  };

  if (thread) {
    message.thread = { threadKey: thread.threadKey };
  }

  return message;
}

/**
 * Build a simple text webhook message.
 *
 * Remember: Google Chat uses *bold*, _italic_, ~strikethrough~, `code`,
 * and <url|text> for links. NOT standard Markdown.
 */
export function buildText(
  text: string,
  thread?: { threadKey: string }
): WebhookMessage {
  const message: WebhookMessage = { text };

  if (thread) {
    message.thread = { threadKey: thread.threadKey };
  }

  return message;
}
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall