AgentSkillsCN

route-scaffold

搭建包含加载器、错误边界及测试用例的路由。

SKILL.md
--- frontmatter
name: route-scaffold
description: Scaffold a route with loader, error boundary, and tests.
disable-model-invocation: true

Route Scaffold

Create a new route page with data loading, error handling, and tests.

When to Use

  • Use this skill when adding a new route or page.

Inputs

  • Route path and name
  • Data requirements
  • Access control rules

Instructions

  1. Create the route component with a clear layout.
  2. Add a loader or data-fetching function.
  3. Add an error boundary or error UI.
  4. Add tests for loading, success, and error states.

Output

  • Route file(s) with loader, error UI, and tests.