API Skills

Endpoints pour lister, rechercher et recuperer des competences.

Lister les Skills

GET /api/v1/skills

Parametres

| Parametre | Type | Description | |-----------|------|-------------| | page | number | Numero de page (defaut: 1) | | limit | number | Elements par page (defaut: 20, max: 100) | | sort | string | Trier par: stars, updated, name | | order | string | Ordre de tri: asc, desc | | category | string | Filtrer par slug de categorie | | platform | string | Filtrer par plateforme |

Exemple de requete

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

Exemple de reponse

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
  }
}

Obtenir un Skill

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

Exemple de requete

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

Exemple de reponse

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"
    }
  }
}

Obtenir le contenu d'un Skill

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

Retourne le contenu brut du SKILL.md.

Exemple de requete

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

Exemple de reponse

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

Obtenir les statistiques d'un Skill

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

Exemple de reponse

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}
    ]
  }
}

Codes d'erreur

| Code | Statut HTTP | Description | |------|-------------|-------------| | NOT_FOUND | 404 | La competence n'existe pas | | INVALID_PARAMS | 400 | Parametres de requete invalides | | RATE_LIMITED | 429 | Trop de requetes | | SERVER_ERROR | 500 | Erreur interne |