← daisyUI Checker
Your token

daisyUI Checker API

Checking markup against daisyUI 5, the mechanical fixes, the preview and the downloads all run free in the browser and need no API. The API is for the one metered step: send the markup (with the page's fixes already in it) and the list of what is still wrong, and get the markup rewritten for daisyUI 5 with a list of changes and anything left to do by hand.

Base URL: https://api.skillsafe.ai/v1/app-api. Every response is {"data": ...} or {"error": {"code", "message"}}; read error.code and error.message rather than the HTTP status alone.

The task field

Send "task" first. This app has one job:

taskWhat it doesReply
fixRewrites the markup so every class is correct daisyUI 5: form-control and label-text into fieldset and label, input-group into join, parts outside their component wrapped, modifiers given their component class, typos corrected, two colours or sizes on one element reduced to one. Everything else - ids, links, text, Tailwind utilities, JavaScript - stays as it was.Marker text, below

Input fields

FieldTypeMeaning
taskstring"fix". Required.
codestringThe HTML or JSX. The page sends its own fixed copy (renamed daisyUI 4 classes already changed) and at most 30,000 characters: a longer file keeps its start and its end on whole lines, with a comment line where the middle was left out. Required.
factsstringJSON text from the page's checker: markup (html or jsx), from_daisyui (4 or 5), prefix, daisyui (the version checked against), fixed_by_page (line, class, now), to_fix (line, class, level, finding, suggestion), more_to_fix, notes and lines_left_out. Send "{}" if you have none; the reply is better with it.

The reply

job.output.output is plain text in this shape:

TASK: fix
SUMMARY: one sentence
=== FIXED ===
the complete fixed markup
=== CHANGES ===
- line 10: `old` -> `new`: why
=== CHECK BY HAND ===
- something left to do, or None
=== END ===

On the page, the fixed markup is checked again with the same rules, and any id, link or word of text that disappeared, any change naming a class the markup never had, and anything still wrong are shown next to the answer. A reply without === END === was cut short.

Worked examples

task: fix - a daisyUI 4 page (form-control, label-text, footer, theme variable)

Input (input.json):

{
  "task": "fix",
  "code": "<div class=\"navbar bg-base-100\">\n  <a class=\"btn btn-ghost text-xl\">Acme</a>\n  <div class=\"avatar avatar-online\">\n    <div class=\"bg-neutral text-neutral-content w-10 rounded-full\"><span>AK</span></div>\n  </div>\n</div>\n<div class=\"card card-border card-sm w-96 bg-base-100\">\n  <div class=\"card-body\">\n    <h2 class=\"card-title\">Sign in</h2>\n    <div class=\"form-control w-full max-w-xs\">\n      <label class=\"label\"><span class=\"label-text\">Email</span></label>\n      <input type=\"email\" class=\"input w-full max-w-xs\" />\n      <label class=\"label\"><span class=\"label-text-alt\">We never share it</span></label>\n    </div>\n    <select class=\"select\"><option>Admin</option></select>\n    <div class=\"join\">\n      <button class=\"btn btn-active join-item\">Day</button>\n      <button class=\"btn join-item\">Week</button>\n    </div>\n    <div class=\"tabs tabs-box\">\n      <a class=\"tab tab-active\">Profile</a><a class=\"tab\">Billing</a>\n    </div>\n  </div>\n</div>\n<ul class=\"menu bg-base-200 w-56\">\n  <li><a class=\"menu-active\">Inbox</a></li>\n  <li class=\"menu-disabled\"><a>Spam</a></li>\n</ul>\n<table class=\"table\"><tbody><tr class=\"hover:bg-base-300\"><td>Row</td></tr></tbody></table>\n<div class=\"dock dock-sm\">\n  <button class=\"dock-active\"><span class=\"dock-label\">Home</span></button>\n  <button><span class=\"dock-label\">Stats</span></button>\n</div>\n<div class=\"mockup-phone\"><div class=\"mockup-phone-camera\"></div><div class=\"mockup-phone-display\"><div class=\"w-[320px] h-[568px]\">Hi.</div></div></div>\n<footer class=\"footer p-10 bg-neutral text-neutral-content\"><nav><h6 class=\"footer-title\">Company</h6></nav></footer>\n<style>.brand { color: var(--color-primary); border-radius: var(--rounded-btn); }</style>\n",
  "facts": "{\"markup\":\"html\",\"from_daisyui\":\"4\",\"prefix\":\"\",\"daisyui\":\"5.8.3\",\"fixed_by_page\":[{\"line\":3,\"class\":\"online\",\"now\":\"avatar-online\"},{\"line\":7,\"class\":\"card-bordered\",\"now\":\"card-border\"},{\"line\":7,\"class\":\"card-compact\",\"now\":\"card-sm\"},{\"line\":12,\"class\":\"input-bordered\",\"now\":\"(removed)\"},{\"line\":15,\"class\":\"select-bordered\",\"now\":\"(removed)\"},{\"line\":16,\"class\":\"btn-group\",\"now\":\"join\"},{\"line\":20,\"class\":\"tabs-boxed\",\"now\":\"tabs-box\"},{\"line\":26,\"class\":\"active\",\"now\":\"menu-active\"},{\"line\":27,\"class\":\"disabled\",\"now\":\"menu-disabled\"},{\"line\":29,\"class\":\"hover\",\"now\":\"hover:bg-base-300\"},{\"line\":30,\"class\":\"btm-nav\",\"now\":\"dock\"},{\"line\":30,\"class\":\"btm-nav-sm\",\"now\":\"dock-sm\"},{\"line\":31,\"class\":\"active\",\"now\":\"dock-active\"},{\"line\":31,\"class\":\"btm-nav-label\",\"now\":\"dock-label\"},{\"line\":32,\"class\":\"btm-nav-label\",\"now\":\"dock-label\"},{\"line\":34,\"class\":\"camera\",\"now\":\"mockup-phone-camera\"},{\"line\":34,\"class\":\"display\",\"now\":\"mockup-phone-display\"},{\"line\":34,\"class\":\"artboard\",\"now\":\"w-[320px] h-[568px]\"},{\"line\":34,\"class\":\"artboard-demo\",\"now\":\"(removed)\"},{\"line\":34,\"class\":\"phone-1\",\"now\":\"(removed)\"},{\"line\":36,\"class\":\"hsl(var(--p))\",\"now\":\"var(--color-primary)\"}],\"to_fix\":[{\"line\":10,\"class\":\"form-control\",\"level\":\"bad\",\"finding\":\"form-control was removed in daisyUI 5. Use a fieldset (fieldset, fieldset-legend) around the field, or drop the wrapper.\",\"suggestion\":\"\"},{\"line\":11,\"class\":\"label-text\",\"level\":\"bad\",\"finding\":\"label-text was removed in daisyUI 5. Use the label class (span class=\\\"label\\\") from the new label syntax.\",\"suggestion\":\"\"},{\"line\":12,\"class\":\"w-full max-w-xs\",\"level\":\"info\",\"finding\":\"daisyUI 5 inputs and selects are 20rem wide by default, so w-full max-w-xs is no longer needed for that.\",\"suggestion\":\"\"},{\"line\":13,\"class\":\"label-text-alt\",\"level\":\"bad\",\"finding\":\"label-text-alt was removed in daisyUI 5. Use the label class (for example p class=\\\"label\\\" under the field).\",\"suggestion\":\"\"},{\"line\":35,\"class\":\"footer\",\"level\":\"info\",\"finding\":\"A daisyUI 5 footer is vertical by default. To keep it horizontal on wider screens, add md:footer-horizontal (the upgrade guide's fix).\",\"suggestion\":\"md:footer-horizontal\"},{\"line\":36,\"class\":\"--rounded-btn\",\"level\":\"bad\",\"finding\":\"--rounded-btn is --radius-field in daisyUI 5.\",\"suggestion\":\"--radius-field\"}],\"more_to_fix\":0,\"notes\":2,\"lines_left_out\":null}"
}

Reply:

TASK: fix
SUMMARY: Replaced the form-control wrapper and the label-text spans with a fieldset, legend and helper label, switched --rounded-btn to --radius-field and added md:footer-horizontal; the only thing to check is the footer layout at wider widths.
=== FIXED ===
<div class="navbar bg-base-100">
  <a class="btn btn-ghost text-xl">Acme</a>
  <div class="avatar avatar-online">
    <div class="bg-neutral text-neutral-content w-10 rounded-full"><span>AK</span></div>
  </div>
</div>
<div class="card card-border card-sm w-96 bg-base-100">
  <div class="card-body">
    <h2 class="card-title">Sign in</h2>
    <fieldset class="fieldset w-full max-w-xs">
      <legend class="fieldset-legend">Email</legend>
      <input type="email" class="input" />
      <p class="label">We never share it</p>
    </fieldset>
    <select class="select"><option>Admin</option></select>
    <div class="join">
      <button class="btn btn-active join-item">Day</button>
      <button class="btn join-item">Week</button>
    </div>
    <div class="tabs tabs-box">
      <a class="tab tab-active">Profile</a><a class="tab">Billing</a>
    </div>
  </div>
</div>
<ul class="menu bg-base-200 w-56">
  <li><a class="menu-active">Inbox</a></li>
  <li class="menu-disabled"><a>Spam</a></li>
</ul>
<table class="table"><tbody><tr class="hover:bg-base-300"><td>Row</td></tr></tbody></table>
<div class="dock dock-sm">
  <button class="dock-active"><span class="dock-label">Home</span></button>
  <button><span class="dock-label">Stats</span></button>
</div>
<div class="mockup-phone"><div class="mockup-phone-camera"></div><div class="mockup-phone-display"><div class="w-[320px] h-[568px]">Hi.</div></div></div>
<footer class="footer md:footer-horizontal p-10 bg-neutral text-neutral-content"><nav><h6 class="footer-title">Company</h6></nav></footer>
<style>.brand { color: var(--color-primary); border-radius: var(--radius-field); }</style>
=== CHANGES ===
- line 10: `<div class="form-control w-full max-w-xs">` -> `<fieldset class="fieldset w-full max-w-xs">`: form-control removed, fieldset wraps the field
- line 11: `<label class="label"><span class="label-text">Email</span></label>` -> `<legend class="fieldset-legend">Email</legend>`: top label text becomes the legend
- line 12: `input w-full max-w-xs` -> `input`: inputs are 20rem wide by default
- line 13: `<label class="label"><span class="label-text-alt">We never share it</span></label>` -> `<p class="label">We never share it</p>`: helper text under the field
- line 35: `footer p-10 bg-neutral text-neutral-content` -> `footer md:footer-horizontal p-10 bg-neutral text-neutral-content`: keeps the footer horizontal on wider screens
- line 36: `var(--rounded-btn)` -> `var(--radius-field)`: renamed theme variable
=== CHECK BY HAND ===
- None
=== END ===

task: fix - typos, parts outside their component and a drawer label that opens nothing

Input:

{
  "task": "fix",
  "code": "<div class=\"drawer\">\n  <input id=\"nav-drawer\" type=\"checkbox\" class=\"drawer-toggle\" />\n  <div class=\"drawer-content\">\n    <div class=\"navbar bg-base-200\">\n      <label for=\"main-drawer\" class=\"btn btn-ghost drawer-button\">Menu</label>\n      <a class=\"btn btn-ghost text-xl\">Dashboard</a>\n    </div>\n    <div class=\"stats shadow\">\n      <div class=\"stat\">\n        <div class=\"stat-title\">Revenue</div>\n        <div class=\"stat-value\">$89,400</div>\n      </div>\n    </div>\n    <div class=\"stat-desc\">21% more than last month</div>\n    <button class=\"btn btn-primary btn-outline btn-soft\" onclick=\"invite_modal.showModal()\">Invite</button>\n    <span class=\"badge badge-sucess badge-sm\">Live</span>\n    <div class=\"card-body bg-base-100 rounded-box\">\n      <h2 class=\"card-title\">Recent orders</h2>\n      <progress class=\"progress-primary w-56\" value=\"40\" max=\"100\"></progress>\n    </div>\n  </div>\n  <div class=\"drawer-side\">\n    <label for=\"nav-drawer\" aria-label=\"close sidebar\" class=\"drawer-overlay\"></label>\n    <ul class=\"menu bg-base-200 min-h-full w-64 p-4\">\n      <li><a class=\"menu-active\">Overview</a></li>\n      <li><a>Customers</a></li>\n    </ul>\n  </div>\n</div>\n<dialog id=\"invite_modal\" class=\"modal\">\n  <div class=\"modal-box\">\n    <h3 class=\"text-lg font-bold\">Invite a teammate</h3>\n    <input type=\"email\" placeholder=\"name@company.com\" class=\"input input-primray\" />\n    <div class=\"modal-action\"><button class=\"btn\">Send</button></div>\n  </div>\n</dialog>\n",
  "facts": "{\"markup\":\"html\",\"from_daisyui\":\"5\",\"prefix\":\"\",\"daisyui\":\"5.8.3\",\"fixed_by_page\":[],\"to_fix\":[{\"line\":5,\"class\":\"drawer-button\",\"level\":\"warn\",\"finding\":\"This label points at for=\\\"main-drawer\\\", but no drawer-toggle input has that id, so it opens nothing.\",\"suggestion\":\"\"},{\"line\":14,\"class\":\"stat-desc\",\"level\":\"warn\",\"finding\":\"stat-desc belongs inside an element with stats, and this <div> has none around it.\",\"suggestion\":\"\"},{\"line\":15,\"class\":\"btn-soft\",\"level\":\"warn\",\"finding\":\"btn-outline and btn-soft are both style classes of btn on one element; daisyUI expects one. Keep the one you want.\",\"suggestion\":\"\"},{\"line\":16,\"class\":\"badge-sucess\",\"level\":\"warn\",\"finding\":\"badge-sucess is not a daisyUI 5 class; did you mean badge-success?\",\"suggestion\":\"badge-success\"},{\"line\":17,\"class\":\"card-body\",\"level\":\"warn\",\"finding\":\"card-body belongs inside an element with card, and this <div> has none around it.\",\"suggestion\":\"\"},{\"line\":18,\"class\":\"card-title\",\"level\":\"warn\",\"finding\":\"card-title belongs inside an element with card, and this <h2> has none around it.\",\"suggestion\":\"\"},{\"line\":19,\"class\":\"progress-primary\",\"level\":\"warn\",\"finding\":\"progress-primary only works on an element that also has progress (progress color). Add progress to this <progress>.\",\"suggestion\":\"\"},{\"line\":30,\"class\":\"modal\",\"level\":\"warn\",\"finding\":\"This <dialog class=\\\"modal\\\"> has no <form method=\\\"dialog\\\"> inside it. The daisyUI modal guide adds one (often as the modal-backdrop) so a button or a click outside closes the modal without JavaScript.\",\"suggestion\":\"\"},{\"line\":33,\"class\":\"input-primray\",\"level\":\"warn\",\"finding\":\"input-primray is not a daisyUI 5 class; did you mean input-primary?\",\"suggestion\":\"input-primary\"}],\"more_to_fix\":0,\"notes\":0,\"lines_left_out\":null}"
}

Reply:

TASK: fix
SUMMARY: Matched the drawer label to its toggle, wrapped the lone stat-desc and card-body in their components, and fixed the typo'd badge and input classes, the doubled btn style, the bare progress and the modal close form; the stat-desc and card wrappers may need moving.
=== FIXED ===
<div class="drawer">
  <input id="nav-drawer" type="checkbox" class="drawer-toggle" />
  <div class="drawer-content">
    <div class="navbar bg-base-200">
      <label for="nav-drawer" class="btn btn-ghost drawer-button">Menu</label>
      <a class="btn btn-ghost text-xl">Dashboard</a>
    </div>
    <div class="stats shadow">
      <div class="stat">
        <div class="stat-title">Revenue</div>
        <div class="stat-value">$89,400</div>
      </div>
    </div>
    <div class="stats">
      <div class="stat">
        <div class="stat-desc">21% more than last month</div>
      </div>
    </div>
    <button class="btn btn-primary btn-outline" onclick="invite_modal.showModal()">Invite</button>
    <span class="badge badge-success badge-sm">Live</span>
    <div class="card">
      <div class="card-body bg-base-100 rounded-box">
        <h2 class="card-title">Recent orders</h2>
        <progress class="progress progress-primary w-56" value="40" max="100"></progress>
      </div>
    </div>
  </div>
  <div class="drawer-side">
    <label for="nav-drawer" aria-label="close sidebar" class="drawer-overlay"></label>
    <ul class="menu bg-base-200 min-h-full w-64 p-4">
      <li><a class="menu-active">Overview</a></li>
      <li><a>Customers</a></li>
    </ul>
  </div>
</div>
<dialog id="invite_modal" class="modal">
  <div class="modal-box">
    <h3 class="text-lg font-bold">Invite a teammate</h3>
    <input type="email" placeholder="name@company.com" class="input input-primary" />
    <div class="modal-action"><button class="btn">Send</button></div>
  </div>
  <form method="dialog" class="modal-backdrop"><button>close</button></form>
</dialog>
=== CHANGES ===
- line 5: `for="main-drawer"` -> `for="nav-drawer"`: the label now matches the existing drawer-toggle id
- line 14: `<div class="stat-desc">` -> `<div class="stats"><div class="stat"><div class="stat-desc">`: stat-desc needs stats and stat around it
- line 15: `btn btn-primary btn-outline btn-soft` -> `btn btn-primary btn-outline`: two style classes on one button, kept the first
- line 16: `badge badge-sucess badge-sm` -> `badge badge-success badge-sm`: typo of badge-success
- line 17: `card-body bg-base-100 rounded-box` -> `<div class="card">` around the `card-body bg-base-100 rounded-box` div: card-body and card-title need a card around them
- line 19: `progress-primary w-56` -> `progress progress-primary w-56`: the color class needs progress
- line 30: `<dialog class="modal">` -> `<dialog class="modal">` with `<form method="dialog" class="modal-backdrop"><button>close</button></form>` added as last child: closes the modal without JavaScript
- line 33: `input input-primray` -> `input input-primary`: typo of input-primary
=== CHECK BY HAND ===
- The new `stats` wrapper around the "21% more than last month" stat-desc stands alone; move it into the Revenue `stat` if it belongs there.
- The new `card` wrapper around the "Recent orders" card-body is a plain wrapper; check its spacing and background in the page.
- The added modal-backdrop button reads "close"; translate or restyle it if needed.
=== END ===

On the page, press an AI example to see these replies checked and rendered.

Errors

HTTPWhat to do
401The token is missing, expired or a guest token on a run. Get a personal token on the token page.
402The balance is below what the run reserves. Top up at skillsafe.ai/account/billing.
400The body is not a JSON object of the fields above, or task or code is missing.
429Wait and retry with the same Idempotency-Key.

Step 1 — a tiny client helper

One function that sends JSON and unwraps the {data, error} envelope.

BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="paste-your-token-here"   # from https://daisyui-checker.skillsafe.ai/tokens.html
api() { # api METHOD PATH [JSON-BODY]
  curl -s -X "$1" "$BASE$2" -H "Content-Type: application/json" \
    ${TOKEN:+-H "Authorization: Bearer $TOKEN"} ${3:+--data "$3"}
}

Step 2 — a token

A guest token is enough for /me and /estimate. A run is metered, so it needs your personal token: sign in on the token page and copy it.

# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN=$(curl -s -X POST "$BASE/guest" -H "Content-Type: application/json" -d '{"slug":"daisyui-checker"}' | jq -r '.data.token')

Step 3 — who am I, and my balance

subject_type is guest or user; credits is the balance (1 credit = $0.0001).

api GET /me | jq '.data | {subject_type, credits}' 

Step 4 — price a run for free

/estimate charges nothing and starts no job. hold_credits is the amount reserved while a run is in flight, not the price; the run is charged what it uses.

# input.json: the run input object - {"task": "fix", "code": "<div class=...>...</div>", "facts": "{...}"}
api POST /estimate "$(cat input.json)" | jq '.data | {hold_credits, min_credits, model, model_alias, markup_bps, warnings}' 

Step 5 — run it and wait for the job

Send an Idempotency-Key derived from the input: a retry with the same key is never billed twice.

KEY="daisyui-checker:fix:$(shasum -a 256 input.json | cut -c1-16):a1"
JOB=$(curl -s -X POST "$BASE/run" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $KEY" --data @input.json | jq -r '.data.job_id')
while :; do
  J=$(api GET "/jobs/$JOB"); S=$(echo "$J" | jq -r '.data.status')
  case "$S" in succeeded|failed|cancelled) break;; esac; sleep 2
done
echo "$J" | jq -r '.data.output.output' > reply.txt   # marker text: TASK, SUMMARY, === FIXED ===, === CHANGES ===, === CHECK BY HAND ===, === END ===
echo "$J" | jq '.data | {charged_credits, truncated}' 

Step 6 — or stream it

/run-stream sends Server-Sent Events while the job runs and the finished job at the end.

# Server-Sent Events: tick/delta events while the job runs, then a final event with the job
curl -N -s -X POST "$BASE/run-stream" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: daisyui-checker:fix:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json