Token导航 LogoToken导航

Agent Skill · 研究检索

inertia-rails-pages(inertia Rails pages 搜索)

inertia-rails-pages 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

inertia-rails-pages 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 28,331。

总安装 3,240周安装 135GitHub Stars 44下载 1,080核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:inertia-rails-pages(inertia Rails pages 搜索)
来源仓库:https://github.com/inertia-rails/skills
仓库路径:skills/inertia-rails-pages
安装命令:
npx skills add https://github.com/inertia-rails/skills --skill inertia-rails-pages
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/inertia-rails/skills --skill inertia-rails-pages

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息。适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。通过 npx skills add 命令从指定仓库安装,需确认权限和维护状态。使用前建议核验具体用法,避免触发联网或文件读写操作。涉及敏感数据时应先确认脱敏边界和命令执行范围。

来源仓库内路径:skills/inertia-rails-pages

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/inertia-rails/skills --skill inertia-rails-pag…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

inertia-rails-pages 怎么安装?

在终端执行 npx skills add https://github.com/inertia-rails/skills --skill inertia-rails-pages。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

inertia-rails-pages 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

inertia-rails-pages 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

inertia-rails-pages 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

inertia-rails-pages 用的人多吗?

公开数据是累计安装 3,240 次,近一周安装 135 次,下载 1,080 次,GitHub 44 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

inertia-rails-pages 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
inertia-rails-pages

inertia Rails pages 搜索 · 本页

3,24044需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Inertia Rails Pages

Page components, layouts, navigation, and client-side APIs.

Before building a page, ask:

  • Does this page need a layout? → Use persistent layout (React: Page.layout =...; Vue: defineOptions({layout}); Svelte: module script export) — wrapping in JSX/template remounts on every navigation, losing scroll position, audio playback, and component state
  • Does UI state come from the URL? → Change BOTH controller (read params, pass as prop) AND component (derive from prop, no useState/useEffect) — use router.get to update URL
  • Need to refresh data without navigation? → router.reload({only: [...]}) — never useEffect + fetch
  • Need to update a prop without server round-trip? → router.replaceProp — no fetch, no reload

NEVER:

  • Parse window.location.search or use useSearchParams — derive URL state from controller props
  • Use useState/useEffect to sync URL ↔ React state — the controller passes URL-derived data as props; the component just reads them
  • Pass arguments to <Deferred> render function — {(data) =>...} does NOT work; child reads via usePage()
  • Access usePage().props.flash — flash is top-level: usePage().flash
  • Wrap layout in JSX return for persistence — use Page.layout =... or global layout inside createInertiaApp's resolve callback

Page Component Structure

Pages are default exports receiving controller props as function arguments. Use type Props = {...} (not interface — causes TS2344 in React). Vue uses defineProps<T>(), Svelte uses let {...} = $props().

type Props = {
  posts: Post[]
}

export default function Index({ posts }: Props) {
  return <PostList posts={posts} />
}

Persistent Layouts

Layouts persist across navigations — no remounting, preserving scroll, audio, etc.

import { AppLayout } from '@/layouts/app-layout'

export default function Show({ course }: Props) {
  return <CourseContent course={course} />
}

// Single layout
Show.layout = (page: React.ReactNode) => <AppLayout>{page}</AppLayout>

Default layout in entrypoint:

// app/frontend/entrypoints/inertia.tsx
resolve: async (name) => {
  const page = await pages[`../pages/${name}.tsx`]()
  page.default.layout ??= (page: React.ReactNode) => <AppLayout>{page}</AppLayout> // default if not set
  return page
}

Navigation

<Link> and router

Use <Link href="..."> for internal navigation (not <a>) and router.get/post/patch/delete for programmatic navigation. Key non-obvious features:

// Prefetching — preloads page data on hover
<Link href="/users" prefetch>Users</Link>
<Link href="/users" prefetch cacheFor="30s">Users</Link>

// Prefetch with cache tags — invalidate after mutations
<Link href="/users" prefetch cacheTags="users">Users</Link>

