inertia-rails-typescript

inertia-rails-typescript is a skill for Claude Code, Codex from thecodingend/rails-starter. It costs 74 tokens per session (1,984 once invoked), scanned A, a copy of inertia-rails-typescript, MIT.

A TypeScript setup for sharing typed data between Rails and Inertia pages built with React, Vue, or Svelte.

In plain words
What is it for?
Defining shared props once, typing flash messages and errors, and fixing TypeScript errors in Inertia components.
Why use it?
It prevents missing or incorrect types for shared page data, messages, and errors across frontend components.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Defining shared props once, typing flash messages and errors, and fixing TypeScript errors in Inertia components.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thecodingend/rails-starter/inertia-rails-typescript
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add thecodingend/rails-starter --skill inertia-rails-typescript
Clone the repo
git clone --depth 1 https://github.com/thecodingend/rails-starter

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for inertia-rails-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/thecodingend/rails-starter/inertia-rails-typescript/github.svg)](https://agentmods.dev/skills/thecodingend/rails-starter/inertia-rails-typescript)
Your own site
<a href="https://agentmods.dev/skills/thecodingend/rails-starter/inertia-rails-typescript"><img src="https://agentmods.dev/badge/skills/thecodingend/rails-starter/inertia-rails-typescript/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for inertia-rails-typescript

Your own site · 80×15
<a href="https://agentmods.dev/skills/thecodingend/rails-starter/inertia-rails-typescript"><img src="https://agentmods.dev/badge/skills/thecodingend/rails-starter/inertia-rails-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,984 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.01984
Opus 5.5 $0.00030 $0.00794
Sonnet 5.5 $0.00015 $0.00397
Haiku 4.5 $0.00007 $0.00198

Measured 2mo ago against content hash 3f1381841ea2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

inertia-rails-typescript scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to inertia-rails-typescript — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/inertia-rails-typescript/SKILL.md · 192 lines

How it starts

The opening of the file, as written. The whole thing — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Inertia Rails TypeScript Setup

Type-safe shared props, flash, and errors using InertiaConfig module augmentation. Works identically across React, Vue, and Svelte — the globals.d.ts and InertiaConfig setup is the same for all frameworks.

Before adding TypeScript types, ask:

  • Shared props (auth, flash)? → Update SharedProps/FlashData in index.ts — InertiaConfig in globals.d.ts propagates them globally via usePage()
  • Page-specific props? → type Props = { ... } in the page file only — never include shared props here

InertiaConfig Module Augmentation

Define shared props type ONCE globally — never in individual page components.

InertiaConfig property names are EXACT — do not rename them:

  • sharedPageProps (NOT sharedProps)
  • flashDataType (NOT flashProps, NOT flashData)
  • errorValueType (NOT errorBag, NOT errorType)
// app/frontend/types/globals.d.ts
import type { FlashData, SharedProps } from '@/types'

declare module '@inertiajs/core' {
  export interface InertiaConfig {
    sharedPageProps: SharedProps   // EXACT name — auto-typed for usePage().props
    flashDataType: FlashData      // EXACT name — auto-typed for usePage().flash
    errorValueType: string[]      // EXACT name — errors are arrays of strings
  }
}
// app/frontend/types/index.ts
export interface FlashData {
  notice?: string
  alert?: string
}

export interface SharedProps {
  auth: { user?: { id: number; name: string; email: string } }
}

Convention: Use auth: { user: ... } as the shared props key — this matches the Rails inertia_share community convention ({ auth: { user: current_user } }). The auth namespace separates authentication data from page props, preventing collisions when a page has its own user prop. Do NOT use current_user: or user: as top-level keys — they collide with page-specific props and break the convention that other Inertia skills and examples assume.

BAD vs GOOD Patterns

// BAD — passing shared props as generics:
// usePage<{ users: User[], auth: AuthData, flash: FlashData }>()

// BAD — extending a SharedProps interface into page props:
// interface Props extends SharedData { users: User[] }

// BAD — declaring PageProps interface:
// interface PageProps { auth: AuthData; flash: FlashData }

// BAD — using current_user or user as top-level shared key:
// interface SharedProps { current_user: User }

// BAD — destructuring auth directly from usePage() (TS2339: 'auth' does not exist on Page):
// const { auth } = usePage()
// usePage() returns a Page object with { props, flash, component, url, ... }
// auth lives inside props, not on the Page itself

// BAD — duplicating InertiaConfig in index.ts (it belongs in globals.d.ts):
// declare module '@inertiajs/core' { ... }  ← in index.ts

// GOOD — props from usePage().props, flash from usePage().flash:
const { props, flash } = usePage()
// props.auth is typed (from SharedProps via InertiaConfig)
// flash.notice is typed (from FlashData via InertiaConfig)

Read the full file on GitHub · 192 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 192 lines · 74 tokens per session scan A 3f1381841ea2

Subscribe to this mod's changes

inertia-rails-typescript is a skill published in the GitHub repository thecodingend/rails-starter (5 stars, last pushed 2mo ago), licensed MIT. It adds 74 tokens to every session and 1,984 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to inertia-rails-typescript, differing in 0 lines, and is treated as a copy.

Related

inertia-rails-typescript compared with skills from other repositories

inertia-rails-typescript next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
inertia-rails-typescriptthecodingend/rails-starterSkill52mo agoMITA74Claude Code, Codex
no-bare-castsprisma/ormSkill48kyesterdayApache-2.0A52Claude Code, Codex
aws-sst-developmentsickn33/agentic-awesome-skillsSkill49kyesterdayMITA26Claude Code
league-akari-shard-developmentLeagueAkari/LeagueAkariSkill4.7k5d agoMITA58Claude Code, Codex
dd-code-generationDataDog/pupSkill1.0kyesterdayApache-2.0A16Claude Code
fast-typescript-checkinternet-development/www-sacredSkill1.6k2d agoMITA84Claude Code, Codex
typescript-magicianmcollina/skillsSkill2.0k10d agoMITA108Claude Code, Codex