Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Enforce import boundaries inside the devtools scope. Use for any work in "devtools/**".
.claude/skills/ledgerhq-devtools-import-boundary/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -40% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -45% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -46% | 0% |
Every @devtools/* package is self-contained. The only permitted cross-package imports within the devtools scope are listed in the table below; all others are forbidden.
| Package | May import from @devtools/* | |---|---| | @devtools/registry | any @devtools/<tool> | | @devtools/shell | @devtools/transport, @devtools/registry | | @devtools/bindings | @devtools/registry only | | @devtools/wire | @devtools/transport, @devtools/protocols | | @devtools/protocols | @devtools/transport only | | @devtools/relay | @devtools/transport only | | @devtools/transport-panel | @devtools/transport only | | @devtools/<tool> | none |
All other @devtools/* → @devtools/* imports are forbidden.
The devtools architecture decouples tools from the shell through the registry. The shell lazy-loads tools via metadata.loader; tools never know the shell exists. If a tool imports the shell or another tool directly:
If bindings or shell import a tool package directly (instead of through the registry):
DevToolsConfig.import() split point disappears, defeating code-splitting.Cross-cutting concerns (shared types, utilities) must not live in a tool package. Extract them to a standalone library with no @devtools/* scope, then import that from whichever packages need it.
App state and wiring for a tool arrive as props, built in @devtools/bindings — the single sanctioned bridge to Ledger Live internals. A tool that needs more data from the app gets new props, not a new import.
When adding a new package under devtools/, its README.md must state:
@devtools/* packages it may import, per the table above.@devtools/* imports are forbidden, with a pointer to this rule.Other measured skills in the registry, with their headline benchmark lift.