DESIGNSKILL.
07 // DEVELOPER REFERENCE

DEVELOPER DOCUMENTATION

Complete guide to integrating scraping, analysis, and AI enrichment APIs into your autonomous workflows.

01 // AUTHENTICATION

Authentication

All requests to the DesignSkill Agent Developer API must provide an authorized API key in the request headers. We use the standard Bearer Token scheme:

HTTP Header
Authorization: Bearer dsk_live_YOUR_API_KEY

Ensure this header is supplied with all requests to the /api/v1/* endpoints. Unauthenticated requests are rejected with a 401 Unauthorized response.


02 // DEVELOPERS

Developers

The developer portal and API reference are designed to support three workflows: rapid manual testing, production automation, and MCP-based agent integration. Start from the portal when you want a live playground, then move to the API reference when you are ready to automate.

  • Portal playground: Use the visual scraper in the portal to test URLs, compare modes, and inspect the JSON response envelope before you embed anything in your app.
  • Automation path: For long-running tasks, use the async deep mode flow and poll the job status endpoint until the completed artifact is available.
  • Agent integration: The MCP adapter exposes the same capabilities to Claude Desktop and Claude Code as a tool-backed workflow.

03 // SUPPORT

Support

Support requests are routed through the portal and the public support channels. For billing disputes, key rotation issues, or failed deep jobs, include the request ID, job ID, and the exact target URL in your note.

  • Operational issues: If the service returns repeated 429 or 503 responses, wait for the backoff window and retry with a new idempotency key.
  • Credit or billing questions: Use the top-up history in the portal and keep the transfer UTR ready for operator review.
  • Direct contact: Email for account or access issues that require manual assistance.

04 // PRICING

Pricing

Credits are consumed at request start and are visible in the portal dashboard. Deep scrapes cost more because they run an asynchronous multi-phase worker pipeline and write an output artifact to the jobs directory.

Plan Included Credits Best For
Free 10 Manual tests and basic single-page scrapes.
Starter 50 Regular integration work and enhanced workflows.
Pro 200 Production automation and larger token extraction tasks.
Enterprise 500 High-volume scraping, queue-heavy jobs, and team usage.

02 // SDK EXAMPLES

First Request Example

Use the following sample cURL and language snippets to run your first scrape and extraction. Replace dsk_live_YOUR_API_KEY with your raw key:

curl -X POST https://designskillagent.online/api/v1/scrape \
  -H "Authorization: Bearer dsk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

03 // ASYNC JOBS

Async Job-Based API

For resource-intensive deep scraping operations (POST /api/v1/scrape/deep), the platform utilizes an asynchronous job queue. Instead of holding HTTP connections open during multi-phase browser analysis, the request is immediately enqueued, returning a job handle.

A. The Location Header Protocol

When submitting a deep scrape request, the API will respond with 202 Accepted. The response contains a standard HTTP Location header specifying the status polling resource:

Initiate Job Request
curl -X POST https://designskillagent.online/api/v1/scrape/deep \
  -H "Authorization: Bearer dsk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'
Response (202 Accepted)
HTTP/1.1 202 Accepted
Location: /api/v1/jobs/3a8f9c0e-1234-5678-abcd-ef0123456789

{
  "success": true,
  "jobId": "3a8f9c0e-1234-5678-abcd-ef0123456789",
  "statusUrl": "/api/v1/jobs/3a8f9c0e-1234-5678-abcd-ef0123456789",
  "creditsCharged": 5,
  "status": "queued"
}

B. Status Polling

To retrieve progress details or result payloads, poll the status endpoint with standard 200 OK responses:

Check Status Request
curl -H "Authorization: Bearer dsk_live_YOUR_API_KEY" \
  https://designskillagent.online/api/v1/jobs/3a8f9c0e-1234-5678-abcd-ef0123456789
Response (200 OK - Processing)
{
  "jobId": "3a8f9c0e-1234-5678-abcd-ef0123456789",
  "status": "processing",
  "progress": 50,
  "activePhase": "scrape",
  "startedAt": "2026-07-11T18:12:00.000Z",
  "attemptCount": 1
}
Response (200 OK - Completed)
{
  "jobId": "3a8f9c0e-1234-5678-abcd-ef0123456789",
  "status": "completed",
  "progress": 100,
  "mode": "deep",
  "quotedCredits": 5,
  "finalCredits": 5,
  "artifactType": "deep_pack",
  "enrichmentMode": "live_ai",
  "enrichmentStatus": "completed",
  "billingOutcome": "full_charge",
  "resultUrl": "/output/jobs/3a8f9c0e-1234-5678-abcd-ef0123456789.json",
  "completedAt": "2026-07-11T18:12:12.000Z",
  "runtimeMs": 12000,
  "outputSummary": {
    "colorsCount": 12,
    "fontsCount": 2,
    "fontScaleCount": 5,
    "componentsCount": 28,
    "animationsCount": 3
  }
}
Response (200 OK - Completed with AI Partial Refund)
{
  "jobId": "3a8f9c0e-1234-5678-abcd-ef0123456789",
  "status": "completed",
  "progress": 100,
  "mode": "deep",
  "quotedCredits": 5,
  "finalCredits": 4,
  "artifactType": "deep_pack",
  "enrichmentMode": "fallback",
  "enrichmentStatus": "failed_upstream",
  "billingOutcome": "partial_refund",
  "resultUrl": "/output/jobs/3a8f9c0e-1234-5678-abcd-ef0123456789.json",
  "completedAt": "2026-07-11T18:12:12.000Z",
  "runtimeMs": 12000,
  "outputSummary": {
    "colorsCount": 12,
    "fontsCount": 2,
    "fontScaleCount": 5,
    "componentsCount": 28,
    "animationsCount": 3
  }
}

C. Recommended Polling Strategy

To optimize client performance and respect server pool capacities, developers should implement an adaptive short-polling backoff:

  • Initiate status checks starting at a 5-second check interval.
  • On each poll return where status is still queued or processing, increase the wait interval by 2.5 seconds.
  • Cap maximum polling intervals at 30 seconds.
  • Apply a small randomized jitter (e.g. +/- 500ms) to polling offsets to avoid synchronized network retry storms.

D. Idempotency Key Semantics

Async jobs support idempotent execution via the Idempotency-Key header:

  • Replay Path: If a request is retried with the same Idempotency-Key and identical request payload, the server replays the existing job record, returning 202 (or 200 if completed) along with the X-Idempotent-Replay: true response header. No duplicate credits are charged.
  • Conflict Path: Submitting the same Idempotency-Key but with a modified request payload will reject the transaction with a 409 Conflict status code to guarantee state integrity.

04 // ERROR HANDLING

Error Handling

When an API operation encounters a validation check, authorization failure, or extraction crash, the system returns a standard JSON error envelope:

JSON Response
{
  "error": {
    "code": "INVALID_URL",
    "message": "Safety violation: Target domain resolves to a private IP space.",
    "requestId": "req_5f2d1e00f9"
  }
}
  • INVALID_REQUEST: Missing payload parameter or type mismatch.
  • INVALID_URL: Domain resolves to local loopback (SSRF defense protection).
  • SCRAPE_FAILED: The Puppeteer browser pool timed out trying to open the page.
  • UNAUTHORIZED: API key is invalid or has been revoked by key rotation.
  • See All Error Cases: Consult the dedicated Errors & Refunds directory for a full list of code definitions, debugging checklists, and troubleshooting steps.

05 // RATE LIMITS

Rate Limits

We enforce standard IP rate-limiting to protect backend Puppeteer memory allocations:

  • Global IP Rate Limit: 100 requests per minute.
  • Scraping Concurrency: 3 concurrent scraping worker operations per client.
  • Crossing these thresholds returns a 429 Too Many Requests response.

06 // BILLING

Credits & Billing Semantics

All operations run on a credit allocation billing model:

Pipeline Mode Credit Cost Reason / Deliverables
Basic Scrape
POST /api/v1/scrape (default)
1 Credit Fast raw extraction. Technical CSS design token and typography scale mapping without AI.
Enhanced Scrape
POST /api/v1/scrape (mode=enhanced)
2 Credits Quick AI synthesis. Scrape raw tokens plus Gemini-generated design personality, usage guidance, and reusable skill descriptions.
Deep Scrape
POST /api/v1/scrape/deep
5 Credits Premium async pipeline. Deep scrape, Gemini AI enrichment, resilient background processing, and downloadable ZIP skill packs.

Important Deduction Rules:

  • Pre-Deduction: Credits are charged immediately upon execution start.
  • Failed Scrapes: If a scrape fails with 500 due to target page network timeouts or loopback rules, 1 credit is still charged to cover compute allocation.
  • Gate Rejections: If blocked by rate limits (429), auth errors (401), or server capacity limits (503), 0 credits are consumed.
  • Detailed Policies: Read our complete Errors & Refunds guide for details on automatic refunds, worker failures, and credit adjustment guidelines.

07 // RETRIES

Retries & Backoff

For robust production integrations, do not trigger sequential instant retries when receiving 429 or 503 status codes.

Implement Exponential Backoff with Random Jitter to allow scraper pool resources to free up:

Backoff Formula
t_wait = (2^attempt * 1000) ms + RandomJitter

Do not retry if you receive 402 Payment Required (credit balance exhausted) or 400 Bad Request (malformed parameters).


08 // KEY SAFETY

Key Safety

Your API key is a direct credential to your credit balance:

  • Secure Environment Variables: Never hardcode your API key in browser scripts or frontend assets. Keep keys restricted to backend server processes (e.g. Node process environments or database secrets).
  • Rotation Mechanics: Key rotation invalidates your prior key immediately. The new raw key is shown only once and cannot be re-rendered. Store it in a secure password vault or secrets manager.

09 // TROUBLESHOOTING

Troubleshooting

Review these guidelines to interpret scraping behavior and get support:

  • Chrome cold boots: On first launch, the headless Chromium sandbox may experience a cold boot delay (up to 4–6 seconds) before responding to /api/scrape.
  • 429/503 limits: A 503 error indicates the Puppeteer pool has occupied all concurrency slots (max 3). Wait 5–10 seconds and retry using the backoff guidelines.
  • Direct Support: If your key request is pending more than 24 hours, email the administrator with your payment UTR at .

10 // CLAUDE MCP

Claude & MCP Integration

DesignSkill Agent features a Model Context Protocol (MCP) server adapter, letting LLM clients such as Claude connect to local tools through a standard JSON-RPC 2.0-based protocol. This allows AI assistants to autonomously invoke the design system scraper over standard stdio JSON-RPC.

1. Claude Desktop Configuration

To add DesignSkill Agent as a custom tool in your Claude Desktop app, edit your local configuration file. You can open it via the app's settings ("Developer" → "Edit Config") or locate it manually at:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Add the following server declaration inside the "mcpServers" block. Note that the path in "args" must point to the absolute path of your local cloned directory:

JSON CONFIG
{
  "mcpServers": {
    "designskill-agent": {
      "command": "node",
      "args": ["/absolute/path/to/designskill-scraper/mcp-server/index.js"],
      "env": {
        "DESIGNSKILL_API_KEY": "YOUR_DESIGNSKILL_API_KEY",
        "DESIGNSKILL_API_URL": "https://designskillagent.online"
      }
    }
  }
}

Windows Path Placeholder Example: Replace /absolute/path/... with C:\\path\\to\\designskill-scraper\\mcp-server\\index.js (ensure paths use escaped double-backslashes in JSON configuration).

After saving your configuration file, fully restart the Claude Desktop application. If successful, you will see a "hammer" icon in the lower-right corner of the chat input displaying the generate_design_skill tool!

2. Claude Code (CLI) Configuration

Downstream terminal-based AI agents like Claude Code can connect to the tool by registering the MCP server using the CLI:

BASH
# Register the server using an absolute path to index.js
# For macOS/Linux:
claude mcp add designskill-agent -- node "/absolute/path/to/designskill-scraper/mcp-server/index.js"

# For Windows:
claude mcp add designskill-agent -- node "C:\path\to\designskill-scraper\mcp-server\index.js"

Load the key in your active terminal context before launching Claude Code, or pass it via your environment profile:

BASH
export DESIGNSKILL_API_KEY="YOUR_DESIGNSKILL_API_KEY"
export DESIGNSKILL_API_URL="https://designskillagent.online"
claude

To verify active tools in Claude Code, execute:

BASH
claude mcp list

3. Troubleshooting MCP Connections

  • Missing Tools Hammer: Check the absolute path specified in the config. If Node fails to find index.js, the server won't boot and the tool list will remain empty. Inspect Desktop logs in %APPDATA%\Claude\Logs\mcp.log (Windows) or ~/Library/Logs/Claude/mcp.log (macOS) to view startup errors.
  • Environment Paths: Verify that node is registered on your system path. If the executable cannot be located on system boot, Claude won't be able to invoke the MCP server processes.
  • URL Constraints: All target URLs must be public domains. Requesting loopback addresses (e.g. localhost, 127.0.0.1) is blocked for SSRF security and will return a validation error.

4. MCP Distribution Modes & Roadmap

Currently, connecting the DesignSkill MCP adapter requires a local clone of the repository. The upcoming roadmap paths outline planned distribution packages:

Distribution Mode Setup Requirements Status / Best For
Local File Path Clone repository and point args to index.js Available Now (Devs & Contributors)
NPM Package (npx) Node.js installed locally; no cloning required Coming Soon (Public Onboarding)
Desktop Extension One-click install from Claude Desktop App Future Roadmap (End-user simplicity)

⚠️ Windows NPX Caveat: When executing via npx on Windows, some shells require command wrapping (e.g. cmd /c npx ...). We recommend the local file path as the stablest fallback for Windows development environments.