---
title: "Diff two skill versions"
method: GET
path: "/api/v1/skills/{slug}/versions/{from}/diff/{to}"
tags: ["Skills"]
---

# Diff two skill versions

`GET /api/v1/skills/{slug}/versions/{from}/diff/{to}`

## Request

- Base URL: `https://api.skills-hub.ai`
- URL: `https://api.skills-hub.ai/api/v1/skills/{slug}/versions/{from}/diff/{to}`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`

Returns a unified diff of the instructions between two versions (`from` → `to`). Public for visible skills; `PRIVATE`/`ORG` skills require an authorized viewer. Public diffs are cached for one hour.

## Path parameters

- `slug` string, required
- `from` string, required
- `to` string, required

## Response `200`

Successful response. The returned fields are described in this endpoint's summary/description; typed per-field response schemas are being added incrementally.

- object
  - `fromVersion` string, required
  - `toVersion` string, required
  - `diff` string, required: Unified diff of the instructions.
  - `instructionsDiff` string
  - `from` object
    - `version` string
    - `createdAt` string
  - `to` object
    - `version` string
    - `createdAt` string
  - `changelog` string, nullable
  - `hashChanged` boolean, required

---

[API](https://skmtc.dev/skills-hub/apis/skills-hub-ai-api.md) · [All operations](https://skmtc.dev/skills-hub/apis/skills-hub-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/skills-hub/apis/skills-hub-ai-api/revisions/cb5d46d80300?raw)
