rule-api-form-schema

Enforce three-schema API form structures with Draft 2020-12 validation.

1|1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/btabaska/simpler-grants-documentation-automation --skill rule-api-form-schema
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rule-api-form-schema
Source: https://github.com/btabaska/simpler-grants-documentation-automation/tree/main/.claude/skills/rule-api-form-schema
Command: npx skills add https://github.com/btabaska/simpler-grants-documentation-automation --skill rule-api-form-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Defines and enforces a standardized three-schema pattern for API form schemas to ensure consistent validation, rendering, and rule processing across the codebase.

Core Features & Use Cases

  • Enforces three-schema architecture: FORM_JSON_SCHEMA (validation), FORM_UI_SCHEMA (rendering), FORM_RULE_SCHEMA (pre/post population and custom validation), all co-located and bundled into a static Form instance registered in get_active_forms().
  • Ensures JSON Schema validity using Draft 2020-12 with a custom OUR_VALIDATOR and a check_schema() guard, preventing runtime misconfigurations.
  • Supports non-blocking validation patterns with warnings and aligns with legacy Grants.gov compatibility via declarative XML transform rules.

Quick Start

Create a new API form by defining JSON, UI, and Rule schemas, wrap them in a Form instance, and register it in get_active_forms().

Frequently Asked Questions about rule-api-form-schema

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure API form schemas for consistent validation and rendering?

To structure API form schemas consistently, enforce a three-schema architecture co-locating FORM_JSON_SCHEMA for validation, FORM_UI_SCHEMA for rendering, and FORM_RULE_SCHEMA for population logic. These schemas are bundled into a static Form instance registered in get_active_forms().

What is the best way to validate JSON Schema Draft 2020-12 for API forms?

The best way to validate JSON Schema Draft 2020-12 for API forms is using a custom OUR_VALIDATOR with a check_schema() guard. This prevents runtime misconfigurations and ensures schema validity before forms are active.

How do I create a new API form using a three-schema architecture?

To create a new API form, define the JSON, UI, and Rule schemas under api/src/form_schema/**. Wrap these three schemas in a Form instance and register it within the get_active_forms() function to activate it.

Can I use declarative XML transform rules with Grants.gov form schemas?

Yes, you can use declarative XML transform rules with Grants.gov form schemas. The three-schema structure supports legacy Grants.gov compatibility by applying XML transforms through the FORM_RULE_SCHEMA.

Does the three-schema pattern support non-blocking validation with warnings?

Yes, the three-schema pattern supports non-blocking validation with warnings. The FORM_RULE_SCHEMA handles custom validation logic, allowing the system to return warnings instead of blocking errors during form processing.