# Scan Skill Source

Source: https://agenta.ai/docs/reference/api/scan-skill-source

`POST /skills/sources/scan`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Preview a repo/marketplace as skill candidates — no writes.

Detects the layout (Claude marketplace manifest, single skill, or a
multi-skill tree), parses every candidate, and reports per-candidate
validity, issues, and skipped-file warnings — exactly what the import
drawer renders.

## Request body schema

Content type: `application/json` (required)

- `repo_url` (string, required)
- `ref` (string, nullable)

## Response schemas

### 200: Successful Response

- `repo_url` (string, required)
- `ref` (string, nullable)
- `commit_sha` (string, nullable)
- `scan` (object, required)
  - `layout` (string) Default: `"none"`.
  - `candidates` (array of object) Default: `[]`.
    - `path_in_repo` (string, required)
    - `valid` (boolean) Default: `false`.
    - `skill` (object, nullable)
    - `issues` (array of object) Default: `[]`.
    - `warnings` (array of object) Default: `[]`.
  - `issues` (array of object) Default: `[]`.
    - `code` (string, required)
    - `message` (string, required)
    - `path` (string, nullable)
- `already_imported_paths` (array of string) Default: `[]`.
- … more fields: see the OpenAPI specification.

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