// Programmatic prefetch (e.g., likely next destination)
router.prefetch('/settings', {}, { cacheFor: '1m' })

// Partial reload — refresh specific props without navigation
router.reload({ only: ['users'] })

Full router API, visit options, and event callbacks are in references/navigation.md — see loading trigger below.

Client-Side Prop Helpers

Update props without a server round-trip:

// Replace a single prop (dot notation supported)
router.replaceProp('show_modal', false)
router.replaceProp('user.name', 'Jane Smith')

// With callback (receives current value + all props)
router.replaceProp('count', (current) => current + 1)

// Append/prepend to array props
router.appendToProp('messages', { id: 4, text: 'New' })
router.prependToProp('notifications', (current, props) => ({
  id: Date.now(),
  message: `Hello ${props.auth.user.name}`,
}))

These are shortcuts to router.replace() with preserveScroll and preserveState automatically set to true.

router.replaceProp vs router.reload: Use router.replaceProp for client-only state changes (toggling a modal, incrementing a counter) — no server round-trip. Use router.reload when you need fresh data from the server (updated records, recalculated stats).

URL-Driven State (Dialogs, Tabs, Filters)

URL state = server state = props. ALWAYS implement both sides:

  1. Controller — read params and pass as a prop
  2. Component — derive UI state from that prop (no useState, no useEffect)
  3. Update — router.get with query params to change URL (triggers server round-trip, new props arrive)

NEVER use useState + useEffect to sync URL ↔ dialog/tab/filter state. The server is the single source of truth — the component just reads props.

# Step 1: Controller reads params, passes as prop
def index
  render inertia: {
    users: User.all,
    selected_user_id: params[:user_id]&.to_i
  }
end
// Step 2+3: Derive state from props, router.get to update URL

type Props = {
  users: User[]
  selected_user_id: number | null  // from controller
}

export default function Index({ users, selected_user_id }: Props) {
  // Derive — no useState, no useEffect, no window.location parsing
  const selectedUser = selected_user_id
    ? users.find(u => u.id === selected_user_id)
    : null

  const openDialog = (id: number) =>
    router.get('/users', { user_id: id }, {
      preserveState: true,
      preserveScroll: true,
    })

  const closeDialog = () =>
    router.get('/users', {}, {
      preserveState: true,
      preserveScroll: true,
    })

  return (
    <Dialog open={!!selectedUser} onOpenChange={(open) => !open && closeDialog()}>
      <DialogContent>{/* ... */}</DialogContent>
    </Dialog>
  )
}

Why not useEffect? When router.get('/users', {user_id: 5}) fires, Inertia makes a request to the server → controller runs with params[:user_id] = 5 → returns new props with selected_user_id: 5 → component re-renders with the dialog open. The cycle is: URL → server → props → render. Parsing window.location client-side duplicates what the server already does.

Shared Props

Shared props (auth, flash) are typed globally via InertiaConfig (see inertia-rails-typescript skill) — page components only type their OWN props:

type Props = {
  users: User[]         // page-specific only
  // auth is NOT here — typed globally via InertiaConfig
}

export default function Index({ users }: Props) {
  const { props, flash } = usePage()
  // props.auth typed via InertiaConfig, flash.notice typed via InertiaConfig
  return <UserList users={users} />
}

Flash Access

Flash is top-level on the page object, NOT inside props — this is the #1 flash mistake. Flash config is in inertia-rails-controllers; toast UI is in shadcn-inertia.

// BAD:  usePage().props.flash   ← WRONG, flash is not in props
// GOOD: usePage().flash         ← flash.notice, flash.alert

<Deferred> Component

Renders fallback until deferred props arrive. Children can be plain ReactNode or () => ReactNode render function. Either way, the child reads the deferred prop from page props via usePage() — the render function receives no arguments.

import { Deferred } from '@inertiajs/react'

export default function Dashboard({ basic_stats }: Props) {
  return (
    <>
      <QuickStats data={basic_stats} />
      <Deferred data="detailed_stats" fallback={<Spinner />}>
        <DetailedStats />
      </Deferred>
    </>
  )
}

