ensemble:generate-project-router-rules

ensemble:generate-project-router-rules is a command for Claude Code from FortiumPartners/ensemble. It costs 19 tokens per session (5,554 once invoked), scanned A, original, MIT.

A command that examines a project's dependencies and frameworks, then creates routing rules tailored to that project. The rules connect technologies and project context with relevant agents or skills.

In plain words
What is it for?
It helps detect languages, package managers, and frameworks, then generate a project router-rules file.
Why use it?
Generic routing may miss the tools and frameworks used by a particular codebase. Project-specific rules make routing recommendations more relevant.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the ensemble-router plugin — 2 commands shipped together

Good fit It helps detect languages, package managers, and frameworks, then generate a project router-rules file.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/fortiumpartners/ensemble/generate-project-router-rules
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.

Clone the repo
git clone --depth 1 https://github.com/FortiumPartners/ensemble

Made for: Claude Code.

Or install ensemble-router, the plugin that ships this one along with the rest of its 2 commands.

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 ensemble:generate-project-router-rules

README.md
[![agentmods](https://agentmods.dev/badge/commands/fortiumpartners/ensemble/generate-project-router-rules.svg)](https://agentmods.dev/commands/fortiumpartners/ensemble/generate-project-router-rules)
Your own site
<a href="https://agentmods.dev/commands/fortiumpartners/ensemble/generate-project-router-rules"><img src="https://agentmods.dev/badge/commands/fortiumpartners/ensemble/generate-project-router-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,554 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 original No closer match found 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.00019 $0.05554
Opus 5 $0.00010 $0.02777
Sonnet 5 $0.00004 $0.01111
Haiku 4.5 $0.00002 $0.00555

Measured 4d ago against content hash 2336dc163ddf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

ensemble:generate-project-router-rules 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 4d 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.

packages/router/commands/generate-project-router-rules.md · 635 lines

How it starts

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

Generate Project Router Rules

Analyze the current project's technology stack and generate a project-specific .claude/router-rules.json file that extends the global routing rules with project-specific triggers, skills, and agent recommendations.

Overview

Project router rules are merged with global rules at runtime. Project rules:

  • Add project-specific triggers to existing agent categories
  • Map project technologies to relevant skills
  • Define project context for stronger routing recommendations

Phase 1: Project Analysis

1.1 Detect Package Manager and Dependencies

Scan for dependency files:

Actions:

  • Check for package.json (Node.js/npm/yarn/pnpm)
  • Check for requirements.txt, pyproject.toml, Pipfile (Python)
  • Check for Gemfile (Ruby)
  • Check for go.mod (Go)
  • Check for Cargo.toml (Rust)
  • Check for composer.json (PHP)
  • Check for *.csproj, *.sln (C#/.NET)

1.2 Identify Frameworks

Analyze dependencies to detect frameworks and map to skills:

Frontend Frameworks
Framework Detection Method Skills to Map
React react in package.json dependencies react, jest
Next.js next in package.json vercel, react, jest
Vue vue in package.json jest
Nuxt nuxt in package.json jest
Angular @angular/core in package.json jest
Svelte svelte in package.json jest
SvelteKit @sveltejs/kit in package.json jest
Remix @remix-run/react in package.json react, jest
Astro astro in package.json jest
Gatsby gatsby in package.json react, jest
Solid.js solid-js in package.json jest
Qwik @builder.io/qwik in package.json jest
Backend Frameworks (Node.js)
Framework Detection Method Skills to Map
NestJS @nestjs/core in package.json nestjs, jest
Express express in package.json jest
Fastify fastify in package.json jest
Hono hono in package.json jest
Koa koa in package.json jest
AdonisJS @adonisjs/core in package.json jest

Read the full file on GitHub · 635 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. 4d ago First seen · 635 lines · 19 tokens per session scan A 2336dc163ddf

Subscribe to this mod's changes

ensemble:generate-project-router-rules is a command published in the GitHub repository FortiumPartners/ensemble (11 stars, last pushed today), licensed MIT. It adds 19 tokens to every session and 5,554 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.