Aurelia runtime
Skill Expert-Vision-Software/aurelia-expert/skills/aurelia-runtime
Aurelia v2 MVVM SPA expertise skill package — 5 router-routed skills (foundation, runtime, largespa, migration) for AI coding agents.
npx -y skills add Expert-Vision-Software/aurelia-expert --skill aurelia-runtimeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when wiring an Aurelia v2 component — resolves dependency injection, routing, navigation, AppTasks, custom events, and cross-feature orchestration. Use when injecting services, configuring `@route`, navigating programmatically, sharing state between features, declaring AppTasks, or paginating components. Leading word — resolve.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.1 KB, as published. Nobody here has run it
aurelia-runtime
Resolve the wiring of an Aurelia v2 component: injection, routes, lifecycle, cross-feature flows.
The resolve step
Every wiring problem starts the same way: identify what to resolve first, then resolve this through resolve(Token). Prefer resolve() over the @inject decorator — @inject still works but resolve() is the modern v2 idiom.
| Need | Resolve |
|---|---|
| Service | resolve(IFoo) |
| Route navigation | resolve(IContextRouter) / resolve(IRouter) |
| Component-scoped state | resolve(newInstanceForScope(...)) |
| Deferred / circular | resolve(lazy(...)) |
| Plugin collection | resolve(all(...)) |
| Optional fallback | resolve(optional(...)) |
The resolve step in a class is constructor(private readonly svc: IFoo = resolve(IFoo)) for testability. Unit tests pass mocks through the constructor.
V1 contamination — do not resolve these
These belong to Aurelia 1; they throw or silently break v2:
@injectdecorator → preferresolve()(still valid butresolve()is idiomatic v2)configureRouter→ use@routePLATFORM.moduleName→ gone; use@customElementdependenciesor() => import(...)in routecomponent<router-view>→ use<au-viewport><compose view-model>→ use<au-compose>withcomponent.delegatefor custom events → throws AUR0713 at compile time; use.triggeractivate/deactivatehooks → usecanLoad/loading/canUnload/unloading
Non-negotiables
Override any earlier reading.
- Custom events:
.triggeronly (.delegatethrows AUR0713 at compile time). - Type imports:
import type/export typefor interfaces — interfaces are erased at runtime. - Singleton DI: prefer singletons over
IEventAggregatorfor cross-feature state. - Service returns Model: services expose Models, never DTOs; convert via
Model.fromDTO()/model.toDTO(). - I-prefix tokens:
IUserService,IApiClient— semantic prefix for "interface token". - Constructor injection:
constructor(private readonly svc: IFoo = resolve(IFoo))for testability.
Orchestration: the four primitives
Resolve cross-feature wiring with these four interlocking primitives:
- Bindables down — parent pushes state via
@bindable. - Custom event up — child fires
.trigger; parent handles viaon-event.trigger="handler($event.detail)". - Service-as-store — singleton DI service owns shared state; components
resolveit. - Thin page component — page is a mediator; no business logic in the page itself.
See reference/orchestration.md for the full pattern.
Reference
Each reference file covers one sub-area. Load the one that matches the question.
- DI —
resolve(),DI.createInterface, registration lifecycles, advanced resolvers → reference/di.md - Routing & navigation —
@route,<au-viewport>,IContextRouter, route parameters withmergeStrategy, lifecycle guards → reference/routing.md - Events & tasks — AppTask phases (
creating/hydrating/ ...),TaskQueue,.triggervs.delegate, event modifiers → reference/events-tasks.md - Cross-feature orchestration — thin-page mediator, bindables down / events up, service-as-store → reference/orchestration.md
Ground truth
- https://docs.aurelia.io
aurelia/aureliaon GitHub (DeepWiki available)