← Back to list

api-debug
by inernoro
⭐ 1🍴 1📅 Jan 24, 2026
SKILL.md
name: api-debug description: Query the PrdAgent API to fetch real data for debugging. Use when you need to investigate issues, verify data states, or understand system behavior by querying actual API endpoints.
API Debug
Query the PrdAgent API using AI Access Key authentication to fetch real data for debugging and investigation.
When to Use
This skill should be used when:
- Debugging issues that require checking actual data states
- Investigating user-reported problems
- Verifying API behavior or data consistency
- Understanding system state without guessing
Configuration
The API uses AI Access Key authentication:
- Environment Variable:
AI_ACCESS_KEY(configured on the server) - Request Headers:
X-AI-Access-Key: {key}- The configured access keyX-AI-Impersonate: {username}- A valid username to impersonate (must exist in database)
Base URL
http://[::1]:5000
Common API Endpoints
User Management
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/users | List all users |
| GET | /api/users/{userId} | Get user details |
Authentication & Authorization
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/authz/users | List users with permissions |
| GET | /api/authz/roles | List system roles |
Projects & PRD
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/prd/projects | List projects |
| GET | /api/prd/projects/{id} | Get project details |
Model Groups
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/model-groups | List model groups |
System
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/init/status | Get system initialization status |
Execution Steps
-
Identify the data needed: Determine which API endpoint to query based on the debugging context.
-
Execute the query: Use curl with the AI Access Key headers:
curl -s "http://[::1]:5000/api/{endpoint}" \ -H "X-AI-Access-Key: 123" \ -H "X-AI-Impersonate: admin" -
Parse the response: The API returns JSON in this format:
{ "success": true, "data": { ... }, "error": null } -
Analyze the data: Use the returned data to understand the system state and diagnose issues.
Example Queries
Get all users
curl -s "http://[::1]:5000/api/users" \
-H "X-AI-Access-Key: 123" \
-H "X-AI-Impersonate: admin" | jq
Get specific user
curl -s "http://[::1]:5000/api/users/user1" \
-H "X-AI-Access-Key: 123" \
-H "X-AI-Impersonate: admin" | jq
List projects with pagination
curl -s "http://[::1]:5000/api/prd/projects?page=1&pageSize=10" \
-H "X-AI-Access-Key: 123" \
-H "X-AI-Impersonate: admin" | jq
Error Handling
- 401 Unauthorized: Check that
AI_ACCESS_KEYenvironment variable is set on the server - 401 User not found: The username in
X-AI-Impersonatemust exist in the database - 403 Forbidden: Should not happen with AI Access Key (has super permissions)
- 404 Not Found: Check the endpoint path
Security Notes
- This skill has super permissions and can access all data
- Use responsibly for debugging purposes only
- The access key should be kept secure and not logged
- All requests are logged on the server for audit purposes
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon