본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)7.6k · #13168

native-navigation

하는 일

이 스킬은 Agent-Native 앱에서 코드로 페이지를 옮기는 버튼 대신, 실제 링크를 탐색에 써야 할 때를 설명합니다. Cmd-클릭, 가운데 클릭, 키보드 사용이 계속 작동하도록 합니다. 인터페이스에서 탐색을 만드는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓다른 페이지를 열어야 하는 버튼이나 카드를 추가할 때.
  • ✓탐색 컨트롤이 Cmd-클릭이나 가운데 클릭에 반응하지 않을 때.
  • ✓내부 링크와 외부 링크 중에서 선택해야 할 때.

스킬 링크

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/native-navigation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/native-navigation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“프로젝트 카드를 바꿔서 프로젝트 페이지를 열되, Cmd-클릭이 계속 작동하게 해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

개발자는 앱 안의 페이지에는 라우터 링크를, 외부나 새 탭 페이지에는 일반 링크를 씁니다. 필요한 경우 버튼을 링크로 감쌉니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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 Link for 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 to or href.
  • 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-routing
  • frontend-design
  • shadcn-ui
자주 묻는 질문

왜 버튼으로 이동하면 안 되나요?

버튼은 목적지를 숨기고, Cmd-클릭과 가운데 클릭 같은 브라우저 동작을 막습니다.

코드 탐색이 여전히 맞는 경우는 언제인가요?

업데이트 후 리디렉션, 로그인, 팝업 흐름에서는 여전히 코드 탐색을 쓰라고 이 스킬은 말합니다.

안에 버튼이 있는 카드는 어떻게 하나요?

카드의 상호작용이 없는 부분만 링크로 연결하고, 링크나 버튼을 중첩하지 말라고 말합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
7.6k
순위
#13168
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