// Also valid — render function (no args, child still reads from usePage):
// <Deferred data="stats" fallback={<Spinner />}>
//   {() => <Stats />}
// </Deferred>

// BAD — render function does NOT receive data as argument:
// <Deferred data="stats">{(data) => <Stats data={data} />}</Deferred>

<InfiniteScroll> Component

Automatic infinite scroll — loads next pages as user scrolls down. Pairs with InertiaRails.scroll on the server (see inertia-rails-controllers):

import { InfiniteScroll } from '@inertiajs/react'

export default function Index({ posts }: Props) {
  return (
    <InfiniteScroll data="posts" loading={() => <Spinner />}>
      {posts.map(post => <PostCard key={post.id} post={post} />)}
    </InfiniteScroll>
  )
}

Props: data (prop name), loading (fallback), manual (button instead of auto), manualAfter={3} (auto for first 3 pages, then button), preserveUrl (don't update URL).

<WhenVisible> Component

Loads data when element enters viewport. Use for lazy sections (comments, related items), NOT for infinite scroll (use <InfiniteScroll> above):

import { WhenVisible } from '@inertiajs/react'

<WhenVisible data="comments" fallback={<Spinner />}>
  <CommentsList />
</WhenVisible>

Troubleshooting

SymptomCauseFix
Layout remounts on every navigationWrapping layout in JSX return instead of Page.layoutUse persistent layout
Deferred children never renderRender function expects args {(data) =>...}Render function receives NO arguments — use {() => <Child />} or plain <Child />. Child reads prop via usePage()
Flash is undefinedAccessing usePage().props.flashFlash is top-level: usePage().flash, not inside props
URL state lost on navigationParsing window.location in useEffectDerive from props — controller reads params and passes as prop
WhenVisible never triggersElement not in viewport or prop name wrongdata must match a prop name the controller provides on partial reload
Component state resets on router.getMissing preserveState: trueAdd preserveState: true to visit options for filter/sort/tab changes
Scroll jumps to top after form submitMissing preserveScrollAdd preserveScroll: true to the visit or form options

Related Skills

  • Flash config → inertia-rails-controllers (flash_keys)
  • Flash toast UI → shadcn-inertia (Sonner + useFlash)
  • Shared props typing → inertia-rails-typescript (InertiaConfig)
  • Deferred server-side → inertia-rails-controllers (InertiaRails.defer)
  • URL-driven dialogs → shadcn-inertia (Dialog component)

Vue / Svelte

All examples above use React syntax. For Vue 3 or Svelte equivalents:

  • Vue 3: references/vue.md — defineProps, usePage() composable, scoped slots for <Deferred>/<WhenVisible>/<InfiniteScroll>, defineOptions({layout}) for persistent layouts
  • Svelte: references/svelte.md — $props(), $page store, {#snippet} syntax for <Deferred>/<WhenVisible>/<InfiniteScroll>, <svelte:head> instead of <Head>, module script layout export

MANDATORY — READ THE MATCHING FILE when the project uses Vue or Svelte. The concepts and NEVER rules above apply to all frameworks, but code syntax differs.

References

MANDATORY — READ ENTIRE FILE when implementing event callbacks (onBefore, onStart, onProgress, onFinish, onCancel), client-side flash, or scroll management: references/navigation.md (~200 lines) — full callback API, router.flash(), scroll regions, and history encryption.

MANDATORY — READ ENTIRE FILE when implementing nested layouts, conditional layouts, or layout-level data sharing: references/layouts.md (~180 lines) — nested layout patterns, layout props, and default layout configuration.

Do NOT load references for basic <Link>, router.visit, or single-level layout usage — the examples above are sufficient.

平台分布

Codex

36.08%
按下载量换算390

Claude

30.16%
按下载量换算326

Cursor

19.57%
按下载量换算211

Gemini CLI

10.85%
按下载量换算117

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills