---
name: feishu-card-parser
description: |
  Parses Feishu interactive card messages to extract PR info.
  Used to handle PR notification cards from GitHub Actions.
---

# Feishu Card Parser

Parses Feishu interactive card messages to extract PR URL and metadata.

## Usage

```bash
python3 parse_card.py <message_id>
```

## What It Does

1. Get message details from Feishu API using message_id
2. Parse the interactive card structure
3. Extract PR URL from the card content
4. Return structured PR info (repo, pr_number, url)

## Output Format

```json
{
  "pr_url": "https://github.com/tidbcloud/dataflow-service/pull/123",
  "repo": "tidbcloud/dataflow-service",
  "pr_number": "123"
}
```

## Integration

This skill is triggered when the user mentions the bot under a Feishu card message.
The card typically contains a PR URL that can be extracted for AI review.
