skrift-forms

Automate secure form handling with Pydantic models, CSRF protection, and template rendering.

1|3|Updated Jun 17, 2025
One-click install
npx skills add https://github.com/Smarter-Dev/smarter-dev --skill skrift-forms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skrift-forms
Source: https://github.com/Smarter-Dev/smarter-dev/tree/main/smarter_dev/.claude/skills/skrift-forms
Command: npx skills add https://github.com/Smarter-Dev/smarter-dev --skill skrift-forms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Skrift form system provides secure, validated web forms with CSRF protection, templating, and extendable hooks, reducing boilerplate and errors in form handling.

Core Features & Use Cases

  • Pydantic-based form models with automatic registration
  • CSRF protection with token rotation and validation
  • Template rendering support and built-in form rendering helpers
  • Hook integration for post-validation processing and global hooks
  • Simple, end-to-end form lifecycle in web applications

Quick Start

Create a ContactForm using FormModel or @form decorator, then render it in a controller and validate submissions.

Frequently Asked Questions about skrift-forms

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

FAQPage Schema
How do I handle web form validation with Pydantic models?

Web form validation with Pydantic models is handled by defining a FormModel or using a @form decorator, which automatically registers the form and manages the validation flow for your web application.

How do I add CSRF protection to Pydantic forms?

CSRF protection for Pydantic forms is automatically managed through built-in token generation, rotation, and validation, securing your web workflows without requiring manual token handling.

Can I render Pydantic forms directly in Jinja2 templates?

Yes, Pydantic forms can be rendered directly in Jinja2 templates using built-in form rendering helpers, as the system provides global Jinja2 availability for template rendering.

What is the best way to run post-validation processing on form submissions?

The best way to run post-validation processing is through hook integration, which allows you to execute custom logic automatically after the Pydantic form validation flow succeeds.

Do I need external dependencies to manage form lifecycle and CSRF tokens?

No external dependencies are required to manage the form lifecycle and CSRF tokens, as the system provides a complete end-to-end solution with built-in validation and template rendering.

Why does my form submission fail validation before hooks execute?

Form submission validation fails before hooks execute because hook integration is strictly designed for post-validation processing, meaning the Pydantic model must successfully validate first.