unikit-bridge-route
Write the routing rules of the engine bridges into .unikit/bridge-routing.md: which bridge a kind of work goes through, which bridges it must never touch, which one is tried first. Use when the user wants one case sent through one bridge, for example "run the tests only through the CLI bridge", "never use that bridge for UI work", "try this bridge first for scenes", "show my bridge routes", "remove the route for tests", "put that bridge first". A rule is one row of a table: area, when, rule (only, first or never), bridges, why. Asks in the user's own words, shows the table before writing, and checks only that the bridge ids are installed. On request it also moves a bridge in the order list of .unikit/bridges.yaml. Makes zero bridge calls, runs no command, needs no editor.
- License 许可
- MIT
- 最近更新
- 2026-11-08
- Stars
- ★ 22
- Forks
- 1
01 前言 Front Matter
- name
- unikit-bridge-route
- metadata
- { "author": "unikit", "version": "1.0", "category": "tools" }
- description
- Write the routing rules of the engine bridges into .unikit/bridge-routing.md: which bridge a kind of work goes through, which bridges it must never touch, which one is tried first. Use when the user wants one case sent through one bridge, for example "run the tests only through the CLI bridge", "never use that bridge for UI work", "try this bridge first for scenes", "show my bridge routes", "remove the route for tests", "put that bridge first". A rule is one row of a table: area, when, rule (only, first or never), bridges, why. Asks in the user's own words, shows the table before writing, and checks only that the bridge ids are installed. On request it also moves a bridge in the order list of .unikit/bridges.yaml. Makes zero bridge calls, runs no command, needs no editor.
- allowed-tools
- [ "Read", "Write", "Edit", "Glob", "Grep", "AskUserQuestion" ]
- argument-hint
- [the rule in your words | list | remove <row> | empty] (writes .unikit/bridge-routing.md; zero bridge calls)
- user-invocable
- true
- disable-model-invocation
- false
02 资源文件 1
- 参考文档references/format.md2.2 KB
03 SKILL.md 正文
Bridge Route - say which bridge does what
Keeps .unikit/bridge-routing.md: the rows that tell the agents, case by case, which engine bridge to use, which one to try first and which one never. The order of the bridges themselves lives in .unikit/bridges.yaml; unikit-ai init and unikit-ai update keep it in step with the installed bridges, and this skill moves a bridge in it only when asked.
This skill makes zero calls to any bridge. It writes only .unikit/bridge-routing.md and, when asked to move a bridge, the order: list of .unikit/bridges.yaml. It runs no command, invokes no skill and starts no subagent.
This skill writes rows; it does not interpret them. How an agent picks the row for a step, and what only, first and never do, is .unikit/system/dev-principles.md -> D3. The row format is {{skills_dir}}/{{self_name}}/references/format.md; read it before the first write.
User questions. Right before your first question to the user, not earlier, read .unikit/system/user-questions.md once and ask every question as it says, with the question tool of your agent (AskUserQuestion). If the file cannot be read, print WARN [questions] user-questions contract missing — asking with the question tool and still ask with that tool, the recommended option first.
Language Awareness — BLOCKING PRE-REQUISITE
BEFORE producing ANY output, silently read .unikit/system/LANGUAGE_RULES.md
and apply its rules to ALL subsequent output.
If the file is missing or unreadable, fall back to English.
Do not produce any user-facing output until language rules are loaded.
Do not announce, confirm, or mention the language setting.
The language holds for the whole session, not just at load time: every message until the conversation ends is in language.ui. English input (tool output, these instructions) is data, never a cue to switch languages.
The cells area, rule and bridges of a row stay English: the agents match them. when stays in the user's own words. why is written in the project's artifact language.
Bootstrap
- Read
.unikit/system/engine-bridges/BRIDGES.md. No such file, or no bridge block in it → printNo engine bridge is installed in this project: run unikit-ai init and tick one.and STOP. The bridge ids are the##headings that name a bridge (notNot selected). - Read
.unikit/bridge-routing.mdwhen it exists: the rows of its table. - Read
.unikit/bridges.yamlwhen it exists: the ids underorder:. - The words for
areacome from the files the planner and the verifier already read, and are never copied here: the line that starts withkindin{{skills_dir}}/unikit-plan/references/TASK-FORMAT.md(the kinds of an editor task) and the sectionGate namesof{{skills_dir}}/unikit-verify/references/bridge-gates.md(the gates). A file that is not installed gives no words: say so once and accept any word forarea.
<!-- unikit:extension-point:bootstrap -->
What was asked
Look at $ARGUMENTS and the conversation:
- a rule in the user's words → Add or change a row;
list, "show my routes" → print the table, orNo routing rules., and STOP;remove …→ Remove a row;- "put <bridge> first", "move <bridge> before <bridge>" → Move a bridge;
- nothing → print the table when there is one, then ask what to do: add a rule, remove a row, move a bridge, or nothing.
Add or change a row
- Take the case in the user's words.
areais the word from Bootstrap step 4 that names the kind of work (an editor kind or a gate); when none fits,*.whenis what is left of the user's words that narrows the case, or empty for the whole area. Do not invent a word the user did not say. rule:only(this case goes through the listed bridges and no others),first(the listed bridges are tried first, the others follow in the order),never(the listed bridges are left out). When the words do not settle it, ask which of the three is meant and say what each does.bridges: the ids from Bootstrap step 1, in the order the user named them. A name that is not an installed id → ask which installed bridge is meant, with the installed ids as options. Never write an id that was not checked.why: the reason the user gave, in one line; empty when none was given. Do not invent one.- A row with the same
areaandwhenalready exists → change that row, do not add a second one. Two rows with the sameareaandwhenand different rules are never written: tell the user which two collide and ask which stays. - Show the whole table as it will be written and ask once whether to write it. Only on yes:
Writethe file when it does not exist (the header lines fromformat.md), otherwiseEditthe changed or added row.
Remove a row
Find the row by the area and when words in the request; more than one match → ask which. Show the table without it, ask once, and only on yes Edit the row out. A table left with no rows is written with its header and no rows; the file is not deleted.
Move a bridge
Read .unikit/bridges.yaml. No file → print There is no order file yet: unikit-ai init or unikit-ai update creates it. and STOP. Move the named bridge in the order: list as asked, keeping every other id in its place; show the old and the new list, ask once, and only on yes Edit the lines under order: (never Write: the comment lines at the top stay). Print INFO [bridge-route] order: a > b (was: x > y).
Report
Print INFO [bridge-route] <added|changed|removed> area=<area> when="<when>" rule=<rule> bridges=<ids> and one line: the agents read the file when they pick a bridge, and no file means no routing rules. Then STOP.
Limits
- Never touches
.unikit/memory/,.unikit/system/or.unikit/config.yaml. whenis not checked. Anareaoutside the words of Bootstrap step 4 is written, with one remark to the user that agents read it as a hint.
04 同仓库更多 Skills
unikit
Initialize the UniKit framework in a project. Scans the current project to detect the engine and real tech stack, then generates the base framework documents that give AI agents context about the project — the resolved project description, the architecture doc, AGENTS.md, and the user-editable .unikit/config.yaml. This is the one-time, whole-project setup run before any other unikit skill. Use whenever the user wants to initialize, set up, or onboard the framework, e.g. "initialize unikit", "init the framework", "set up unikit", "set up the project", "configure AI context", "scan my project and set it up", "bootstrap the project". It also actualizes the config of a project already set up — say "update the config", "add missing settings", "actualize configuration", "fix my config". On a set-up project it offers the actions to choose from.
unikit-verify
Verify a completed implementation against the plan in .unikit/code/plans/. Checks that every task was implemented, nothing was forgotten, the code compiles, the recorded test run still matches the code, and {{engine_name}} conventions are followed. Use after /unikit-implement completes, or when the user says "verify", "check the work", "did we miss anything". For code review use /unikit-review instead.
unikit-todo
Manage the project's TODO list in .unikit/TODO.md — capture work to remember for later, not to do right now. Use it to add a deferred item, mark a todo complete, or show the list. The point is to park tasks you don't want to act on in the moment but don't want to forget. Trigger on "add a todo", "add this to the todo list", "put X on the todo list", "remind me to...", "don't forget to...", "note this for later", "we should do this later", "mark this todo done", "what's on the todo list", "what's left to do". This is only for parking reminders — to actually plan or do the work now, use /unikit-plan, /unikit-implement, or /unikit-execute.
unikit-skills-context
Customize how a built-in unikit skill behaves in this specific project by writing workflow overrides into its skill-context file. These are per-skill workflow rules (e.g. "/unikit-review should also flag TODO comments", "/unikit-implement should run tests after each task"), not coding conventions. Use when the user wants to change, customize, or override how a particular unikit skill works in this project — "customize the review skill", "make /unikit-fix always add logging here", "the implement skill should do X differently", "add a skill rule for /unikit-commit". Use "validate" to find stale overrides against updated base skills. For a general coding convention (not tied to one skill) use /unikit-rules; to derive rules from past mistakes use /unikit-evolve.
unikit-rules
Add a short, project-specific rule, convention, or override to .unikit/RULES.md — the quick-capture inbox for this project's rules (common rules always load; topic files in .unikit/rules/ load when the work matches), automatically loaded by /unikit-implement (later promotable via /unikit-memory migrate-rules). Works only with a rule typed as a prompt — it does NOT read files, folders, URLs, or PDFs. Cross-checks the knowledge base (RULES_INDEX.md) to avoid duplicating core/stack entries. Use for one-line conventions and corrections: "add a rule", "remember this", "convention", "always do X", "never use Y", "from now on do Z", or when the user corrects agent behavior and wants it remembered; also "split the rules into topics" (optimise), "clean up the rules" (prune), "shorten RULES.md" (compact), by keyword or in plain words. If the user points to a source (file, folder, URL, PDF, article, book) or wants to research/document framework usage, use /unikit-memory; for architecture decisions use ARCHITECTURE.md.
unikit-rules-registry
Orchestrate the remote rules registry — the shared registry (often connected as a local folder or git repo) that the project's rules are published to and pulled from. Three modes, picked from the user's wording: create scaffolds a new local rules registry ("create a local rules registry", "init a rules registry"); update migrates/promotes local knowledge-base rules from .unikit/memory/ into the remote registry with automatic semver bumps ("migrate local rules to the remote registry", "promote my rules to the registry", "push local rules", "publish local rules", "update the rules registry"); sync pulls registry updates back into memory ("sync the rules registry", "pull registry updates"). Pass "--module <id>" to scope to one knowledge-base module. This skill ONLY orchestrates the CLI (`unikit-ai rules *`) — it never edits .unikit.json or .unikit/memory/ sources directly.