litejs-ui
Use when building UI with LiteJS framework — writing .ui templates, creating views and routes, using bindings, handling events, i18n, El API, or editing @litejs/ui source code
What this skill does
# LiteJS UI Engine
Dependency-free ES5 UI engine (~25kB). Templates, routing, data binding, i18n, touch gestures — no transpiling/bundling.
Although written in ES5, LiteJS works seamlessly in ESM projects — just include the scripts and start building.
## Template Syntax (.ui files)
Indentation-based hierarchy using CSS selectors. Indent = child, dedent = sibling.
```
h1 My list
ul.green.star
li
a[href="#a"] Item A
li > a[href="#b"] Item B
footer
button:disabled My button
```
Becomes `<h1>My list</h1><ul class="green star"><li><a href="#a">Item A</a></li>...`.
**Selectors:** `tag#id.class1.class2[attr=value]`. Omitting tag defaults to `div`.
**Child combinator:** `li > a[href="#b"] Item B` — inline child.
**Text content:** bare text after selector becomes element text via i18n: `_(text)`.
**Raw text:** `= text content` — direct text node insertion, no i18n.
**Comments:** `/ comment text` — lines starting with `/`.
## Plugins (% prefix)
| Plugin | Usage | Purpose |
|--------|-------|---------|
| `%view name [parent]` | `%view home #public` | Define routed view |
| `%el name` | `%el Dialog` | Define reusable custom element |
| `%slot [name]` | `%slot footer` | Content placeholder in custom elements |
| `%def routes files` | `%def users/{id} users.js,%.css` | Define route with file dependencies |
| `%css` | `%css` + indented CSS block | Inject inline CSS |
| `%js` | `%js` + indented JS block | Inline JavaScript handlers |
| `%each items` | `%each ["a","b"]` | Replicate template block |
| `%svg name` | `%svg icon` | Define SVG custom element (alias for `%el`) |
| `%start` | `%start` | Trigger app initialization (start routing) |
**View names:** Starting with `#` = container without own route (structural only).
**Custom elements:** After `%el Dialog`, use `Dialog` as a selector in templates.
### Loading Templates
Templates are loaded from `<script type="ui">` tags in HTML:
```html
<script type="ui">
%view home #
h1 Hello
%start
</script>
<script src="https://litejs.com/litejs.full.min.js"></script>
```
External .ui files: `<script type="ui" src="views.ui"></script>`
## Bindings (; prefix)
Bindings connect data to DOM. Suffix `!` = execute once, don't update.
| Binding | Syntax | Effect |
|---------|--------|--------|
| `;txt` | `;txt expression` | Set text content |
| `;cls` | `;cls "active", condition` | Add/remove CSS class |
| `;css` | `;css "color", value` | Set inline style |
| `;set` | `;set "data-id", id` | Set attribute |
| `;val` | `;val formField` | Two-way form value binding |
| `;if` | `;if condition` | Conditional render (removes/restores element) |
| `;each` | `;each! "item", array` | List iteration, creates subscope per item |
| `;el` | `;el tagName` | Dynamic element type |
| `;ref` | `;ref myRef` | Store element reference in scope |
| `;name` | `;name fieldName` | Set form element name |
| `;view` | `;view url` | Set href for view navigation |
| `;on` | `;on "event", handler` | Attach event listener |
| `;one` | `;one "event", handler` | One-time event listener |
| `;is` | `;is value, "a,10=b,20=c"` | Threshold-based class switching |
| `;d` | `;d text` | Render block-level document markup |
| `;t` | `;t text` | Render inline markup |
| `;xlink` | `;xlink "#route"` | SVG namespace href (`xlink:href`) |
| `$s` | `;$s` | Initialize scope with element attributes |
**Once modifier:** `;txt! value` — bind at render, never re-evaluate.
**Default binding:** Bare text `h1 Hello` becomes `;txt _("Hello",$s)` — auto i18n lookup.
**Unknown bindings** fall through to `;set` (attribute setter). E.g., `;href! url` sets the `href` attribute.
**Separator:** `:` works the same as space: `;txt:value` equals `;txt value`.
**View-level bindings:** Inside `%view`, bindings set view properties. `;f "file.js"` sets file dependencies loaded on navigation.
## Event Shorthand (@ prefix)
```
@click handler → ;on! "click", handler
@click! handler → ;one! "click", handler
@keyup "navigate", param → ;on! "keyup", "navigate", param
```
Event handlers can be strings (emitted on View) or function references.
**Important:** Outside of `%view` blocks, `@click handler` resolves `handler` from the scope chain. Since the scope is `$d` (global scope), the handler function must be on `$d`:
```javascript
%js
// WRONG — function declaration not accessible from template scope
function doSomething() { ... }
// RIGHT — attach to $d so template bindings can find it
$d.doSomething = function() { ... }
```
## `;val` Binding Details
`;val` is designed for **form-level** two-way binding. Put `;val data` on a `form` element and use `name` attributes on inputs:
```
form
;val data
input[name=email][type=email]
textarea[name=notes][rows=4]
```
This syncs form values into `$d.data = {email: "...", notes: "..."}`.
**Gotcha:** Using `;val field` on a standalone input/textarea (outside a `form` with `;val`) does **not** reliably sync user input back to the scope variable. For standalone elements, either wrap in a form or read the DOM value directly:
```javascript
var el = document.getElementById("myInput")
var value = el.value
```
## Views and Routes
### Initialization
```javascript
var app = LiteJS()
```
Options only needed when changing defaults:
| Option | Default | Effect |
|--------|---------|--------|
| `home` | `"home"` | Default view name |
| `root` | `document.body` | Root element for views |
| `breakpoints` | — | Responsive breakpoints, e.g. `"sm,601=md,1025=lg"` |
| `locales` | — | Locale definitions, e.g. `{en: "en"}` |
| `globals` | — | Default translations |
Returns View constructor. Available as `$ui` in templates, use chosen variable name (`app`) in plain JavaScript.
### Defining Views
In .ui templates:
```
%view #public #
.app
nav
a[href="#home"] Home
%slot
%view home #public
p Welcome
%view user/{userId} #public
p User {params.userId}
```
In JavaScript:
```javascript
app.def("route file.js,file.css\nuser/{id} user.js")
app.show("home")
app.get(url, params)
app.param(["user"], function(value, name, view, params) { /* resolve */ })
```
### View Lifecycle
Navigation: `app.show(url)` → route match → `ping` (each view, async-friendly with `this.wait()`) → render → `open` → `show`.
| Event | When |
|-------|------|
| `ping` | Before render, fetch data here. Call `this.wait()` for async. |
| `pong` | After render |
| `open` | View becomes active |
| `close` | View deactivated |
| `nav` | Navigation started |
| `show` | Navigation complete |
| `resize` | Viewport resized |
### Scope Variables
| Variable | Contains |
|----------|----------|
| `$s` | Current scope |
| `$el` | Current element |
| `$ui` | View router (in templates; use chosen var name in plain JS) |
| `$d` | Global scope |
| `$up` | Parent scope |
| `$i` | Loop index (inside `;each`) |
| `$len` | Loop length (inside `;each`) |
| `_()` | i18n format function |
| `params` | URL parameters |
## El API
`El(selector)` — Create DOM element from CSS selector string.
```javascript
El("div#id.class1.class2[data-x=1]") // Create element
```
### Static Methods
| Method | Purpose |
|--------|---------|
| `El.append(parent, child)` | Append, handles slots |
| `El.render(el)` | Process bindings on element tree |
| `El.scope(el, parent)` | Get/create scope for element |
| `El.cls(el, name, add, sel, delay)` | Add/remove/toggle class (optional auto-revert after delay ms) |
| `El.flip(el, sel, fn, opts)` | FLIP animation (snapshot, mutate, animate) |
| `El.get(el, attr)` | Get attribute |
| `El.val(el, val)` | Get/set form value (handles nested forms, selects, checkboxes) |
| `El.kill(el, transition)` | Remove element (with optional CSS transition) |
| `El.empty(el)` | Remove all children |
| `El.replace(old, new)` | Replace element |
| `El.closest(el, sel)` | Find closest ancestor matching selector |
| `El.matches(el, sel)` | Test if element matches selector |
| `El.nearest(el, sel)` | FindRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.