スキル一覧に戻る
inernoro

api-debug

by inernoro

1🍴 1📅 2026年1月24日
GitHubで見るManusで実行

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 key
    • X-AI-Impersonate: {username} - A valid username to impersonate (must exist in database)

Base URL

http://[::1]:5000

Common API Endpoints

User Management

MethodEndpointDescription
GET/api/usersList all users
GET/api/users/{userId}Get user details

Authentication & Authorization

MethodEndpointDescription
GET/api/authz/usersList users with permissions
GET/api/authz/rolesList system roles

Projects & PRD

MethodEndpointDescription
GET/api/prd/projectsList projects
GET/api/prd/projects/{id}Get project details

Model Groups

MethodEndpointDescription
GET/api/model-groupsList model groups

System

MethodEndpointDescription
GET/api/init/statusGet system initialization status

Execution Steps

  1. Identify the data needed: Determine which API endpoint to query based on the debugging context.

  2. 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"
    
  3. Parse the response: The API returns JSON in this format:

    {
      "success": true,
      "data": { ... },
      "error": null
    }
    
  4. 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_KEY environment variable is set on the server
  • 401 User not found: The username in X-AI-Impersonate must 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

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

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

レビュー

💬

レビュー機能は近日公開予定です