Svelte Core Best Practices
rilldata/rill
Rules for writing idiomatic Svelte 5 code: when to reach for runes like state, derived and effect, and how to handle props, attachments and bindings.
Rules for writing Lit elements in an AIDD project: binding elements on DatabaseElement, observed values, presentation components and action-style callbacks.
$ npx skills add paralleldrive/aidd --skill aidd-lit -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install paralleldrive/aidd aidd-lit --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/paralleldrive/aidd.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ai/skills/aidd-lit .claude/skills/aidd-lit && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "aidd-lit" agent skill from https://github.com/paralleldrive/aidd/tree/main/ai/skills/aidd-lit into .claude/skills/aidd-lit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aidd-lit", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/paralleldrive/aidd/tree/main/ai/skills/aidd-litType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add paralleldrive/aidd --skill aidd-lit -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install paralleldrive/aidd aidd-lit --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/paralleldrive/aidd.git skills-src && mkdir -p .agents/skills && cp -r skills-src/ai/skills/aidd-lit .agents/skills/aidd-lit && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "aidd-lit" agent skill from https://github.com/paralleldrive/aidd/tree/main/ai/skills/aidd-lit into .agents/skills/aidd-lit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aidd-lit", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add paralleldrive/aidd --skill aidd-lit -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install paralleldrive/aidd aidd-lit --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/paralleldrive/aidd.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/ai/skills/aidd-lit .cursor/skills/aidd-lit && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "aidd-lit" agent skill from https://github.com/paralleldrive/aidd/tree/main/ai/skills/aidd-lit into .cursor/skills/aidd-lit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aidd-lit", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/paralleldrive/aidd.git --path ai/skills/aidd-lit--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add paralleldrive/aidd --skill aidd-lit -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install paralleldrive/aidd aidd-lit --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/paralleldrive/aidd.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/ai/skills/aidd-lit .gemini/skills/aidd-lit && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "aidd-lit" agent skill from https://github.com/paralleldrive/aidd/tree/main/ai/skills/aidd-lit into .gemini/skills/aidd-lit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aidd-lit", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install paralleldrive/aidd aidd-litInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add paralleldrive/aidd --skill aidd-lit -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/paralleldrive/aidd.git skills-src && mkdir -p .github/skills && cp -r skills-src/ai/skills/aidd-lit .github/skills/aidd-lit && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "aidd-lit" agent skill from https://github.com/paralleldrive/aidd/tree/main/ai/skills/aidd-lit into .github/skills/aidd-lit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aidd-lit", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add paralleldrive/aidd --skill aidd-lit -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install paralleldrive/aidd aidd-lit --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/paralleldrive/aidd.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/ai/skills/aidd-lit .opencode/skills/aidd-lit && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "aidd-lit" agent skill from https://github.com/paralleldrive/aidd/tree/main/ai/skills/aidd-lit into .opencode/skills/aidd-lit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aidd-lit", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
aidd-litRules for writing Lit elements in an AIDD project: binding elements on DatabaseElement, observed values, presentation components and action-style callbacks.
Lit elements sit in the components layer and consume Observe values and void actions from plugins. Binding elements extend DatabaseElement with the required plugin named in the generic, which makes sure the plugin's services are added to the main database before the first render so the service exposes the right Observe APIs and actions. Presentation elements are kept separate, and only binding elements connect to data.
Most binding elements make a single useObservableValues call that gathers just the values needed for rendering, using Observe.withDefault for slow values so a skeleton can show at once. Presentation files export only render, plus unlocalized bundles where needed. Callbacks are named as verb-noun action calls, not click or toggle events, and @property is almost never used on binding elements. Presentations are unit tested, while binding elements are not, since they hold no business logic.
Read from SKILL.md and the folder at commit 9a7c8e3. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are sudolang and typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Lit Element Authoring loads about 1.2k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 132 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from paralleldrive/aidd at commit 9a7c8e3, republished under its MIT licence (© paralleldrive). 132 words, ~1,202 tokens.
.claude/skills/aidd-lit/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Lit elements live in the components/ layer per structure. Consume Observe and void actions from plugins per service.
Binding elements extend DatabaseElement<typeof myPlugin> — either directly or via an intermediate base class. The required plugin must be specified in the generic.
This ensures the plugin's services are extended onto the main database before the element renders, so this.service exposes the correct Observe APIs and actions.
// Direct
export class HelloWorldElement extends DatabaseElement<typeof helloWorldPlugin> {
get plugin() { return helloWorldPlugin; }
}
// Indirect — base extends DatabaseElement, leaf specifies plugin
export class LayoutElement<T extends MyApplicationPlugin = MyApplicationPlugin> extends CoreApplicationElement<T> { }
export class ToolbarElement extends LayoutElement<typeof toolbarPlugin> { }BindingElement {
injects: "observed values via useObservableValues"
triggers: "re-render when those values change"
binds: "action callbacks to the presentation"
}
Presentation {
type: "pure function (no hooks)"
receives: "data and action callbacks as props"
returns: "TemplateResult"
constraint: "Keep reactive logic in binding element; presentation stays pure"
}Testing {
presentation: "add *.test.ts when appropriate; unit test the presentation"
bindingElement: "not unit tested — no business logic; uses Database service (already unit tested)"
}Most binding elements use a single useObservableValues call. Collect all observed values in one object.
Observe only what you need — the minimal values required for rendering. For values that may resolve slowly, wrap with Observe.withDefault so you can render a skeleton (or placeholder) immediately while waiting. See observe.
render() {
const values = useObservableValues(() => ({
visible: this.service.actions.isViewVisible(name),
userProfile: this.service.services.authentication.userProfile,
}));
if (!values) return;
return presentation.render({ ...values, toggleView: () => this.toggleView(name) });
}Constraints {
Presentation files ONLY export render (and unlocalized bundles where appropriate)
Nothing else ever exported from a presentation file
For render args type externally: use Parameters<typeof render>[0]
}PresentationCallbacks {
are: "action calls, not events"
semantics: "verbNoun — not onClick/onToggle/onSignOut style"
bindingElement: "passes action callbacks (e.g. toggleView, signOut) as props"
presentation: "invokes them when user intent occurs"
callback: "calls the service/transaction directly"
}// Binding element: binds the action (verbNoun)
toggleView: () => this.toggleToolbarChild(name)
// Presentation: receives and invokes when user acts
item.toggleView()PropertyRules {
default: "Almost never use @property on binding elements"
exception: "Use properties ONLY when needed to bind to the correct entity in the database (e.g. entity for table rows, layer for view hosts)"
multipleInstances: "need a property to identify which entity they represent"
singleInstanceElements: "have no properties; observe values directly; re-render only when those values change"
}fn whenCreatingOrModifyingLitElement() {
Constraints {
Extend DatabaseElement<typeof myPlugin> (directly or indirectly) with required plugin specified
Split into binding element (reactive) and presentation (pure)
Use single useObservableValues in binding element; Observe only minimal values; use Observe.withDefault for slow-resolving values
Pass observed values and action callbacks to presentation
Keep presentation pure — no hooks
Add @property only when entity binding requires it (multiple instances)
Presentation exports only render (and localization bundles where appropriate)
Add *-presentation.test.ts for presentation when appropriate; do not unit test binding elements
Never include business logic within binding elements — move into computed values or action handlers
Good binding elements should be extremely small
}
}© paralleldrive, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in ai/skills/aidd-lit of paralleldrive/aidd.
Open the folder on GitHubat commit 9a7c8e3
Lit Element Authoring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Lit Element Authoring this skillparalleldrive/aidd | 384 | — | ~1.2k | Automated safety check: Pass | MIT | |
| Svelte Core Best Practicesrilldata/rill | 2.9k | 4 repos | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| Frontend Patternskurealnum/dotfiles | 290 | 19 repos | ~3.7k | Automated safety check: Pass | None | |
| LobeHub Data Fetching Layerslobehub/lobehub | 83k | — | ~1.7k | Automated safety check: Pass | Custom licence | |
| Guide to the ofa.js Frameworkofajs/ofa.js | 754 | — | ~13k | Automated safety check: Pass | MIT | |
| Cursor BYOK Frontend Guideleookun/cursor-byok | 3.2k | — | ~1.9k | Automated safety check: Pass | MIT |
rilldata/rill
Rules for writing idiomatic Svelte 5 code: when to reach for runes like state, derived and effect, and how to handle props, attachments and bindings.
kurealnum/dotfiles
Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.
lobehub/lobehub
Explains how LobeHub client code fetches data through services, SWR store hooks and cache keys, and when to avoid useEffect fetching or duplicated state.
ofajs/ofa.js
Documentation knowledge base for the ofa.js no-build front-end framework, with rules that keep generated code in ofa.js syntax rather than Vue or React habits.
leookun/cursor-byok
Sets the rules for building the Cursor BYOK desktop app's React and Tauri frontend, especially its HTTP boundary and component state architecture.
ofajs/ofa.js
Reference knowledge base for the no-build ofa.js framework, with syntax rules and a table of mistakes to avoid when writing components, pages and routes.
paralleldrive/aidd
Guides creating, reviewing or refactoring AI-Driven Development skills so each one stays minimal, composable and named around a single clear function.
paralleldrive/aidd
Enforces a split of UI components into terminal and layout types, with layout components composing others through standard layout tokens, for cleaner structure and fewer re-renders.
paralleldrive/aidd
Enforces @adobe/data/ecs practices when writing Database.Plugin definitions, including property order, plugin composition, services, components, resources and archetypes.
paralleldrive/aidd
Has your agent throw and catch JavaScript and TypeScript errors with the error-causes library, using named causes, preserved originals and routed handlers.
paralleldrive/aidd
Teaches the saga pattern with call and put so network requests and side effects stay out of the logic and sagas can be tested without mocks.
paralleldrive/aidd
Adds completed epics to a changelog in reverse chronological order, one emoji-tagged line each, covering only significant user-facing work.
Categories
Rules for writing Lit elements in an AIDD project: binding elements on DatabaseElement, observed values, presentation components and action-style callbacks. Lit elements sit in the components layer and consume Observe values and void actions from plugins. Binding elements extend DatabaseElement with the required plugin named in the generic, which makes sure the plugin's services are added to the main database before the first render so the service exposes the right Observe APIs and actions.
Lit Element Authoring fits situations like: creating a new Lit binding element that observes database values; splitting a Lit component into a binding element and a presentation; naming and wiring action callbacks in a Lit UI.
Run `npx skills add paralleldrive/aidd --skill aidd-lit -a claude-code`. Or copy the skill folder (ai/skills/aidd-lit in paralleldrive/aidd) into .claude/skills/aidd-lit in your project. Claude Code loads it when a task matches its description.
Run `npx skills add paralleldrive/aidd --skill aidd-lit -a codex`. Or copy the skill folder (ai/skills/aidd-lit in paralleldrive/aidd) into .agents/skills/aidd-lit in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add paralleldrive/aidd --skill aidd-lit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/aidd-lit, .gemini/skills/aidd-lit, .github/skills/aidd-lit and .opencode/skills/aidd-lit in your project.
SKILL.md names no scripts, command-line tools or credentials: Lit Element Authoring is instructions for the agent only. Our summary lists: An AIDD project with the structure, service and observe skills.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Lit Element Authoring is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Lit Element Authoring: Svelte Core Best Practices (rilldata/rill, 2.9k stars), Frontend Patterns (kurealnum/dotfiles, 290 stars), LobeHub Data Fetching Layers (lobehub/lobehub, 83k stars) and Guide to the ofa.js Framework (ofajs/ofa.js, 754 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
paralleldrive (a GitHub organization) maintains it in paralleldrive/aidd, which has 384 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on June 12, 2026.
Source: paralleldrive/aidd on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.