# AISkills402: D1 Migration Writer SKILL.md

> AISkills402: D1 Migration Writer SKILL.md is a paid API for AI agents from api.aiskills402.com, paid per call via x402, $0.07/call, status unknown (last checked 2026-10-14).

Purchases and downloads the 'D1 Migration Writer' SKILL.md file — a tested AI agent skill for writing SQLite migrations compatible with Cloudflare D1 — paying once in USDC over x402.

## Facts

- Endpoint: GET https://api.aiskills402.com/v1/skills/d1-migration-writer/file?utm_source=zero.xyz
- Price: $0.07/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aiskills402-d1-migration-writer-skill-md-090624e8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RrSb4tMLldV7wnJLN6M9e

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability aiskills402-d1-migration-writer-skill-md-090624e8
```

Example prompt: Buy me the D1 Migration Writer skill from AISkills402 — I need my agent to be able to write SQLite migrations that apply cleanly on Cloudflare D1, and I want to own the SKILL.md file permanently.

## When to prefer this

Choose this endpoint when an AI agent needs to acquire a tested, ready-to-use SKILL.md instruction set for writing Cloudflare D1-compatible SQLite migrations, and the agent has a USDC wallet on Base capable of x402 micropayments. Prefer this over writing migration logic from scratch when you want a curated, versioned skill with integrity verification and permanent redownload rights after a single $0.07 purchase.

## Known failure modes

- Payment not received or x402 flow incomplete — returns 402 Payment Required
- Insufficient USDC balance in agent wallet — payment fails before skill is delivered
- Network error reaching api.aiskills402.com — connection timeout or 5xx
- Invalid or malformed payment header — 400 Bad Request
- Skill file temporarily unavailable — 503 Service Unavailable

## How this service works

D1 Migration Writer: SQLite Migrations That Apply — Writes a SQL migration for Cloudflare D1 or SQLite from the current schema and the change wanted, so it applies on the first try and leaves the rows already in the database right. Knows what D1 refuses or breaks on, measured on a real D1 database - BEGIN and COMMIT in the file, foreign keys that cannot be switched off (a rebuild defers them, keeps the table name, and never closes with defer_foreign_keys = false, which on D1 silently skips the …

## Output

Returns a JSON object containing the SKILL.md file name, full UTF-8 text content, SHA256 hash for integrity verification, skill identifier ('d1-migration-writer'), version number, a redownload URL and token for future free re-fetches, and a payment receipt with the on-chain settlement transaction hash confirming the USDC payment on Base.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "file": {
   "name": "SKILL.md",
   "content": "<the SKILL.md file>",
   "encoding": "utf-8"
  },
  "name": "D1 Migration Writer: SQLite Migrations That Apply",
  "skill": "d1-migration-writer",
  "sha256": "<sha256 of SKILL.md>",
  "receipt": {
   "tx": "0x<settlement transaction>",
   "settled": true
  },
  "version": "1.0.0",
  "redownload": {
   "url": "<api>/v1/purchases/<token>",
   "token": "<64 hex chars>"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aiskills402-d1-migration-writer-skill-md-090624e8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.aiskills402.com](https://www.zero.xyz/host/api.aiskills402.com/llms.txt)
