Skip to content

Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.

skill/google-chat-api: Add Markdown support (Sept 2025 GA feature)

Jez2585fdef1ef1
diff --git a/skills/google-chat-api/SKILL.md b/skills/google-chat-api/SKILL.md
index ad51ef81..98283904 100644
--- a/skills/google-chat-api/SKILL.md
+++ b/skills/google-chat-api/SKILL.md
@@ -39,9 +39,9 @@ metadata:
# Google Chat API
**Status**: Production Ready
-**Last Updated**: 2025-11-29
+**Last Updated**: 2025-11-29 (Research verified: Markdown support, Material Design updates)
**Dependencies**: Cloudflare Workers (recommended), Web Crypto API for token verification
-**Latest Versions**: Google Chat API v1 (stable), [email protected] (unofficial helper)
+**Latest Versions**: Google Chat API v1 (stable), Cards v2 (Cards v1 deprecated)
---
@@ -168,6 +168,8 @@ Best for:
### Step 2: Design Cards (If Using Interactive Bot)
+**IMPORTANT**: Use Cards v2 only. Cards v1 was deprecated in 2025. Cards v2 matches Material Design on web (faster rendering, better aesthetics).
+
Cards v2 structure:
```json
{
@@ -201,6 +203,40 @@ Cards v2 structure:
- `image` - Images
- `decoratedText` - Text with icon/button
+**Text Formatting** (NEW: Sept 2025 - GA):
+
+Cards v2 supports both HTML and Markdown formatting:
+
+```typescript
+// HTML formatting (traditional)
+{
+ textParagraph: {
+ text: "This is <b>bold</b> and <i>italic</i> text with <font color='#ea9999'>color</font>"
+ }
+}
+
+// Markdown formatting (NEW - better for AI agents)
+{
+ textParagraph: {
+ text: "This is **bold** and *italic* text\n\n- Bullet list\n- Second item\n\n```\ncode block\n```"
+ }
+}
+```
+
+**Supported Markdown** (text messages and cards):
+- `**bold**` or `*italic*`
+- `` `code` `` for inline code
+- `- list item` or `1. ordered` for lists
+- ` ```code block``` ` for multi-line code
+- `~strikethrough~`
+
+**Supported HTML** (cards only):
+- `<b>bold</b>`, `<i>italic</i>`, `<u>underline</u>`
+- `<font color="#FF0000">colored</font>`
+- `<a href="url">link</a>`
+
+**Why Markdown matters**: LLMs naturally output Markdown. Before Sept 2025, you had to convert Markdown→HTML. Now you can pass Markdown directly to Chat.
+
**CRITICAL**:
- **Max 100 widgets per card** - silently truncated if exceeded
- **Widget order matters** - displayed top to bottom
diff --git a/skills/google-chat-api/templates/card-builder-examples.ts b/skills/google-chat-api/templates/card-builder-examples.ts
index e03f15b1..f19a5d34 100644
--- a/skills/google-chat-api/templates/card-builder-examples.ts
+++ b/skills/google-chat-api/templates/card-builder-examples.ts
@@ -2,9 +2,10 @@
* Google Chat Cards v2 - Builder Examples
*
* Ready-to-use card patterns for common use cases
+ * Updated: Nov 2025 - Markdown support examples
*/
-// Example 1: Simple Text Card
+// Example 1: Simple Text Card (HTML formatting)
export function createTextCard(title: string, message: string) {
return {
cardsV2: [{
@@ -21,6 +22,29 @@ export function createTextCard(title: string, message: string) {
}
}
+// Example 1b: Text Card with Markdown (NEW: Sept 2025 - better for AI agents)
+export function createMarkdownCard(title: string, markdown: string) {
+ return {
+ cardsV2: [{
+ cardId: `markdown-${Date.now()}`,
+ card: {
+ header: { title },
+ sections: [{
+ widgets: [{
+ textParagraph: {
+ text: markdown // Pass Markdown directly - no HTML conversion needed!
+ }
+ }]
+ }]
+ }
+ }]
+ }
+}
+
+// Usage with LLM output:
+// const llmOutput = "**Summary:**\n\n- Point 1\n- Point 2\n\n```python\nprint('hello')\n```"
+// return createMarkdownCard("AI Response", llmOutput)
+
// Example 2: Card with Buttons
export function createButtonCard(title: string, message: string, buttons: Array<{ text: string; action: string }>) {
return {