form-library-integration

form-library-integration is a skill for Claude Code, Codex from asmyshlyaev177/state-in-url. It costs 94 tokens per session (1,894 once invoked), scanned A, original, MIT.

A guide for connecting URL-synced state to form libraries such as react-hook-form or Formik. It treats the URL as a form draft that can be loaded and updated.

In plain words
What is it for?
Use it for filter forms and other React forms whose current values need to round-trip through the URL.
Why use it?
It keeps form values and URL values aligned, so a form can be restored from or shared through a link.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for filter forms and other React forms whose current values need to round-trip through the URL.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asmyshlyaev177/state-in-url/form-library-integration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add asmyshlyaev177/state-in-url --skill form-library-integration
Clone the repo
git clone --depth 1 https://github.com/asmyshlyaev177/state-in-url

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for form-library-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/asmyshlyaev177/state-in-url/form-library-integration/github.svg)](https://agentmods.dev/skills/asmyshlyaev177/state-in-url/form-library-integration)
Your own site
<a href="https://agentmods.dev/skills/asmyshlyaev177/state-in-url/form-library-integration"><img src="https://agentmods.dev/badge/skills/asmyshlyaev177/state-in-url/form-library-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for form-library-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/asmyshlyaev177/state-in-url/form-library-integration"><img src="https://agentmods.dev/badge/skills/asmyshlyaev177/state-in-url/form-library-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,894 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00094 $0.01894
Opus 5.5 $0.00038 $0.00758
Sonnet 5.5 $0.00019 $0.00379
Haiku 4.5 $0.00009 $0.00189

Measured 1mo ago against content hash 42e2dd84fa1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

form-library-integration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/form-library-integration/SKILL.md · 212 lines

How it starts

The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.

This skill builds on state-in-url/feature-state-hook. Read it first for the module-scoped default-state rule.

state-in-url — Form library integration (react-hook-form)

The canonical pattern: one module-scoped defaults object owns the form shape, both useUrlState and useForm consume it, RHF's subscribe() callback pushes form changes into setUrl. Hydration from URL happens through defaultValues: urlState.

Setup

// features/filters/filtersState.ts
import { z } from 'zod';

export const filtersSchema = z.object({
  q: z.string(),
  sort: z.enum(['name', 'date']),
  tags: z.array(z.string()),
});
export type FiltersState = z.infer<typeof filtersSchema>;

export const FILTERS_STATE: FiltersState = {
  q: '',
  sort: 'name',
  tags: [],
};
// features/filters/FiltersForm.tsx
'use client';
import React from 'react';
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { useUrlState } from 'state-in-url/next';
import { FILTERS_STATE, filtersSchema, type FiltersState } from './filtersState';

// `searchParams` forwarded by the server page that renders this form
export function FiltersForm({ searchParams }: { searchParams?: object }) {
  const { urlState, setUrl } = useUrlState(FILTERS_STATE, { searchParams });

  const form = useForm<FiltersState>({
    resolver: zodResolver(filtersSchema),
    defaultValues: urlState, // hydrate from URL on mount
  });

  React.useEffect(() => {
    const sub = form.subscribe({
      formState: { values: true },
      callback: ({ values }) => setUrl(values),
    });
    return () => sub();
  }, [form, setUrl]);

  return (
    <form>
      <input {...form.register('q')} />
      <select {...form.register('sort')}>
        <option value="name">Name</option>
        <option value="date">Date</option>
      </select>
    </form>
  );
}

Core Patterns

Hydrate useForm from urlState

defaultValues: urlState runs once on mount; the form is initialized with whatever the URL contained (or FILTERS_STATE defaults if URL is empty).

Read the full file on GitHub · 212 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed 42e2dd84fa1d
  2. 1mo ago Changed cde960c4776f
  3. 2mo ago First seen · 212 lines · 94 tokens per session scan A 8ac4bd75fcfb

Subscribe to this mod's changes

form-library-integration is a skill published in the GitHub repository asmyshlyaev177/state-in-url (419 stars, last pushed 1mo ago), licensed MIT. It adds 94 tokens to every session and 1,894 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-22.

Related

form-library-integration compared with skills from other repositories

form-library-integration next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
form-library-integrationasmyshlyaev177/state-in-urlSkill4191mo agoMITA94Claude Code, Codex
reskinCopilotKit/CopilotKitSkill39ktodayMITA154Claude Code
copilotkit-channelsCopilotKit/CopilotKitSkill39ktodayMITA112Claude Code
setup-slack-channelCopilotKit/CopilotKitSkill39ktodayMITA206Claude Code
a2ui-catalogCopilotKit/CopilotKitSkill39ktodayMITA190Claude Code
copilotkit-cliCopilotKit/CopilotKitSkill39ktodayMITA87Claude Code
a2ui-coreCopilotKit/CopilotKitSkill39ktodayMITA18Claude Code