astro-forms

Form infrastructure for Astro. Zod validation, email, rate limiting, Turnstile, GDPR, Sheets. FAIL = no conversion.

16 stars

Best use case

astro-forms is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Form infrastructure for Astro. Zod validation, email, rate limiting, Turnstile, GDPR, Sheets. FAIL = no conversion.

Teams using astro-forms should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/astro-forms/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/backend/astro-forms/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/astro-forms/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How astro-forms Compares

Feature / Agentastro-formsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Form infrastructure for Astro. Zod validation, email, rate limiting, Turnstile, GDPR, Sheets. FAIL = no conversion.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Astro Forms Skill

**Form infrastructure. Backend only. UI is separate.**

## Purpose

Server-side form handling. Validation, email, storage, spam protection.

## Output

```yaml
form_ready: true
data_contract: [lead_id, source_page, timestamp, gdpr_consent]
post_submit_flow: [email, thank_you, analytics]
conversion_verdict: PASS | WARN | FAIL
```

## Primary Conversion Declaration

**One form per page is THE conversion.**

```yaml
primary_conversion:
  type: form
  id: "contact-form"
  page: "/contact"
```

All other forms are secondary (newsletter, etc.).

## Page Exclusion Rules

| Page Type | Forms Allowed |
|-----------|---------------|
| landing | ✅ Primary only |
| service | ✅ Primary only |
| calculator | ❌ Use calculator skill |
| thank-you | ❌ Forbidden |
| 404 | ❌ Forbidden |

**Form on forbidden page = FAIL.**

## Data Integrity Contract

**Every submission MUST contain:**

```yaml
data_contract:
  required:
    - lead_id          # Unique, generated
    - source_page      # URL where submitted
    - timestamp        # ISO datetime
    - gdpr_consent     # true + timestamp
    - ip_hash          # Anonymized
  optional:
    - utm_source
    - utm_medium
    - utm_campaign
```

**Missing required field = submission invalid.**

## Post-Submit Flow Contract

**All three MUST happen:**

```yaml
post_submit_flow:
  1_confirmation_email: required
  2_thank_you_redirect: required
  3_analytics_event: required
```

| Step | What | FAIL if |
|------|------|---------|
| Email | Confirmation to customer | Not sent |
| Thank You | Redirect to /thank-you | No redirect |
| Analytics | GTM event fired | No event |

**Any missing = FAIL.**

## Progressive Disclosure

**Personal data only AFTER value established.**

| Step | Can Ask |
|------|---------|
| 1 | Service type, location |
| 2 | Details, preferences |
| 3+ | Name, email, phone |

**Email on step 1 = WARN.** GDPR and CRO critical.

## Core Features

| Feature | Implementation |
|---------|----------------|
| Validation | Zod server-side |
| Email | Resend → Brevo fallback |
| Rate limit | Cloudflare KV |
| CAPTCHA | Turnstile (invisible) |
| Storage | Google Sheets |
| Spam | Honeypot + time-check |
| GDPR | Required checkbox + timestamp |

## Spam Protection (All Required)

```yaml
spam_protection:
  honeypot: true          # Empty field trap
  time_check: 3000ms      # Min fill time
  turnstile: true         # Cloudflare CAPTCHA
  rate_limit: 5/hour/ip   # KV-based
```

**Any missing = WARN.**

## GDPR Consent

```yaml
gdpr:
  checkbox_required: true
  timestamp_stored: true
  text: "Elfogadom az adatvédelmi szabályzatot"
  link: "/privacy-policy"
```

**Missing checkbox or timestamp = FAIL.**

## Conversion Verdict

```yaml
conversion_verdict: PASS | WARN | FAIL
issues: []
```

| Condition | Verdict |
|-----------|---------|
| Form on forbidden page | FAIL |
| Missing data contract field | FAIL |
| Post-submit flow incomplete | FAIL |
| GDPR missing | FAIL |
| Spam protection incomplete | WARN |
| Email on step 1 | WARN |
| All pass | PASS |

## FAIL States

