本文へ移動
cccskills
無料GitHub で公開

scaffold-webapp

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

インストール方法を見る

含まれるファイル(1)

  • SKILL.md2.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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)

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

anoa

無料

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.

日本語の概要は準備中です。原文の説明を表示しています。

porcupine-md/jonggrang152026年9月15日 更新

Run linters/typecheckers to calculate health score.

日本語の概要は準備中です。原文の説明を表示しています。

porcupine-md/jonggrang152026年9月15日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

porcupine-md/jonggrang152026年9月15日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

porcupine-md/jonggrang152026年9月15日 更新

auth

無料

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

日本語の概要は準備中です。原文の説明を表示しています。

porcupine-md/jonggrang152026年9月15日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

porcupine-md/jonggrang152026年9月15日 更新

porcupine-md のスキルをすべて見る

このスキルの問題を報告する