vani-keyed-lists
SKILL.md
Keyed Lists and Item Updates
Instructions for rendering lists where each row updates independently.
When to Use
Use this when a list needs item-level updates without re-rendering the whole list.
Steps
- Represent items by id and store them in a
Mapor array with stable ids. - Create a row component that reads an item by id.
- Use
keyon each row to preserve identity across reorders. - For item-level updates, choose one:
- Store a
ComponentRefper id and callref.current?.update()(orref.current?.update({ onlyAttributes: true })for class/attr changes). - Use signals with
text()/attr()for fine-grained row updates.
- Store a
- Call the list handle only when list structure changes (add/remove/reorder).
Arguments
- itemTypeName - name for the list item type (defaults to
Item) - listName - component name for the list (defaults to
List) - useMapStore - whether to store items in a
Map(defaults totrue)
Examples
Example 1 usage pattern:
Implement a todo list with keyed rows and per-row updates on toggle.
Example 2 usage pattern:
Reorder items by id while preserving row identity with key.
Output
Example output:
Created: src/list.ts
Notes: Row updates call ref.current?.update() or use signals.
Present Results to User
Describe the list data structure, how refs/signals are stored, and when the list handle updates.
name: vani-keyed-lists description: Build scalable Vani lists with keyed rows and per-item updates. argument-hint: "[list feature]"
Vani Keyed Lists Command
When to use
Use this skill when building lists or collections that require efficient updates.
Instructions
Follow these steps:
- Model list items by id (Map or array with stable ids).
- Create a
Rowcomponent and passkey,ref, and item accessors. - Update a single item via
ref.current?.update()or signals withtext()/attr(). - Call the list handle only when structure changes (add/remove/reorder).
Output expectations
- Use
ComponentRefor signals for per-row updates. - Use
update({ onlyAttributes: true })for class/attr-only changes. - Avoid re-rendering the entire list for single-item changes.
- If $ARGUMENTS is provided, map it to the list domain and update flows.
Weekly Installs
7
Repository
itsjavi/vaniFirst Seen
Jan 24, 2026
Security Audits
Installed on
claude-code5
gemini-cli4
windsurf4
antigravity4
github-copilot4
trae4