跳到正文
cccskills
免费在 GitHub 公开

scaffold-webapp

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

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md2.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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)

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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/jonggrang162026年9月15日 更新

Run linters/typecheckers to calculate health score.

中文简介正在准备中。当前显示原文说明。

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

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

中文简介正在准备中。当前显示原文说明。

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

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

中文简介正在准备中。当前显示原文说明。

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

auth

免费

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

中文简介正在准备中。当前显示原文说明。

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

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

中文简介正在准备中。当前显示原文说明。

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

查看 porcupine-md 的全部技能

报告此技能的问题