shared-library-review
Skill0 starsChanged 18 days agoMITView on GitHub
Review standard for shared libraries reused across projects: headless Vue 3 component libraries (Reka UI, Tailwind v4, cva) and shared Rust backend libraries (axum). Use for review the shared library, is this library ready to tag, audit our design system. One-off app components are out of scope.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/claude.mdCLAUDE.md
- delegationSkill
- git-workflow-expertSkill
- package-releaseSkill
- polyglot-architectSkill
- rust-craftsmanSkill
- security-governanceSkill
- skill-creatorSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 51
Every token a component or consumer references resolves: no var(--x) or *-(--x) whose --x is undefined in the compiled CSS.
- Distinctive: line 62
READ-ONLY: the reviewer reports and never edits.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Shared Library Review
Triggers & Scope: The review rubric for SHARED libraries that many projects consume: a headless Vue 3 component library on Reka UI styled with Tailwind v4 over a
@themetoken set, and a shared Rust backend library. Judge for scalability, reusability, standard component patterns, anti-patterns and token discipline. For an app's one-off local component this does NOT apply.
Examples of such libraries: nuvek-ui and nuvek-web from https://github.com/jean1880. Apply the same rubric to your own.
<!-- customise: name your shared libraries and the gate command for each. -->DELEGATE: frontend and CSS → a UI-library reviewer agent (define one in sync/agents/), backend Rust → the rust-reviewer agent, standard or inline → this skill.
PIPELINES
- BLAST-RADIUS (first step of every pipeline): find who consumes the library and what each consumer pinned. A dependency graph is best; otherwise search the consuming repositories' manifests. A consumer with default features off that did not opt into an export's gating feature is OUTSIDE that export's blast radius: say so instead of flagging it.
- REVIEW-FRONTEND: change to the UI library → run the gate (build with type emission, typecheck, lint, test) → audit SCALABILITY, REUSABILITY, PATTERNS, ANTI-PATTERNS, TAILWIND and API → group findings BLOCKER, SHOULD-FIX or NIT with
file:lineand a fix → verdict PASS or CHANGES-REQUIRED. Read-only: the author applies fixes. - REVIEW-BACKEND: change to the Rust library →
cargo fmt --check,cargo clippy --all-features -- -D warnings,cargo test --all-features→ therust-reviewerchecklist plus the shared-library lens below → verdict. - ACCEPT-TAG: both gates green, verdict PASS, secret scan clean and the README documenting the public surface → tag
vX.Y.Z.
AUDIT: SCALABILITY
- Values come from theme utilities (
p-4,rounded-lg,text-sm,bg-surface,shadow-card), never arbitrary values:bg-[#0f172a],p-[13px]andtext-[11px]in a library component are drift warnings. The value belongs in@theme. - Colours are semantic (
primary,surface,fg-muted,status-*), never raw palette names. If the theme resets Tailwind's default colours (--color-*: initial),bg-sky-400failing to generate is the system working, not a bug to fix by restoring the palette. - Reskin or theme in ONE place:
@themevalues overridden under:root[data-theme=...]intheme.css. Flag anything that needs edits across N components. - Shared rules live once (theme and base layer in
theme.css); no per-component<style>restating what a utility does. In Rust, shared logic lives in the library, not re-implemented per consumer.
AUDIT: REUSABILITY
- Generic primitives: no consumer-specific strings, routes or domain logic.
- Prop APIs are minimal, typed and orthogonal: a
variantunion, not several conflicting booleans; sensiblewithDefaults. - Slots (default and named header, footer, icon) for markup flexibility over a prop per fragment.
- Typed
defineEmits<{...}>; support controlled use andv-modelwhere a parent may own state. - Every component accepts
classand merges it LAST throughcn()(clsx + tailwind-merge), so a consumer'sp-2replaces the component'sp-4. A component that drops or pre-empts the consumer'sclassis a BLOCKER, because it recreates the specificity war the stack exists to remove. - Variants via
cvawith typed props derived from it (VariantProps), not hand-built class ternaries. - Rust:
Resultand typed errors, feature-gated modules, and no secret values (readers, not values).
AUDIT: STANDARD PATTERNS
- Vue:
<script setup lang="ts">, typeddefinePropsanddefineEmits,withDefaults. - Interactive behaviour (overlays, focus trapping, portals, scroll lock, roving focus, toasts, menus, popovers) comes from a Reka UI primitive. A hand-rolled focus trap,
Teleportplus keydown listener, or customaria-liveregion where Reka has the primitive is a SHOULD-FIX: it re-owns accessibility logic Reka already tests. - Semantic HTML on the non-interactive parts;
focus-visible:ring utilities on anything focusable;motion-safe:andmotion-reduce:on animation;sr-onlylabels for icon-only controls. reka-uiandvueare peer dependencies, never bundled.- SSR-safe: no
documentorwindowat module top level; guard in lifecycle hooks; no import side effects beyond intended CSS.
AUDIT: ANTI-PATTERNS (flag on sight)
- Arbitrary values and raw palette colours;
!important modifiers;:deep()into consumer DOM. - Class strings built by interpolation (
`bg-${color}`): Tailwind scans source text and never generates them. Map variants to complete literal class names. - Inline
style=""for themeable values; a<style>block restating utilities. - Non-orthogonal boolean props; god-components; wrappers that add nothing; internal types leaked in the public API.
- Layout via margins where
gap-*fits; z-index off the--z-*scale.
AUDIT: TAILWIND AND TOKEN CONTRACT
- Every token a component or consumer references resolves: no
var(--x)or*-(--x)whose--xis undefined in the compiled CSS. A dropped token fails silently (the property is ignored), so check this mechanically, not by eye. - Opacity via modifiers (
bg-primary/10,border-status-error/30), not a parallel set of-soft,-borderor-rgbtokens. theme.csscarries@sourcefor the library's own dist, so a consumer's Tailwind generates the library's classes with no per-app config; the build test asserts it is present.- Logical-property utilities (
ps-*,pe-*,ms-*,start-*) where direction matters; container queries (@container,@md:) over viewport breakpoints for components that live in variable-width slots.
AUDIT: API AND HYGIENE
- The public entry (
index.ts) exports every component and type, and nothing internal. Rust: thepubsurface is documented and private types stay out of public signatures. - The build emits
.d.tsfor all components and composables; the JS entry has no CSS side-effect import (styling comes from the consumer's Tailwind build overtheme.css);vueandreka-uiare externalised. - The README documents each component's props, slots and events, the token-to-utility contract and the two-line consumer wiring. A Rust README documents its features and the no-secrets invariant.
MANDATES
- READ-ONLY: the reviewer reports and never edits.
- EVIDENCE-FIRST: paste build and gate output before findings, and cite
file:lineper finding. - LIBRARY-LENS: judge every call by "does it scale and stay reusable across many consumers", not "does it work for one app".
- SECRET-FREE: a shared backend library holds zero secrets, is scanner-gated, and any secret literal is a critical anomaly.
- BREAKING-CHANGE: a REMOVED or RENAMED public export (a barrel entry,
pub mod,pub use, a top-levelpubitem) is a MAJOR bump and must name its affected consumers. Never accept one on the assumption that nobody used it. - VERDICT: end with PASS (ready to tag) or CHANGES-REQUIRED. No silent pass.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

