Agent skill

SPA Routes and Features

by lobehub in lobehub/lobehub

Explains LobeHub's split between src/routes page segments and src/features domain code, and where router config, redirects and platform adapters belong.

Custom licenceAuto-check passedFrontend & Design

Install SPA Routes and Features

skills CLI
$ npx skills add lobehub/lobehub --skill spa-routes -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lobehub/lobehub spa-routes --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lobehub/lobehub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/spa-routes .claude/skills/spa-routes && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spa-routes
GitHub stars
83k
Token cost
~3.5k tokens
SKILL.md length
1,334 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
Custom licence

At a glance

Explains LobeHub's split between src/routes page segments and src/features domain code, and where router config, redirects and platform adapters belong.

  • Works in 6 steps: What Belongs in src/routes/ (roots) → What Belongs in src/features/ → How to Add a New SPA Route → …
  • Adding a new SPA route or route segment
  • SKILL.md covers When to Use This Skill, 1. What Belongs in src/routes/…, 2. What Belongs in src/features/ and 3. How to Add a New SPA Route, plus 5 more sections
  • Calls git

What it does

The skill documents the SPA layout. The src/spa folder holds the entry points for web, mobile and desktop plus the router config, src/routes holds only page segments, and src/features holds business logic and UI by domain. Each route directory should contain only a thin layout, a page entry and dynamic-segment pages, which import and compose from features, with no new features folders or heavy components inside routes.

One constraint applies to the shared desktop router: common Web and Electron paths, nesting, metadata, lazy loaders and preload groups go in desktopRouter.shared.tsx, and the two platform config files are thin adapters, changed only for real runtime differences, with no route duplicated in both. Use it when adding a route or segment, refactoring layout and page files, moving route-specific logic into features, or deciding between a route folder and a feature folder.

When your agent uses it

  • Adding a new SPA route or route segment
  • Moving route-specific components into the features folder
  • Deciding whether code belongs in a route folder or a feature folder

Example prompts

  • “Add a new route for scheduled tasks with a thin page that renders a feature component.”
  • “This route folder has business logic in it. Move it into src/features.”
  • “Where should the shared route for the desktop and web apps be defined?”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. What Belongs in src/routes/ (roots)
  2. What Belongs in src/features/
  3. How to Add a New SPA Route
  4. How to Divide Files (route vs feature)
  5. Progressive Migration (existing code)
  6. Reference Structure (after Phase 1)

What it can do on your machine

Read from SKILL.md and the folder at commit 31b02b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

SPA Routes and Features loads about 3.5k tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 1,334 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~33
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 1,334 words (~3,460 tokens).

name
spa-routes
user-invocable
false

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/spa-routes of lobehub/lobehub.

Open the folder on GitHubat commit 31b02b5

Compare with similar skills

SPA Routes and Features next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

SPA Routes and Features compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SPA Routes and Features this skilllobehub/lobehub83k—~3.5kAutomated safety check: PassCustom licence
Angular Idioms and Patternsirahardianto/awesome-agv156—~3.8kAutomated safety check: PassMIT
Walkontable Engine Developmenthandsontable/handsontable22k—~3.1kAutomated safety check: PassCustom licence
React Router Developmentremix-run/react-router57k1 repos~1.5kAutomated safety check: PassMIT
React UI State PatternsChrisWiles/claude-code-showcase6.1k8 repos~1.6kAutomated safety check: PassNone
GSAP in Vue, Nuxt and Sveltegreensock/gsap-skills16k3 repos~2.6kAutomated safety check: PassMIT

