fe-routing-permission
Frontend Routing Permission
Use this skill when the task involves route design, navigation flows, auth redirects, permission modeling, or access control across routes and components.
Use This Skill When
- The user needs route hierarchy, layout strategy, deep links, or URL-state design.
- The task involves auth guards, permission boundaries, or role and capability modeling.
- The feature includes public/private routes, forbidden states, or tenant-scoped access.
Inputs To Confirm Up Front
- Public versus authenticated areas.
- Required route hierarchy and shared layouts.
- Which state should live in the URL.
- Permission model: roles, capabilities, policies, entitlements, tenant scope.
- Unauthorized, forbidden, expired-session, and downgraded-access behavior.
Execute Workflow
- Model routes around product flows.
- Design routes around user journeys and domain concepts, not only file names.
- Keep URLs readable, stable, and shareable.
- Define route ownership and layout boundaries.
- Separate app shell routes, section layouts, feature routes, and route-level error states.
- Use nested layouts deliberately.
- Define access rules explicitly.
- Put major access boundaries at route level.
- Use component-level guards for fine-grained actions.
- Distinguish hidden, disabled, read-only, and forbidden states intentionally.
- Align frontend and backend authorization.
- Frontend checks should reflect product behavior, not replace backend security.
- Model permissions as capabilities or policies rather than raw role-name checks.
Core Guidance
Routing
- Use URL state for filters, tabs, pagination, and shareable view state.
- Avoid encoding ephemeral-only UI state in the URL.
- Handle loading, unauthorized, forbidden, not-found, and redirect flows explicitly.
Permissions
- Prefer domain-level permission names such as
canEditUserorcanApproveInvoice. - Keep permission data typed and traceable.
- Do not scatter checks like
role === 'admin'across leaf components.
Review Checklist
- Route hierarchy reflects product flows and layout ownership.
- URL state is used intentionally and only where shareability matters.
- Route-level loading, unauthorized, forbidden, and not-found states are defined.
- Permission rules are modeled explicitly instead of scattered as raw role checks.
- Frontend permission behavior is aligned with backend enforcement.
Output Requirements
- Routing strategy: hierarchy, layouts, guards, and URL-state decisions.
- Permission strategy: capability model, UI access states, and backend alignment.
- Open questions about auth, tenancy, or access rules.
More from jiannx/agent-skills
nocobase-bugfix
Diagnose and fix NocoBase v2 bugs, especially flow, FlowModel, client-v2, and plugin client issues. Use for issue reproduction, root-cause analysis, targeted fixes, regression checks, or narrow v2 feature completion based on nearby v1 behavior. Default to v2-only changes unless the user explicitly asks for v1.
9nocobase-v2-flow-upgrade
Upgrade existing NocoBase v1 plugins to v2 FlowModel or field-model architecture with behavior parity. Use for migration planning, implementation, parity validation, and pitfalls around request payloads, settings ownership, i18n namespaces, roles persistence, flow variables, and editor integrations.
9fe-quality-operations
Prepare frontend projects for reliable delivery with testing, performance review, observability, release strategy, and production-readiness checks.
2fe-design-implementation
Implement product-grade frontend UI from design artifacts with consistent interaction patterns, theme-driven styling, responsive behavior, and design verification.
2fe-product-development
Build product-grade frontend projects with implementation guidance optimized for React ecosystems. Covers bootstrap, architecture, design implementation, data flow, testing, observability, release strategy, and long-term maintainability.
2fe-bootstrap-architecture
Initialize or restructure frontend projects with sound framework selection, project bootstrap, architecture, routing foundations, environment setup, and maintainable module boundaries.
2