adding-a-new-app-route
Fully wires up a new route with required boilerplate, following this repo's conventions for subapps. Use when user wants to add a new route or app or subapp or page or screen.
- License 许可
- MIT
- 所属仓库
- artsy/force
- 最近更新
- 2026-11-14
- Stars
- ★ 638
- Forks
- 151
01 前言 Front Matter
- name
- adding-a-new-app-route
- description
- Fully wires up a new route with required boilerplate, following this repo's conventions for subapps. Use when user wants to add a new route or app or subapp or page or screen.
- allowed-tools
- Skill(beep)
02 资源文件 7
- 其他templates/dynamic/Replace/__tests__/ReplaceApp.jest.tsx1.0 KB
- 其他templates/dynamic/Replace/Components/__tests__/ReplaceMeta.jest.tsx2.8 KB
- 其他templates/dynamic/Replace/Components/ReplaceMeta.tsx1.2 KB
- 其他templates/dynamic/Replace/ReplaceApp.tsx2.1 KB
- 其他templates/dynamic/Replace/replaceRoutes.tsx2.0 KB
- 其他templates/static/Replace/ReplaceApp.tsx1.1 KB
- 其他templates/static/Replace/replaceRoutes.tsx441 B
03 SKILL.md 正文
Adding a new route
Use this checklist to track your work:
- [ ] Determine name & route for the new app
- [ ] Determine the kind of app to create
- [ ] Create a folder for the new app
- [ ] Mount the new app in the global routes listing
- [ ] Consider next steps
Determine name & route for the new app
If the name of the new app and the desired route have not already been specified, AskUserQuestion to determine that information, e.g. MyApp at /my-app.
Determine the kind of app to create
- Static: The simplest possible app with static-only content
- Dynamic: A typical app that fetches data based on route params
Use the answer in the next step.
Create a folder for the new app
- Choose the correct template directory based on the previous step:
- Static:
./templates/static/Replace/ - Dynamic:
./templates/dynamic/Replace/
- Static:
- Use that directory as the template for the new subapp
- Recreate that folder structure under
/src/Apps/<NewApp> - Replace all instances of
replaceandReplacewith appropriate naming (case-sensitive)
Mount the new app in the global routes listing
Add the new route to the main route list at src/routes.tsx. Follow existing conventions re: alphabetization.
Consider next steps
Additional dev advice:
- You may need to restart the server for the new route to take effect
- Then visit http://localhost:4000/{replace} to see your new app
- Examine the generated code for additional follow-ups
Celebrate
Indicate you are done with a /beep
04 同仓库更多 Skills
fix-sentry-issue
Investigates the most actionable open Sentry issue for force-production, locates the root cause in source code, and opens a fix PR. Use when asked to look at Sentry, fix a Sentry issue, or investigate production errors.
beep
Play a system beep. Use when asked to beep, play a beep, issue a system beep etc.