Similar skills

  • Angular Idioms and Patterns

    irahardianto/awesome-agv

    Coding conventions for Angular 19 and later: standalone components, signals, OnPush change detection, lazy routes and where RxJS still belongs.

    156 GitHub stars~3.8k tokensUpdated 6 days ago
    Frontend & DesignAuto-check passed
  • Walkontable Engine Development

    handsontable/handsontable

    Rules for changing Handsontable's Walkontable rendering engine: the TableView boundary, dependency injection through wire.ts and DOM geometry reads via GeometryReader.

    22k GitHub stars~3.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • React Router Development

    remix-run/react-router

    Guides work on React Router apps by first identifying whether the app uses Framework, Data or Declarative mode, then loading the matching reference and the installed package docs.

    57k GitHub starsUsed in 1 repo~1.5k tokens
    Frontend & DesignAuto-check passed
  • React UI State Patterns

    ChrisWiles/claude-code-showcase

    Sets patterns for React interfaces: when to show loading spinners or skeletons, how to surface errors, how to disable buttons during async work and how to handle empty lists.

    6.1k GitHub starsUsed in 8 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • GSAP in Vue, Nuxt and Svelte

    greensock/gsap-skills

    Shows how to use GSAP in Vue, Nuxt, Svelte and other lifecycle-based frameworks: create after mount, scope selectors to the component, and revert on unmount.

    16k GitHub starsUsed in 3 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Rules for writing idiomatic Svelte 5 code: when to reach for runes like state, derived and effect, and how to handle props, attachments and bindings.

    2.9k GitHub starsUsed in 4 repos~1.8k tokens
    Frontend & DesignAuto-check passed

More from lobehub/lobehub

All 51 skills in this repo
  • Builds single-file interactive HTML prototypes rendered with the real LobeHub UI components and written as production-style React, so they can later be split into files.

    83k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Verifies a delivery end to end by driving the real product on a CLI, web, desktop or iOS Simulator surface, capturing evidence and publishing a round with the lh CLI.

    83k GitHub stars~9.7k tokensUpdated today
    Auto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.

    83k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Guides building LobeHub builtin agent tools, from the manifest and execution runtime to executors, chat UI renders and registry wiring.

    83k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Explains how LobeHub client code fetches data through services, SWR store hooks and cache keys, and when to avoid useEffect fetching or duplicated state.

    83k GitHub stars~1.8k tokensUpdated today
    Auto-check passed

Questions about SPA Routes and Features

What does SPA Routes and Features do?

Explains LobeHub's split between src/routes page segments and src/features domain code, and where router config, redirects and platform adapters belong. The skill documents the SPA layout. The src/spa folder holds the entry points for web, mobile and desktop plus the router config, src/routes holds only page segments, and src/features holds business logic and UI by domain.

When should I use SPA Routes and Features?

SPA Routes and Features fits situations like: adding a new SPA route or route segment; moving route-specific components into the features folder; deciding whether code belongs in a route folder or a feature folder.

How do I install SPA Routes and Features in Claude Code?

Run `npx skills add lobehub/lobehub --skill spa-routes -a claude-code`. Or copy the skill folder (.agents/skills/spa-routes in lobehub/lobehub) into .claude/skills/spa-routes in your project. Claude Code loads it when a task matches its description.

How do I install SPA Routes and Features in Codex?

Run `npx skills add lobehub/lobehub --skill spa-routes -a codex`. Or copy the skill folder (.agents/skills/spa-routes in lobehub/lobehub) into .agents/skills/spa-routes in your project. Codex loads it when a task matches its description.

Can I use SPA Routes and Features in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lobehub/lobehub --skill spa-routes -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spa-routes, .gemini/skills/spa-routes, .github/skills/spa-routes and .opencode/skills/spa-routes in your project.

What does SPA Routes and Features need to run?

Going by SKILL.md and its folder, SPA Routes and Features needs the command-line tools its instructions call (git).

Does SPA Routes and Features access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is SPA Routes and Features safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does SPA Routes and Features use?

SPA Routes and Features has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does SPA Routes and Features use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to SPA Routes and Features?

Skills that share tags, products or a category with SPA Routes and Features: Angular Idioms and Patterns (irahardianto/awesome-agv, 156 stars), Walkontable Engine Development (handsontable/handsontable, 22k stars), React Router Development (remix-run/react-router, 57k stars) and React UI State Patterns (ChrisWiles/claude-code-showcase, 6.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SPA Routes and Features?

lobehub (a GitHub organization) maintains it in lobehub/lobehub, which has 83,127 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 11, 2026.

Source: lobehub/lobehub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.