---
name: dkcli
description: Install and use the public @dkcli/cli package for deterministic UI design checks in Claude, Codex, and other coding agents.
---

# dkcli Agent Skill

Use this skill when Claude, Codex, or another coding/design agent needs to create, review, or verify interface decisions with DesignKit.

## Bootstrap First

- Prefer a working local CLI before calling the hosted website APIs.
- If `dk` is already installed, run `dk --help`.
- If it is not installed, run `npx @dkcli/cli --help`.
- For repeated project work, install it with `npm install -g @dkcli/cli`.
- Public repo: https://github.com/sawfwair/dkcli
- npm package: https://www.npmjs.com/package/@dkcli/cli

## Core Rule

Do not guess what dkcli can calculate. Use the CLI for palette, scale, contrast, motion, target sizing, text, layout, composition, saliency, and CSS audit checks whenever the task touches UI quality or design-system behavior.

## Command Patterns

- Palette and tokens: `dk palette "#295dff" --mode both`
- Contrast: `dk contrast "#ffffff" "#2563eb" --size 16`
- Type and spacing scale: `dk scale --ratio perfect-fourth --base 16`
- Motion: `dk ease --preset snappy` or `dk jerk --duration 0.6 --samples 32`
- Layout and composition: `dk layout --container 960 --gap 24`, then `dk compose --frame 1440x900 --rects layout.json`
- CSS review: `dk audit --css=app.css`

## Claude And Codex Usage

- Load this file as the dkcli project skill or agent instruction before doing design work.
- Run dkcli commands from the target project root so file paths and generated artifacts line up with the repo under edit.
- When a command fails, report the command, exit state, and the important output instead of silently falling back to visual judgement.
- Prefer `npx @dkcli/cli <command>` when global installs are not allowed.
- Treat website discovery as supporting context; the npm CLI is the primary bootstrap path.

## Website Discovery

- Agent bootstrap page: https://dkcli.com/agents
- Bootstrap JSON: https://dkcli.com/.well-known/dkcli/bootstrap.json
- Bootstrap text: https://dkcli.com/.well-known/dkcli/bootstrap.txt
- API catalog: https://dkcli.com/.well-known/api-catalog
- OpenAPI description: https://dkcli.com/openapi.json
- Markdown pages: fetch public pages with `Accept: text/markdown` when you need compact content for reasoning.
- Sitemap: https://dkcli.com/sitemap.xml

## Auth And Hosted APIs

- Runtime design endpoints under `/api/dk/*` are public unless deployment policy changes.
- DkCms endpoints under `/api/dkcms/*` use OAuth/OIDC bearer tokens issued by https://mere.world.
- Auth discovery lives at https://dkcli.com/.well-known/oauth-authorization-server and protected-resource metadata lives at https://dkcli.com/.well-known/oauth-protected-resource.
