Skip to content
Agentmart
Submit a tool

api-endpoint-design

API endpoint design and testing for vehicle insurance data platform.

Skill by FDU-INS

IndexedApache-2.0★ 80
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/fdu-ins-api-endpoint-design

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

API endpoint design and testing for vehicle insurance data platform. Use when designing new API endpoints, testing existing ones, validating response formats, or debugging API issues. Covers 11 core endpoints including 3 new pie chart distribution endpoints, parameter validation, error handling, and integration patterns.

Use cases: design, backend, testing, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/api-endpoint-design

Tools it pre-approves 4

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Read,
  • Edit,
  • Grep,
  • Glob

What's inside

Skill name
api-endpoint-design
Description
API endpoint design and testing for vehicle insurance data platform. Use when designing new API endpoints, testing existing ones, validating response formats, or debugging API issues. Covers 11 core endpoints including 3 new pie chart distribution endpoints, parameter validation, error handling, and integration patterns.
License
Apache-2.0
Allowed tools
Read,, Edit,, Grep,, Glob
Instructions
745 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Agent Skills spec issues

  • body: 745 lines (spec recommends under 500)

Files (1)

  • SKILL.md

SKILL.md (first lines)

# API Endpoint Design

REST API design specifications for vehicle insurance data analysis platform.

**Key Files**:
- [backend/api_server.py](../../backend/api_server.py) - Flask API server
- [frontend/src/services/api.js](../../frontend/src/services/api.js) - Frontend API client

**Related Docs**:
- See [TESTING_TEMPLATE.md](../testing-and-debugging/TESTING_TEMPLATE.md) for unit test templates
- See [COMMON_ISSUES.md](../testing-and-debugging/COMMON_ISSUES.md) for troubleshooting

---

## 📚 一、API 端点清单

### 概览表格

| 端点 | 方法 | 功能 | 优先级 |
|------|------|------|--------|
| `/api/health` | GET | 健康检查 | P0 |
| `/api/latest-date` | GET | 获取最新日期 | P0 |
| `/api/refresh` | POST | 刷新数据 | P0 |
| `/api/filter-options` | GET | 获取筛选选项 | P0 |
| `/api/kpi-windows` | POST | KPI 三口径数据 | P0 |
| `/api/week-comparison` | POST | 周对比图表数据 | P0 |
| `/api/insurance-type-distribution` | POST | 险别组合占比 | P0 |
| `/api/premium-range-distribution` | POST | 业务员保费区间占比 | P0 |
| `/api/renewal-type-distribution` | POST | 新转续占比 | P0 |
| `/api/policy-mapping` | GET | 保单映射信息 | P1 |
| `/api/staff-performance-distribution` | POST | 业务员业绩分布 | P1 |

---

### 1.1 `/api/health` - 健康检查

**位置**: [api_server.py:114-120](../../backend/api_server.py#L114-L120)

**请求**:
```http
GET /api/health
```

**响应**:
```json
{
  "status": "healthy",
  "message": "API服务运行正常"
}
```

**测试示例**:
```bash
curl http://localhost:5001/api/health
```

---

### 1.2 `/api/latest-date` - 获取最新日期

**位置**: [api_server.py:96-111](../../backend/api_server.py#L96-L111)

**响应**:
```json
{
  "success": true,
  "latest_date": "2025-11-08"
}
```

**错误响应**:
```json
{
  "success": false,
  "message": "获取最新日期失败: 未找到数据文件"
}
```

**测试示例**:
```bash
curl http://localhost:5001/api/latest-date
```

---

### 1.3 `/api/refresh` - 刷新数据

**位置**: [api_server.py:21-37](../../backend/api_server.py#L21-L37)

**请求**: `POST /api/refresh`

**响应**:
```json
{
  "success": true,
  "message": "数据刷新成功",
  "latest_date": "2025-11-08"
}
```

**注意事项**:
- ⚠️ 此操作较耗时(大文件可能 10-30 秒)
- ⚠️ 前端应显示加载状态
- ⚠️ 建议设置 60 秒超时

**测试示例**:
```bash
curl -X POST http://localhost:5001/api/refresh
```

---

### 1.4 `/api/filter-options` - 获取筛选选项

**位置**: [api_server.py:123-138](../../backend/api_server.py#L123-L138)

**响应**:
```json
{

From FDU-INS/Insurance-Skills, Apache-2.0.

More from FDU-INS/Insurance-Skills

Signals

Stars
80
Forks
18
Open issues
1
Last commit (this folder)
May 18, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from FDU-INS

Cite this page

api-endpoint-design skill. Agent Mart. https://agentmart.dev/skills/fdu-ins-api-endpoint-design (last updated 2026-10-24)