roninforge/roninforge-astro/astro-new-page
Claude Code and agent skill by roninforge/roninforge-astro
- community
Checking that the SKILL.md file is still in the repository.
Scaffold a new Astro 6 page in src/pages with optional dynamic [param] segment, optional export const prerender flag (true for SSG, false for SSR opt-in), and optional getStaticPaths skeleton when the route is dynamic + prerendered. Refuses lowercase HTTP method exports for endpoints, refuses output:'hybrid' references, refuses raw <img> tags, refuses <ViewTransitions> (use ClientRouter), and requires alt on all <Image> components. Pairs with the astro-routing-and-endpoints, astro-output-and-prerender, and astro-anti-patterns rules.
Install
npx vskill@latest install roninforge/roninforge-astro/astro-new-pageSKILL.md
The same SKILL.md was published earlier as roninforge/roninforge-astro/astro-new-page.
Scaffold a New Astro 6 Page
When to use
Use when:
- Adding a new file under
src/pages/(static or dynamic) - Adding a new endpoint under
src/pages/api/(TypeScript file withAPIRoute) - Converting a
getStaticPathsroute from Astro 4 to Astro 5+ (dropentry.slug, useentry.id)
Target: astro ^6.3.3. The companion astro-routing-and-endpoints, astro-output-and-prerender, and astro-anti-patterns rules cover the surrounding patterns.
Output
For a route /blog/[id] with prerendering, the scaffold writes one file.
src/pages/blog/[id].astro
For an SSR endpoint at /api/health:
src/pages/api/health.ts
Workflow
- Decide the route shape: static (
/about.astro), dynamic (/blog/[id].astro), rest (/blog/[...slug].astro), or endpoint (/api/x.ts). - Decide rendering: prerendered (
export const prerender = true) or per-request. Inoutput: 'static', prerendered is the default; inoutput: 'server', you must opt in. - For prerendered dynamic routes, write
getStaticPathsreturning{ params, props }. Pull entries from a content collection or other build-time source. - For SSR routes, read
Astro.params.idandAstro.locals.userdirectly;getStaticPathsis silently ignored (anti-pattern #13). - Use the layout for the head + ClientRouter; do not duplicate the
<head>per page.
Examples
Static page
Dynamic SSR page
Common mistakes
getStaticPathsin an SSR route withoutprerender = true(silently ignored).- Lowercase HTTP method export (
export function get); must be uppercaseGET. <img src="/src/...">for a local image; use<Image>fromastro:assets.<ViewTransitions />instead of<ClientRouter />(renamed in 5.0).Astro.glob('../content/*.md')(removed in 5.0; use a content collection).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/astro-new-page/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/roninforge/roninforge-astro/astro-new-page)