# Dùng với AI agent

> Skill cho Claude Code, Codex, Antigravity và tài liệu dạng llms.txt.

Nguồn: https://www.finex.vn/developers/tools/ai-skill

Nếu team bạn dùng AI coding agent, cài Skill **`finex-vpbank-card`** để agent viết code tích hợp đúng ngay từ đầu. Skill là một thư mục gồm hướng dẫn, tài liệu tra cứu, script và code mẫu; cùng một bản dùng được cho **Claude Code**, **Codex** và **Antigravity**.

- [Tải Skill (.zip)](https://www.finex.vn/developers/skills/finex-vpbank-card.zip): Giải nén ra thư mục `finex-vpbank-card/`.
- [Xem SKILL.md](https://www.finex.vn/developers/skills/finex-vpbank-card/SKILL.md): Đọc trước những gì Skill dặn agent.

## Cài đặt

Giải nén vào thư mục skills của công cụ bạn dùng. Đặt trong repo thì cả team cùng dùng được.

**Claude Code**

```bash
curl -fsSL https://www.finex.vn/developers/skills/finex-vpbank-card.zip -o /tmp/finex-skill.zip

# Trong repo (khuyên dùng)
mkdir -p .claude/skills && unzip -o /tmp/finex-skill.zip -d .claude/skills

# Hoặc cho mọi dự án trên máy
mkdir -p ~/.claude/skills && unzip -o /tmp/finex-skill.zip -d ~/.claude/skills
```

**Codex**

```bash
curl -fsSL https://www.finex.vn/developers/skills/finex-vpbank-card.zip -o /tmp/finex-skill.zip

# Trong repo
mkdir -p .agents/skills && unzip -o /tmp/finex-skill.zip -d .agents/skills

# Hoặc cho mọi dự án trên máy
mkdir -p ~/.agents/skills && unzip -o /tmp/finex-skill.zip -d ~/.agents/skills
# Khởi động lại Codex sau khi cài.
```

**Antigravity**

```bash
curl -fsSL https://www.finex.vn/developers/skills/finex-vpbank-card.zip -o /tmp/finex-skill.zip

# Trong workspace
mkdir -p .agents/skills && unzip -o /tmp/finex-skill.zip -d .agents/skills

# Hoặc cho mọi workspace
mkdir -p ~/.gemini/config/skills && unzip -o /tmp/finex-skill.zip -d ~/.gemini/config/skills
```

Codex và Antigravity cùng đọc `.agents/skills/`, nên giải nén một lần là đủ cho cả hai. Bản Codex cũ đọc `~/.codex/skills/`, bản Antigravity cũ đọc `~/.gemini/antigravity/skills/`. Nếu agent không thấy Skill, mở danh sách skill trong công cụ để kiểm tra.

## Dùng thế nào

Mở dự án backend và nói với agent việc bạn cần. Agent tự dùng Skill khi bạn nhắc tới Finex hay mở thẻ VPBank. Cũng có thể gọi thẳng: `/finex-vpbank-card` trong Claude Code, `$finex-vpbank-card` trong Codex.

```text
Tích hợp Finex mở thẻ VPBank vào backend Express của tôi: hàm ký request,
endpoint nhận callback, và API để app đọc next_step. Chạy thử sandbox với số 0900000001.
```

```text
Gọi POST /v1/partner/leads có tên tiếng Việt thì bị 401 INVALID_SIGNATURE. Tìm giúp nguyên nhân.
```

```text
Rà code tích hợp Finex theo danh sách go-live, liệt kê những gì còn thiếu.
```

Skill dặn agent đọc key từ biến môi trường `FINEX_API_KEY`, `FINEX_API_SECRET`, `FINEX_CALLBACK_SECRET`. Đừng dán secret vào khung chat, và chỉ dùng key sandbox khi cho agent chạy thử.

## Trong Skill có gì

```text
finex-vpbank-card/
├── SKILL.md            hướng dẫn cho agent: quy tắc, quy trình, bảng next_step
├── references/         tài liệu tra cứu, sinh từ chính trang docs này
├── scripts/            sign.mjs, sign.py (tính chữ ký), verify_callback.mjs, smoke_test.mjs
└── templates/          client và callback mẫu cho Node.js, Python
```

## Docs cho AI khác

Nếu bạn dùng ChatGPT, Gemini hay Cursor, đưa cho chúng các file sau thay vì link trang web:

| File | Nội dung |
|---|---|
| [`/llms.txt`](https://www.finex.vn/llms.txt) | Mục lục toàn bộ tài liệu, có link tới bản Markdown của từng trang |
| [`/developers/llms-full.txt`](https://www.finex.vn/developers/llms-full.txt) | Toàn bộ tài liệu trong một file |
| [`/developers/openapi.json`](https://www.finex.vn/developers/openapi.json) | OpenAPI 3.1 |

Mỗi trang cũng có nút **Copy Markdown cho AI** ở đầu trang.
