From d6ae7987c0f18a71edcb4b1401d97bd423b3691c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 3 Dec 2026 20:40:01 +0000 Subject: [PATCH] feat(free): ship an agent skill in the npm package Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01XYFyFSgHNbc6JbC8CLQkSK --- CHANGELOG.md | 1 + package.json | 3 ++- skills/adminkit/SKILL.md | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 skills/adminkit/SKILL.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c7236cc..dcf710a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Agent skill `skills/adminkit/SKILL.md`, shipped in the npm package: tells Claude Code, Cursor and other agents how to set up AdminKit and which rules to follow - Social preview image: `public/og-image.png` (1200x630) with its `og:image` and `twitter:card` tags in `src/partials/site-meta.hbs`. Change the domain in the image URL to yours. ### Changed diff --git a/package.json b/package.json index 5d3565c..5aa690a 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "license": "MIT", "author": "Paul Laros ", "files": [ - "dist" + "dist", + "skills" ], "type": "module", "main": "./dist/js/app.js", diff --git a/skills/adminkit/SKILL.md b/skills/adminkit/SKILL.md new file mode 100644 index 0000000..3371447 --- /dev/null +++ b/skills/adminkit/SKILL.md @@ -0,0 +1,32 @@ +--- +name: adminkit +description: Build or edit pages with AdminKit, the free Bootstrap 5 admin template (@adminkit/core). Use when a project imports @adminkit/core, links AdminKit's css/app.css and js/app.js, or the user asks for an AdminKit dashboard, page, chart, icon or dark mode. +--- + +# AdminKit + +AdminKit is a free, MIT-licensed Bootstrap 5.3 admin template, published to npm as `@adminkit/core`. It is plain HTML, CSS and JavaScript: no jQuery, no framework required. Read the docs before guessing a class name: https://adminkit.io/bootstrap/docs/ (add `.md` to any docs URL for markdown, or read https://adminkit.io/llms.txt). + +## Set up + +- Install: `npm install @adminkit/core`, or use the files from the zip or the unpkg CDN. +- CSS: `import "@adminkit/core/css"` (`dist/css/app.css`). +- JavaScript: `import "@adminkit/core"` (`dist/js/app.js`). It has no exports; it sets up the page and adds the globals `window.adminkit`, `window.theme` and `window.lucide`. Safe to import during server-side rendering. TypeScript declarations ship in the package. +- Color mode: `@adminkit/core/head` (`dist/js/head.js`) is a blocking script for ``. It sets `data-bs-theme` on `` before the first paint, so there is no flash. + +## Rules + +- Use Bootstrap 5.3 classes and AdminKit's own. Do not add jQuery. +- Light and dark mode: colors that follow the mode come from CSS custom properties (`var(--bs-body-color)`, `var(--bs-body-bg)`), not fixed hex values. Check both modes. +- Icons are Lucide: ``, with the canonical name from https://lucide.dev. Icons added to the page later render by themselves. +- Charts: `adminkit.chartjs("#id", function (theme) { return { /* Chart.js config */ }; })`. The function runs again when the color mode changes, so read colors from `theme` (`theme.primary`, `theme["body-color"]`, `theme["gray-300"]`), never from literals. Maps: `adminkit.vectorMap(...)`. +- Page scripts run inside `DOMContentLoaded`. +- Give images `width` and `height`, and reserve the size of anything a script draws, so the layout does not shift. +- Icon-only buttons need an `aria-label`. Aim for WCAG 2.2 AA in both modes. + +## Starting points + +- Page templates: the demo at https://demo.adminkit.io/ lists them. Copy a page that is close to what you need, then change it. +- Customize colors, fonts and layout through Sass variables and CSS custom properties: https://adminkit.io/bootstrap/docs/getting-started/customization/ +- Dark mode: https://adminkit.io/bootstrap/docs/getting-started/dark-mode/ +- More pages, dashboards, plugins and AI pages are in AdminKit PRO: https://adminkit.io/pricing/