astro-actions

Solid

Use when handling form submissions, mutations, or server-side logic with type safety in Astro via defineAction / astro:actions.

Web & Frontend 25 stars 4 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
47
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

<objective> Implements Astro Server Actions: `defineAction()` with Zod-validated `input`, the `astro:actions` client import for type-safe calls, standardized `ActionError` codes (UNAUTHORIZED, FORBIDDEN, NOT_FOUND, BAD_REQUEST, INTERNAL_SERVER_ERROR, CONFLICT, TOO_MANY_REQUESTS), `accept: 'form'` for direct HTML form submission, and progressive enhancement so forms work without JavaScript. Covers the full action lifecycle from `src/actions/index.ts` structure through error handling and redirect patterns. Does not cover Astro DB integration in depth (astro-db handles the database layer) or Content Layer schemas (astro-content) — this skill focuses on the request/validation/response boundary. </objective> # Astro Actions Expert Type-safe server functions with automatic validation, standardized errors, and progressive enhancement. ## Agent Workflow (MANDATORY) Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`: 1. **fuse-ai-pilot:explore-codebase** - Check existing actions in `src/actions/` 2. **fuse-ai-pilot:research-expert** - Verify latest Actions docs via Context7/Exa 3. **mcp__context7__query-docs** - Get defineAction and ActionError examples After implementation, run **fuse-ai-pilot:sniper** for validation. --- ## Overview ### When to Use - Handling form submissions with server-side validation - Creating type-safe backend mutations without API boilerplate - Building progressive enhancement (works without JS) - Replacing AP...

Details

Author
fusengine
Repository
fusengine/agents
Created
8 months ago
Last Updated
6 days ago
Language
CSS
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category