Use when adding or reviewing UI navigation so internal routes preserve normal SPA behavior plus Cmd/Ctrl-click and middle-click new-tab semantics.
74
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Pure navigation must render a real React Router <Link> for same-SPA routes,
a native <a href> for external/public or explicit new-tab destinations, or a
shadcn Button asChild wrapper around one. Do not use a button whose only job
is to call navigate(), window.open(), or window.location.
Browser modifier-click, middle-click, keyboard activation, accessibility, and normal client-side routing come from real links. Imperative JavaScript navigation hides the destination and blocks those browser semantics.
import { Link } from "react-router";
<Link to={`/items/${item.id}`}>...</Link>
<Button asChild>
<Link to="/settings">Settings</Link>
</Button>
<a href={previewUrl} target="_blank" rel="noopener noreferrer">
Preview
</a>Link for same-SPA internal routes.<a> when the URL is external, crosses an app/public boundary, is an
auth or sign-in destination, or intentionally opens in a new tab.to or href.Keep imperative navigation for post-mutation redirects, OAuth and popup flows, downloads, media/blob URLs, playback, keyboard shortcuts, and stateful tabs.
Search for onClick={() => navigate, window.open, window.location,
onAuxClick, and buttons whose only purpose is routing. For each candidate,
confirm whether it is pure navigation or a stateful workflow before changing
it.
Verify the rendered DOM exposes an href, then test normal click, Cmd/Ctrl-click,
middle-click, keyboard Enter, and nested controls where applicable. Run oxfmt
and focused app tests or typechecks for the touched package.
client-side-routingfrontend-designshadcn-uic1ee18b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.