Skills API

スキルの一覧表示、検索、取得のためのエンドポイントです。

スキル一覧

GET /api/v1/skills

パラメータ

| パラメータ | タイプ | 説明 | |-----------|------|-------------| | page | number | ページ番号(デフォルト:1) | | limit | number | 1ページあたりの項目数(デフォルト:20、最大:100) | | sort | string | 並び替え:starsupdatedname | | order | string | 並び順:ascdesc | | category | string | カテゴリslugでフィルター | | platform | string | プラットフォームでフィルター |

リクエスト例

bash
curl "https://skillsmp.com/api/v1/skills?category=development&sort=stars&order=desc&limit=10"

レスポンス例

json
{
  "data": [
    {
      "id": "123",
      "owner": "anthropic",
      "repo": "brand-guidelines",
      "name": "Brand Guidelines",
      "description": "Maintain consistent brand identity",
      "stars": 1250,
      "forks": 89,
      "updatedAt": "2024-01-15T10:30:00Z",
      "categories": ["marketing", "design"],
      "platforms": ["claude-code", "codex", "chatgpt"]
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 150,
    "totalPages": 15
  }
}

スキル取得

GET /api/v1/skills/:owner/:repo

リクエスト例

bash
curl https://skillsmp.com/api/v1/skills/anthropic/brand-guidelines

レスポンス例

json
{
  "data": {
    "id": "123",
    "owner": "anthropic",
    "repo": "brand-guidelines",
    "name": "Brand Guidelines",
    "description": "Maintain consistent brand identity across all AI-generated content",
    "content": "# Brand Guidelines\n\n## Overview...",
    "stars": 1250,
    "forks": 89,
    "watchers": 45,
    "openIssues": 3,
    "license": "MIT",
    "createdAt": "2023-06-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z",
    "pushedAt": "2024-01-14T15:00:00Z",
    "categories": ["marketing", "design"],
    "platforms": ["claude-code", "codex", "chatgpt"],
    "author": {
      "name": "Anthropic",
      "avatar": "https://github.com/anthropic.png"
    },
    "installCommands": {
      "claudeCode": "claude skill add anthropic/brand-guidelines",
      "codex": "codex config add-skill anthropic/brand-guidelines",
      "chatgpt": "Copy to Custom Instructions"
    }
  }
}

スキルコンテンツ取得

GET /api/v1/skills/:owner/:repo/content

生のSKILL.mdコンテンツを返します。

リクエスト例

bash
curl https://skillsmp.com/api/v1/skills/anthropic/brand-guidelines/content

レスポンス例

json
{
  "data": {
    "content": "---\nname: Brand Guidelines\n...",
    "sha": "abc123def",
    "size": 4523
  }
}

スキル統計取得

GET /api/v1/skills/:owner/:repo/stats

レスポンス例

json
{
  "data": {
    "views": 15234,
    "installs": 3456,
    "favorites": 789,
    "starHistory": [
      {"date": "2024-01-01", "stars": 1100},
      {"date": "2024-01-08", "stars": 1150},
      {"date": "2024-01-15", "stars": 1250}
    ]
  }
}

エラーコード

| コード | HTTPステータス | 説明 | |------|-------------|-------------| | NOT_FOUND | 404 | スキルが存在しない | | INVALID_PARAMS | 400 | クエリパラメータが無効 | | RATE_LIMITED | 429 | リクエストが多すぎる | | SERVER_ERROR | 500 | 内部エラー |