| Condition |
|-----------|
| Form on thank-you page |
| Missing lead_id/timestamp |
| No confirmation email |
| No thank-you redirect |
| No GTM event |
| GDPR checkbox missing |

## WARN States

| Condition |
|-----------|
| Honeypot missing |
| Time-check missing |
| Personal data on step 1 |
| Rate limiting not configured |

## Environment Variables

```env
RESEND_API_KEY=re_xxxxx
BREVO_API_KEY=xkeysib-xxxxx
GOOGLE_SHEETS_WEBHOOK_URL=https://...
TURNSTILE_SITE_KEY=0x...
TURNSTILE_SECRET_KEY=0x...
```

## References

- [schemas.md](references/schemas.md) — Zod schemas
- [email.md](references/email.md) — Email templates
- [resend-setup.md](references/resend-setup.md) — Resend provider setup
- [cloudflare-setup.md](references/cloudflare-setup.md) — Turnstile, KV, Pages
- [modifiers.md](references/modifiers.md) — Form variations
- [schema-cta.md](references/schema-cta.md) — CTA structure

## Definition of Done

- [ ] Primary conversion declared
- [ ] Data contract fields all present
- [ ] Post-submit flow complete (email + thank-you + event)
- [ ] GDPR checkbox + timestamp
- [ ] Spam protection configured
- [ ] Progressive disclosure followed
- [ ] conversion_verdict = PASS

Related Skills

agent-platforms

16
from diegosouzapw/awesome-omni-skill

Guide for multi-platform skill compatibility across Claude Code, Codex, Gemini CLI, Cursor, GitHub Copilot, and other AI coding agents.

astro-cta-injector

16
from diegosouzapw/awesome-omni-skill

Inject Call-to-Action blocks into Astro site content with intelligent placement strategies. Use when the user wants to add CTAs, newsletter signups, product promotions, or any content blocks to blog posts. Supports multiple placement strategies (end, after 50%, after 60%), content scoring for relevance, and dry-run preview.

astro-content

16
from diegosouzapw/awesome-omni-skill

Create Astro/Starlight MDX content pages. Use when the user says "write a new article", "add a blog post", "create content in Tech/Life category", or "add an MDX page".

astro-blog-write

16
from diegosouzapw/awesome-omni-skill

Phase 3 - Writing blog content with human voice and SEO optimization

astro-i18n

16
from diegosouzapw/awesome-omni-skill

Internationalization patterns for Astro sites. Multi-language routing, content translation, locale switching, RTL support. Use for multi-market lead generation.

managing-astro-local-env

16
from diegosouzapw/awesome-omni-skill

Manage local Airflow environment with Astro CLI. Use when the user wants to start, stop, or restart Airflow, view logs, troubleshoot containers, or fix environment issues. For project setup, see setting-up-astro-project.

astro-seo

16
from diegosouzapw/awesome-omni-skill

SEO markup patterns for Astro lead generation sites. Meta tags, Open Graph, Schema.org, sitemap, robots. Use for all SEO implementation.

u01549-constraint-compilation-for-civic-participation-platforms

16
from diegosouzapw/awesome-omni-skill

Operate the "Constraint Compilation for civic participation platforms" capability in production for civic participation platforms workflows. Use when mission execution explicitly requires this capability and outcomes must be reproducible, policy-gated, and handoff-ready.

astro-performance

16
from diegosouzapw/awesome-omni-skill

Core Web Vitals and performance optimization for Astro sites. LCP, CLS, INP optimization, bundle size, fonts, third-party scripts. Use for performance tuning.

astro-aso

16
from diegosouzapw/awesome-omni-skill

Query local Astro Mac app database for ASO insights. Use when the user asks about keyword rankings, historical ranking data, trend analysis, competitor keywords, app ratings, keyword opportunities, or ASO health metrics.

apple-platforms

16
from diegosouzapw/awesome-omni-skill

Build apps for macOS, iPadOS, watchOS, and visionOS with platform-specific features. Use when creating menu bar apps, iPad split views, Apple Watch complications, Vision Pro immersive experiences, or multi-platform adaptations.

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development