.agents/skills/repo-website-api-create/SKILL.md
Create new API documentation routes for the Formisch website. Use when adding documentation for new exported functions, types, components, or methods that don't yet have website documentation.
npx skillsauth add open-circle/formisch repo-website-api-createInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides instructions for adding new API reference routes to the Formisch website. Consistency and uniformity across all API documentation is critical.
Key Principle: Source code is the single source of truth. All documentation is derived directly from the source code.
Each API function or type needs its own folder containing:
index.mdx - The main documentation file with MDX contentproperties.ts - TypeScript definitions that map to the Property componentBefore creating documentation:
This is the most critical step. Read the entire source file and extract:
extends clausesCreate folder in the appropriate category:
/website/src/routes/(docs)/{framework}/api/(category)/{ApiName}/
├── index.mdx
└── properties.ts
Categories by framework:
core/api/(types) - Core/shared type definitionsmethods/api/ - Global methods (focus, validate, reset, etc.)solid/api/(primitives) - SolidJS primitives (createForm, useField)solid/api/(components) - SolidJS components (Field, Form)solid/api/(types) - SolidJS-specific typesqwik/api/(hooks) - Qwik hooks (useForm$, useField)preact/api/(hooks) - Preact hookssvelte/api/(runes) - Svelte 5 runesvue/api/(composables) - Vue composablesSee references/property-component.md for the Property component specification and type mapping patterns.
import type { PropertyProps } from '~/components';
export const properties: Record<string, PropertyProps> = {
// 1. GENERICS - with modifier: 'extends'
TSchema: {
modifier: 'extends',
type: {
type: 'custom',
name: 'Schema',
href: '/core/api/Schema/',
},
},
// 2. PARAMETERS - matching function signature
config: {
type: {
type: 'custom',
name: 'FormConfig',
href: '../FormConfig/',
generics: [{ type: 'custom', name: 'TSchema' }],
},
},
// 3. RETURN TYPE
Store: {
type: {
type: 'custom',
name: 'FormStore',
href: '../FormStore/',
generics: [{ type: 'custom', name: 'TSchema' }],
},
},
};
See references/mdx-patterns.md for detailed MDX structure and patterns.
---
title: createForm
description: Creates a reactive form store from a form configuration.
source: /frameworks/solid/src/primitives/createForm/createForm.ts
contributors:
- fabian-hiller
---
import { ApiList, Property } from '~/components';
import { properties } from './properties';
# createForm
Creates a reactive form store from a form configuration.
\`\`\`ts
const form = createForm<TSchema>(config);
\`\`\`
## Generics
- `TSchema` <Property {...properties.TSchema} />
## Parameters
- `config` <Property {...properties.config} />
### Explanation
With `createForm` you can create a reactive form store...
## Returns
- `form` <Property {...properties.Store} />
## Examples
The following examples show how `createForm` can be used.
### Basic form
\`\`\`ts
import { createForm } from '@formisch/solid';
import \* as v from 'valibot';
const LoginSchema = v.object({
email: v.pipe(v.string(), v.email()),
password: v.pipe(v.string(), v.minLength(8)),
});
const loginForm = createForm({ schema: LoginSchema });
\`\`\`
## Related
### Primitives
<ApiList
items={[
{ text: 'useField', href: '../useField/' },
{ text: 'useFieldArray', href: '../useFieldArray/' },
]}
/>
### Components
<ApiList
items={[
{ text: 'Form', href: '../Form/' },
{ text: 'Field', href: '../Field/' },
]}
/>
Add to the appropriate menu.md file in alphabetical order:
## Primitives
- [createForm](/solid/api/createForm/)
- [useField](/solid/api/useField/)
Parentheses folders don't appear in URLs:
/solid/api/createForm/ (not /solid/api/(primitives)/createForm/)../FormStore//core/api/Schema/https://valibot.dev/api/InferInput/| Framework | Category Term | Example API | | --------- | ------------- | -------------------- | | Solid | Primitives | createForm, useField | | Qwik | Hooks | useForm$, useField | | Preact | Hooks | useForm, useField | | Vue | Composables | useForm, useField | | Svelte | Runes | createForm, useField |
For detailed patterns and examples, see:
Before submitting:
menu.md updated in alphabetical orderdevelopment
Add new documentation guides and tutorials to the Formisch website. Use when creating guides about form concepts, features, or techniques that aren't covered by existing documentation.
development
Update existing API documentation when Formisch source code changes. Use when function signatures, types, interfaces, or JSDoc comments change in the library source.
development
Review and verify API documentation routes on the Formisch website. Use when checking documentation accuracy, completeness, and consistency with source code.
development
Navigate the Formisch monorepo structure. Use when finding code locations, understanding architecture, locating source files, or implementing features across packages and frameworks.