formkit-core-skilld
БесплатноБез исполняемых скриптовНе проверенUse whenever writing, debugging, or reviewing code that imports @formkit/core — FormKit's framework-agnostic core (node trees, values, events, hooks, message…
от skilld-dev★ 188 звёзд на GitHubОб этом скилле
@formkit/core 2.1.2
Framework-agnostic core of FormKit. Every input, group, list, and form is a
FormKitNode in a tree. Vue and React adapters (@formkit/vue,
@formkit/react) render these nodes; input types, validation, and i18n live in
sibling packages, not here. Scope this Skill to @formkit/core imports only.
- Package:
@formkit/[email protected], ESM ("type": "module") with CJS fallback, plus adevelopmentcondition build (package.json:8-21). - Sole dependency:
@formkit/utils@^2.1.2(package.json:38-40). - Docs: https://formkit.com/essentials/architecture
- API reference: https://formkit.com/api-reference/core
When to use another package
| Need | Package |
|---|---|
<FormKit> components, defaultConfig, createInput |
@formkit/vue / @formkit/react |
Input type definitions (text, select…) |
@formkit/inputs |
| Validation rules | @formkit/validation |
| Locale messages | @formkit/i18n |
| Schema rendering | @formkit/vue (types + compiler are here) |
Public API
Runtime exports (dist/index.mjs:1919): bfs, clearErrors, compile,
createClasses, createConfig, createMessage, createNode,
createPlaceholder, createValue, deregister, error, errorHandler,
generateClassList, getNode, isComponent, isConditional, isDOM,
isList, isNode, isPlaceholder, isSugar, names, register, reset,
resetCount, resetRegistry, setErrors, stopWatch, submitForm,
sugar, use, useIndex, valueInserted, valueMoved, valueRemoved,
warn, warningHandler, watchRegistry, FORMKIT_VERSION — plus ~70 public
types (dist/index.d.mts:2329).
Common tasks
Create a node tree
import { createNode } from '@formkit/core'
const email = createNode({ name: 'email' })
const form = createNode({
type: 'group', // 'input' (default) | 'group' | 'list'
children: [email, createNode({ name: 'password' })],
})
form.at('email') // → the email node
Group values are objects keyed by child name; list values are arrays keyed
by child index (dist/index.mjs:714-723). Full option table:
node API.
Set a value and await settlement
await email.input('[email protected]') // debounced, async commit
email.value // committed value
Never assign node.value = x directly. input() debounces (default 20 ms on
input nodes, dist/index.mjs:1255-1267), then commits through the commit
hook (dist/index.mjs:759-765). await node.settled resolves when the whole
subtree finished committing (dist/index.d.mts:1856-1860).
Listen to events (and clean up)
const receipt = form.on('commit.deep', ({ payload }) => { ... })
// later:
form.off(receipt)
.deep catches events bubbling from descendants (dist/index.mjs:47-53).
on() returns a receipt; always pass it to off(). Core event table:
events and hooks.
Register hook middleware
node.hook.commit((value, next) => next(transform(value)))
Middleware signature is (payload, next) => next(payload); hooks:
classes, commit, error, setErrors, init, input, message,
prop, text, schema (dist/index.d.mts:579-600). Register inside plugins
for reuse.
Write a plugin
import { createNode } from '@formkit/core'
import type { FormKitPlugin } from '@formkit/core'
const colorize: FormKitPlugin = (node) => {
node.props.color = node.type === 'group' ? 'yellow' : 'teal'
// return false to stop inheritance by children
}
createNode({ type: 'group', plugins: [colorize], children: [createNode()] })
Plugins are inherited by descendants and run once per node. Attach
plugin.library to define custom input types via node.define().
Store a message; count with the ledger
import { createMessage, createNode } from '@formkit/core'
const node = createNode()
node.store.set(createMessage({ key: 'limit', value: 'Too many!' }))
node.store.limit.value // 'Too many!'
node.ledger.count('visible', (m) => m.visible)
node.on('count:visible', ({ payload }) => console.log(payload))
Details: store and ledger.
Reach a node by id
import { createNode, getNode, watchRegistry, stopWatch } from '@formkit/core'
const node = createNode({ props: { id: 'manufacturer' } }) // root nodes register
getNode('manufacturer') // FormKitNode | undefined
const receipt = watchRegistry('manufacturer', (e) => { ... })
stopWatch(receipt)
Root nodes (or nodes with props.alias) register automatically
(dist/index.d.mts:2220-2228). Details:
registry and helpers.
Set errors, reset, submit
import { setErrors, clearErrors, reset, submitForm } from '@formkit/core'
setErrors('myForm', 'Server rejected', { email: ['Already taken'] })
reset('myForm', { email: '' }) // resetTo becomes the new initial
Установить formkit-core-skilld в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл formkit-core-skilld?
Use whenever writing, debugging, or reviewing code that imports @formkit/core — FormKit's framework-agnostic core (node trees, values, events, hooks, message stores, ledgers, config, schema types, expression compiler). Provides correct 2.1.x API signatures, common-task examples, behavioral rules, and version limits.
Как установить скилл formkit-core-skilld?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл formkit-core-skilld запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic