/jlib-official:jlib-officialfrom jlib-official
Build and change apps on jlib (`@syware/jlib`), SyWare's 76 `jl-*` web components on Jadis — the app's frame, pages, tables, forms, dialogs, load states, toasts and confirmations, theming through `--jl-*` tokens, icons, jlib's texts in French and German, tests in jsdom and server rendering. Teaches finding the right component and its whole API (a reference per component, offline), writing views with the components by class in JSX, the mistakes agents make with jlib, and a self-check to run before delivering. Load it before writing, reviewing or debugging code that imports `@syware/jlib` or writes `jl-*` tags, before starting an app on jlib, and when a page needs a component or an option it cannot find, even when the request only says a table, a form, a dialog or a page in a project that depends on jlib.
Ships in jlib-official. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
jlib (@syware/jlib) is the component library of SyWare's apps, free for any app: 76 jl-* web components on
Jadis, typed, tree-shaken, themed by --jl-* CSS custom properties, their own texts in English, French and German.
An app's views are Jadis components that put jl-* components together. Never bring another UI kit, a CSS framework or
a second component model on top of it.
Written for @syware/[email protected], on @jadis/core 1.8. Documentation: https://bioleyl.github.io/jlib/ ·
Source: https://github.com/bioleyl/jlib
references/components/<tag>.md): every input, event, slot, method and part, with
examples. Open the guide for the task (Where to look). A component or an option you cannot find
is not there: do not invent it.Views are Jadis components: the essentials are in references/views.md; the jadis-official
skill teaches Jadis in full (the Claude Code plugin installs it with this one). How SyWare's apps behave (their
frame, lists, forms, states and feedback) is the syware-ux skill: an app that follows SyWare's UX loads both.
The project's own rules (AGENTS.md, CLAUDE.md, its README) and its consistent conventions win over this skill.
| You would write (MUI, shadcn, Vuetify, Tailwind, plain HTML) | With jlib |
|---|---|
<Button variant="contained" onClick={save}>Save</Button> | <JlButton variant="primary" label="Save" onPress={() => this.save()} />: inputs are props, outputs are on… props given the event's detail |
useState mirroring a control's value | The control holds it: select.value.get(), the change event's detail, or new FormData(form) |
<label>, <input> and an error <span> | <JlField label="Email" error={…}><JlInput name="email" type="email" /></JlField> in a real <form> |
| A data grid library | <JlTable<Order> columns={COLUMNS} rowKey="id" />, rows set with table.rows.set(orders) |
if (loading) <Spinner/>, if (error) … | A JlLoadState around the content: state.load({ fetch, draw, isEmpty }) draws the skeleton, the content, the empty slot or the error with Try again |
A modal library, window.confirm | JlDialog for a task; await confirmDialog({ heading, text, tone: 'danger' }) for a yes or no |
| A toast library | toast({ heading: 'Order sent', tone: 'ok' }) |
<PlusIcon /> imported per use | icon="plus": names, registered once by the module that writes them (registerIcons) |
className="text-gray-500 p-4", theme objects | The view's own CSS reading --jl-* tokens: color: var(--jl-muted); padding: var(--jl-space-4); |
| A layout library, a hand-made page shell | JlAppShell, JlSideNav, JlPage, JlCard, JlStack, JlSplitView |
<Outlet /> of a router | Jadis's Router showing its pages through a JlPageOutlet |
| An i18n library for the kit's own texts | await jlTexts.setLocale('fr'), or await jlTexts.follow(i18n) for an app with a Translator |
The shape to copy: a page that lists orders, loads them in a load state, and says when there are none.
// src/pages/orders-page.tsx
import { Jadis } from '@jadis/core';
import { JlButton, JlEmpty, JlLoadState, JlPage, JlTable, registerIcons } from '@syware/jlib';
import { Package, Plus } from 'lucide';
import { fetchOrders } from '../services/orders';
import styles from './orders-page.css?inline';
import type { TableColumn } from '@syware/jlib';
import type { Order } from '../types/order.types';
// The icons this module names, and only those.
registerIcons({ package: Package, plus: Plus });
const COLUMNS: TableColumn<Order>[] = [
{ format: 'code', key: 'number', label: 'Order' },
{ description: 'city', key: 'customer', label: 'Customer' },
{ format: 'badge', key: 'status', label: 'Status', tones: { Late: 'warn', Open: 'info', Shipped: 'ok' } },
{ format: 'number', key: 'total', label: 'Total', sortable: true },
{ format: 'date', key: 'placedAt', label: 'Placed', sortable: true },
];
export class OrdersPage extends Jadis {
static readonly selector = 'app-orders-page';
// Children found by their class, or by their selector to keep a type parameter.
private readonly _refs = this.useRefs((ref) => ({
state: ref(JlLoadState),
table: ref<JlTable<Order>>('jl-table'),
}));
// Drawn once. Components by class: the bundle keeps them, and their props are type-checked.
templateHtml(): Node {
return (
<JlPage heading="Orders" description="Every order of the shop, the latest first." appName="Shop">
<JlButton slot="actions" variant="primary" icon="plus" label="New order" href="#/orders/new" />
<JlLoadState errorHeading="The orders could not be loaded">
<JlTable<Order> columns={COLUMNS} rowKey="id" label="Orders" sortKey="placedAt" sortDirection="desc" />
<JlEmpty slot="empty" icon="package" heading="No orders yet" description="Orders placed in the shop show here." />
</JlLoadState>
</JlPage>
);
}
templateCss(): string {
return styles;
}
// Runs after each connection: loads once, while nothing is shown yet.
onConnect(): void {
if (this._refs.state.state.get() !== 'loading') {
return;
}
void this._refs.state.load({
draw: (orders) => this._refs.table.rows.set(orders),
fetch: () => fetchOrders(this.killSignal),
isEmpty: (orders) => orders.length === 0,
});
}
}
OrdersPage.register();
/* src/pages/orders-page.css */
:host {
display: block;
}
[hidden] {
display: none;
}
fetchOrders(signal) is the app's own: a fetch of its API with the signal, the answer typed as Order[]. A whole
app, its services, its frame (shell, navigation, router, outlet) and a list that searches and creates, is in
references/recipes.md.
Each rule has a short name; use the name when you cite it in a review.
<JlPage>, <JlCard>…</JlCard>), children
included: the bundle keeps it, its props are typed, and no define() is needed. The tag (<jl-page>) belongs to
HTML strings and index.html only, which need define(JlPage) beside them or the tag stays an empty element..set(), read it with .get();
lists and objects too. Listen with an on… prop (onPress, onChange) or events.register(…) in onConnect.
jl-* events do not bubble: listen on the component itself. Never addEventListener('click') on a jl-*, never
reach into its shadow root.value.get(), the event's detail, FormData) rather than mirroring them.JlTable<Order>, JlSelect<Currency>, JlMenu<'rename' | 'delete'>, JlSideNav<Place>. Rows and values are
plain data. An input that is a function itself (a table's detail, a tree's loader) is a plain property, set by
a prop or by assignment: set(fn) would call it as an updater.--jl-* tokens: no literal colour in a view,
no shadow on what does not float. The palette is changed once, in the app's stylesheet.icon="plus") is registered once by the module
that writes it, registerIcons({ plus: Plus }) from lucide, or registerIcons(COMMON_ICONS). An unregistered
name draws a neutral mark and warns.display, margin,
width), a component's base part (::part(base)) and its tokens; never selectors into a component. What a
table's renderer draws lives in the table: draw it with jl-* components. Each view's CSS ends with
[hidden] { display: none; }.jlTexts, chosen once before anything is drawn. Texts that name the app's content are inputs of each component.JlPage. Its heading, description, actions (slot="actions", the primary last, one at most) and
status (slot="meta"), at one of four widths. The router shows pages through a JlPageOutlet.JlLoadState and loaded with its load(); fetch gets
this.killSignal. The outlet keeps the current page until the next one's load states have their data.<form> of JlFields around named controls, read with FormData, submitted by a
JlButton type="submit"; an error goes under its field, a page with a form guards it with guardLeave.confirmDialog before what cannot be undone, toast for an outcome out of view,
an action's own loading while it runs. Never alert, confirm or prompt.Open only what the task needs.
| When you | Read |
|---|---|
| Need a component, or think jlib lacks one | references/components.md, then references/components/<tag>.md |
| Start an app, or add jlib to one: packages, TypeScript, Vite, fonts, no build step | references/setup.md |
Write a view: classes in JSX, inputs, events, refs, slots, typing, styles, your own components on JlElement | references/views.md |
| Build the frame: app shell, side nav, tab bar, account, search, router, outlet, titles, lazy pages | references/frame-and-pages.md |
| Show collections: tables, columns, renderers, rows that open, selection, search and filters, Show more, trees, split views | references/lists.md |
| Write forms: fields, controls, validation, server errors, dialogs, guarding against leaving | references/forms.md |
| Show states and feedback: load states, empty, errors, toasts, confirmations, downloads, progress, status badges | references/feedback.md |
| Change the look: tokens, the accent, dark mode, parts, icons | references/theming.md |
| Show jlib's texts in the app's language | references/texts.md |
| Write tests (Vitest, jsdom, Playwright) | references/testing.md |
| Render pages on a server | references/server-rendering.md |
| Want a whole example: an app, a list page, a detail page, a dialog that creates, a settings form | references/recipes.md |
Need a helper's signature: toast, confirmDialog, guardLeave, download, registerIcons, jlTexts… | references/api.md |
| Are new to jlib, or review code | references/agent-mistakes.md |
version in node_modules/@syware/jlib/package.json. Its declarations, commented, are the
last word on an API: node_modules/@syware/jlib/dist/<level>/<tag>.d.ts (atoms, molecules, organisms,
templates), the shared types in dist/types/, the helpers in dist/lib/.https://raw.githubusercontent.com/bioleyl/jlib/v<version>/site/src/docs/components/<tag>.doc.ts
(the site draws its pages by script: fetching one gives an empty page).npm view @syware/jlib version; the changelog says what to
look at), or do without it.Walk your diff once. Fix every "no", or say why it stays.
define()?get(), event details, FormData) rather than mirrored, and are
components that hold the page's data typed by it?on… props or events.register in onConnect, with no addEventListener on
their native events and no query into their shadow roots?--jl-* tokens, style nothing inside a component except through ::part, and end
with [hidden] { display: none; }?JlPage with one primary action at most, and is what loads inside a JlLoadState loaded with
load() and the kill signal, with an empty state where there can be nothing?JlFields and named controls, errors under their fields, and pages with forms guarded
with guardLeave?confirmDialog, and does no alert, confirm or prompt remain?jlTexts), and no text of jlib's rewritten by hand?Then report what the pass changed, as <file>:<line> — <what changed>, and end with one line:
jlib self-check: 2 fixed or jlib self-check: clean.
jlib is shared by every app built on it: a bug, a missing option or a missing component is fixed there once, for all.
gh issue list --repo bioleyl/jlib --search "…".gh issue create --repo bioleyl/jlib once they agree: the
issue is public.references/agent-mistakes.md (opens in a new tab)references/api.md (opens in a new tab)references/components.md (opens in a new tab)references/components/jl-accordion-item.md (opens in a new tab)references/components/jl-accordion.md (opens in a new tab)references/components/jl-account-button.md (opens in a new tab)references/components/jl-alert.md (opens in a new tab)references/components/jl-app-icon.md (opens in a new tab)references/components/jl-app-shell.md (opens in a new tab)references/components/jl-auth-layout.md (opens in a new tab)references/components/jl-avatar-group.md (opens in a new tab)references/components/jl-avatar.md (opens in a new tab)references/components/jl-badge.md (opens in a new tab)references/components/jl-breadcrumb.md (opens in a new tab)references/components/jl-button.md (opens in a new tab)references/components/jl-calendar.md (opens in a new tab)references/components/jl-card.md (opens in a new tab)references/components/jl-checkbox.md (opens in a new tab)references/components/jl-chip-group.md (opens in a new tab)references/components/jl-chip.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub bioleyl/jlib --plugin jlib-official