Skip to content
cccskills
FreePublished on GitHub

scaffold-webapp

Setup web app page with component, layout, data fetching, and tests

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Context

Project {{project_name}} is a web app using {{stack}}. You will create a new page "{{input.name}}" at route "{{input.route}}".

Read AGENTS.md for conventions. Read existing pages to understand patterns.

Instructions

  1. Analyze existing page patterns

    • Read existing pages
    • Identify: file structure, layout usage, data fetching pattern, state management
    • Note naming conventions (PascalCase, kebab-case, etc.)
  2. Create page component

    • Path: according to framework convention
      • Next.js App Router: app/{{input.route}}/page.tsx
      • Next.js Pages: pages/{{input.route}}.tsx
      • React Router: src/pages/{{input.name}}.tsx
    • Use layout "{{input.layout}}"
    • Implement basic structure: header, content area, loading state, error state
  3. Create sub-components (if page is complex)

    • Break into reusable components
    • Path: src/components/{{input.name}}/
    • Each component: file + test
  4. Setup data fetching

    • Follow existing patterns (SSR, client-side, React Query, SWR, etc.)
    • Create mock data for development
  5. Create tests

    • Render test (component mounts without error)
    • Interaction tests (click, form submit, navigation)
    • Data fetching tests (loading, success, error states)
  6. Update navigation (if applicable)

    • Add link to the new page in navbar/sidebar

Script

#!/bin/bash
# Detect framework routing
if [ -d "app" ] && [ -f "next.config.mjs" -o -f "next.config.js" -o -f "next.config.ts" ]; then
  echo "Framework: Next.js App Router"
  echo "Page path: app/{{input.route}}/page.tsx"
elif [ -d "pages" ] && [ -f "next.config.mjs" -o -f "next.config.js" -o -f "next.config.ts" ]; then
  echo "Framework: Next.js Pages Router"
  echo "Page path: pages/{{input.route}}.tsx"
elif [ -d "src/pages" ]; then
  echo "Framework: React (Pages pattern)"
  echo "Page path: src/pages/{{input.name}}.tsx"
fi

Validation

  • Page component renders without error
  • Route accessible in browser (dev server)
  • Layout applied correctly
  • Loading state works
  • Error state works
  • Tests passing
  • Typecheck passing
  • Navigation updated (if applicable)

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

anoa

Free

Drive a real browser from the command line — open pages, snapshot the interactive elements as refs, click and fill by ref, read text, run JS, screenshot. Use when a task needs a live browser: checking a page renders, walking a login or checkout flow, scraping something that only exists after JavaScript runs, or reproducing a UI bug.

The English summary is being prepared. Showing the original description.

porcupine-md/jonggrang16Updated Sep 15, 2026

Run linters/typecheckers to calculate health score.

The English summary is being prepared. Showing the original description.

porcupine-md/jonggrang16Updated Sep 15, 2026

Comprehensive UI/UX compliance check (A11y, performance, responsive).

The English summary is being prepared. Showing the original description.

porcupine-md/jonggrang16Updated Sep 15, 2026

Infrastructure-first security audit (OWASP, secrets, dependencies).

The English summary is being prepared. Showing the original description.

porcupine-md/jonggrang16Updated Sep 15, 2026

auth

Free

Setup authentication flow (register, login, session/JWT, middleware)

The English summary is being prepared. Showing the original description.

porcupine-md/jonggrang16Updated Sep 15, 2026

Deep knowledge about deploying applications to AWS (EC2, ECS, S3, CloudFront, Cloud Run).

The English summary is being prepared. Showing the original description.

porcupine-md/jonggrang16Updated Sep 15, 2026

See all skills by porcupine-md

Report a problem with this skill