# SkillMD Doctor Contract Pack

SkillMD Doctor Contract Pack gives an agent a machine-readable checklist and example outputs for evaluating whether a `SKILL.md` has the concrete structure NandaHack requires.

Base URL:
https://nonggde.github.io/skillmd-doctor

## GET /api/health.json

Returns static service status.

Example curl:

```bash
curl -s https://nonggde.github.io/skillmd-doctor/api/health.json
```

Example response:

```json
{
  "ok": true,
  "service": "SkillMD Doctor Contract Pack",
  "mode": "static-fallback"
}
```

## GET /api/schema.json

Returns the schema that agents should use to inspect a `SKILL.md`: title, base URL, endpoints, curl examples, example responses, and usage steps.

Example curl:

```bash
curl -s https://nonggde.github.io/skillmd-doctor/api/schema.json
```

Example response:

```json
{
  "service": "SkillMD Doctor Contract Pack",
  "required_checks": [
    "has_title",
    "has_base_url",
    "has_endpoint",
    "has_curl_example",
    "has_example_response",
    "has_usage_steps"
  ]
}
```

## GET /api/analyze-example.json

Returns an example ready verdict from the dynamic analyzer implementation in the source repository.

Example curl:

```bash
curl -s https://nonggde.github.io/skillmd-doctor/api/analyze-example.json
```

Example response:

```json
{
  "ok": true,
  "analysis": {
    "score": 100,
    "verdict": "ready",
    "warnings": []
  }
}
```

## GET /api/probe-example.json

Returns an example endpoint reachability probe response.

Example curl:

```bash
curl -s https://nonggde.github.io/skillmd-doctor/api/probe-example.json
```

Example response:

```json
{
  "ok": true,
  "checked": 1,
  "all_reachable": true
}
```

## How an agent should use this service

1. Fetch `/api/schema.json` to learn the required checks for a usable SkillMD.
2. Compare a candidate `SKILL.md` against the required checks.
3. Fetch `/api/analyze-example.json` to see the expected verdict shape.
4. Fetch `/api/probe-example.json` to see the expected endpoint probe shape.
5. Use the source repository's dynamic implementation when a serverless host is available.
