fec-route-protection SKILL.md skillA
fec-route-protection from bovinphang/frontend-craft is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add bovinphang/frontend-craft/fec-route-protection@git:20260611.9d7f5e4Pins git:20260611.9d7f5e4 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- bovinphang/frontend-craft
- Path
skills/fec-route-protection/SKILL.md- Versions recorded
- 5
- Latest version
- git:20260611.9d7f5e4, committed Jun 11, 2026
- First version recorded
- May 20, 2026
- Size
- 5,375 bytes
- Repository stars
- 22
- License
- MIT
Use when implementing or reviewing frontend route protection, auth guards, RBAC, permission routes, login state handling, redirects, middleware, React Router, Next.js, Vue Router, or Nuxt route middleware; Chinese triggers include route protection, permission routing, login state.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
#Route protection
## Purpose
Establish clear authentication, authorization and redirection boundaries for front-end applications to avoid unauthorized access and flickering rendering.
## When to Use
- The page needs to be logged in to access, or different roles can see different routes.
- Requires implementing route guards for React Router, Next.js, Nuxt or Vue Router.
- Login expiration, insufficient permissions, and organization/tenant switching need to be handled uniformly.
- Not used to replace server-side authorization; front-end routing protection can only improve the experience and cannot be used as the only security boundary.
## Procedure
### 1. Define authentication and authorization status
```ts
export type AuthStatus = "loading" | "anonymous" | "authenticated";
export interface CurrentUser {
id: string;
roles: string[];
permissions: string[];
}
export function canAccess(user: CurrentUser, required: string[]) {
return required.every((permission) => user.permissions.includes(permission));
}
```
### 2. React Router uses layout guards
```tsx
import { Navigate, Outlet, useLocation } from "react-router-dom";
interface ProtectedRouteProps {
…Read the whole file at its exact version.
How to install
mdr add bovinphang/frontend-craft/fec-route-protection@sha256:0a2cc6d360761297The line at the top of this page pins the label git:20260611.9d7f5e4, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_3j7rfv7agx2gi3i3)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between May 20, 2026 and Jun 11, 2026, about one every 5 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260611.9d7f5e4 latest | 2026-06-11 | 9d7f5e4 | 5,375 B | A | view · diff |
| git:20260529.c76cc44 | 2026-05-29 | c76cc44 | 4,680 B | A | view · diff |
| git:20260525.fbc4b04 | 2026-05-25 | fbc4b04 | 4,298 B | A | view · diff |
| git:20260524.3d621bf | 2026-05-24 | 3d621bf | 4,602 B | A | view · diff |
| git:20260520.318df2c | 2026-05-20 | 318df2c | 4,586 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (5375 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
bovinphang/frontend-craft · 22 stars · license MIT · pushed 2026-09-26 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_3j7rfv7agx2gi3i3 GET https://markdownregistry.com/api/v1/resolve?ref=bovinphang/frontend-craft/fec-route-protection GET https://markdownregistry.com/api/v1/blob/0a2cc6d360761297623abd6491cfa879877fdc44e6b5e630f585717542e0b85e
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from bovinphang/frontend-craft
Every file in bovinphang/frontend-craft