native-navigation
What it does
This skill sets out when to use a real link for navigation in an Agent-Native app, rather than a button that moves the page with code. It keeps Cmd-click, middle-click and keyboard use working. It is for developers building navigation in the interface.
When to use it
- ✓When you are adding a button or card that should open another page in the app.
- ✓When a navigation control does not respond to Cmd-click or middle-click.
- ✓When you need to decide between an internal link and an external one.
Skill link
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/native-navigation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you change the project cards so they open the project page and still work with Cmd-click?”
5 new skills a week. 1 minute to read.
How it works
The developer uses a router link for pages inside the app, a plain link for external or new-tab pages, and wraps a button in a link where needed.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Native Navigation
Rule
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.
Why
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.
How
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>
- Use
Linkfor same-SPA internal routes. - Use
<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. - Preserve query strings and hashes in
toorhref. - For cards with nested actions, link only the non-interactive card region or use a transparent Link overlay; never nest links or buttons.
- If selection mode changes click behavior, prevent default only for an unmodified primary click and preserve modified clicks.
Keep imperative navigation for post-mutation redirects, OAuth and popup flows, downloads, media/blob URLs, playback, keyboard shortcuts, and stateful tabs.
Review
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.
Related Skills
client-side-routingfrontend-designshadcn-ui
FAQ
Why not use a button to navigate?
Buttons hide the destination and block browser behaviors like Cmd-click and middle-click.
When is code navigation still right?
The skill says to keep it for redirects after an update, and for sign-in and popup flows.
What about cards with buttons inside?
The skill says to link only the non-interactive part of the card, and never nest links or buttons.
Details
Original description by the author
Use when adding or reviewing UI navigation so internal routes preserve normal SPA behavior plus Cmd/Ctrl-click and middle-click new-tab semantics.
repo: BuilderIO/agent-native
Popularity
- GitHub stars
- 7.6k
- Ranking position
- #13168
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
design-exploration
7.6kHelps your agent explore several UI design directions side by side, let you pick one, and then refine the chosen design.
visual-edit
7.6kHelps your agent open a running local app in a visual editor so you can review and edit its real screens together.
turn-into-app
7.6kTurns a workflow, spreadsheet or project into a polished visual app, with populated screens and an agent working behind the controls.
visual-plan
7.6kTurns a plain text plan into an interactive visual plan with diagrams, file maps, code snippets and open questions.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.