Bun File System Router

Bun provides a fast API for resolving routes against file-system paths

9 stars 1 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add jarle/bun-skills --skill Bun File System Router
Manual install
git clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-runtime-file-system-router ~/.claude/skills/Bun-File-System-Router

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# File System Router

> Bun provides a fast API for resolving routes against file-system paths

This API is primarily intended for library authors. At the moment only Next.js-style file-system routing is supported, but other styles may be added in the future.

## Next.js-style

The `FileSystemRouter` class can resolve routes against a `pages` directory. (The Next.js 13 `app` directory is not yet supported.) Consider the following `pages` directory:

```txt  theme={"theme":{"light":"github-light","dark":"dracula"}}
pages
├── index.tsx
├── settings.tsx
├── blog
│   ├── [slug].tsx
│   └── index.tsx
└── [[...catchall]].tsx
```

The `FileSystemRouter` can be used to resolve routes against this directory:

```ts router.ts theme={"theme":{"light":"github-light","dark":"dracula"}}
const router = new Bun.FileSystemRouter({
  style: "nextjs",
  dir: "./pages",
  origin: "https://mydomain.com",
  assetPrefix: "_next/static/"
});

router.match("/");

// =>
{
  filePath: "/path/to/pages/index.tsx",
  kind: "exact",
  name: "/",
  pathname: "/",
  src: "https://mydomain.com/_next/static/pages/index.tsx"
}
```

Query parameters will be parsed and returned in the `query` property.
Read the full skill on GitHub

Details

Skill name
Bun File System Router
Path
skills/bun-runtime-file-system-router/SKILL.md
License
MIT
Repo updated
24 February 2026

FAQ

What does the Bun File System Router skill do?

Bun provides a fast API for resolving routes against file-system paths

How do I install the Bun File System Router skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun File System Router. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Bun File System Router popular?

It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.

Related skills

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.