Elysia
Personal AI agent skills I use in development workflows.
npx -y skills add DobroslavRadosavljevic/skills --skill elysiaAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 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
Build, review, debug, test, migrate, secure, or deploy Elysia and ElysiaJS applications with current documentation. Use for Bun or Node Elysia servers, routes, schemas and validation, lifecycle hooks, plugins and scope, guards, macros, context extension, error handling, Eden Treaty, OpenAPI, WebSocket, SSE, runtime adapters, and production readiness.
SKILL.md
4.8 KB, as published. Nobody here has run it
Elysia
Use this skill when the work touches Elysia or ElysiaJS.
Workflow
- Inspect the application before proposing changes:
- Installed versions of
elysiaand relevant@elysia/*packages. - Runtime and adapter: Bun,
@elysia/node, Deno, Cloudflare Worker, Vercel, Netlify, or another Web Standard host. - Root instance, export/listen shape, route plugins, prefixes, guards, macros, schemas, error hooks, and tests.
- Registration order and plugin scope for every cross-cutting hook.
- Installed versions of
- Refresh current official docs when the task depends on latest APIs, adapters, package compatibility, experimental support, or version-specific behavior. Start from source-map.md.
- Route the work to the focused references:
- Setup, routing, handlers, streaming, and project layout: setup-routing.md.
- Schemas, lifecycle order, status responses, and errors: validation-lifecycle-errors.md.
- Plugins, scope, guards, macros, dependencies, and context: plugins-context.md.
- Tests, Eden, OpenAPI, WebSocket, and SSE: testing-clients-realtime.md.
- Runtimes, deployment, security, observability, and production checks: production-runtime-security.md.
- Preserve the repository's existing architecture and commands unless the user explicitly asks for a migration.
- Verify behavior at the narrowest useful boundary, then verify the assembled application.
Core Judgment
- Treat schemas as executable HTTP contracts. Define request and per-status response schemas where the boundary matters; do not duplicate them with hand-written interfaces.
- Keep route handlers thin. Prefer feature-scoped Elysia instances for HTTP concerns and ordinary functions/modules for business logic that does not need request context.
- Let Elysia infer handler context. Do not pass a broad manually typed
Contextthrough controllers or services when destructured values or schema-derived types are sufficient. - Respect chain order. Interceptor hooks apply to routes and plugins registered after them, except
onRequest, which is global to incoming requests. - Respect plugin encapsulation. A plugin's lifecycle hooks and schemas do not automatically protect parent routes. Choose
local,scoped, orglobaldeliberately and test the boundary. - Prefer
resolveoverderivewhen a value depends on validated request data.deriveruns before validation;resolveruns after validation. - Return
status(code, value)for expected HTTP outcomes when type-safe response narrowing matters. Throw only when the outcome should pass throughonError. - Use named plugins, plus
seedwhen configuration changes identity, when lifecycle deduplication matters. - Treat OpenAPI security declarations as documentation only. Enforce authentication and authorization in guards, macros, hooks, or handlers.
- Do not assume Bun-only APIs on other adapters.
serverandserver.requestIPare Bun-specific; adapter and platform limitations must shape the implementation. - Do not quote benchmark numbers as general application performance guarantees. Profile the actual app and runtime.
Verification
Prefer repository-owned commands. For meaningful Elysia changes, cover the relevant subset:
- Typecheck and production build with the actual runtime/adapter.
- Direct
app.handle(new Request('http://localhost/...'))tests for success, validation failures, auth failures, error mapping, headers, and status-specific response bodies. - Scope/order regression tests when changing hooks, guards, macros, or plugin composition.
await app.modulesbefore testing deferred or lazy-loaded plugins.- Eden contract tests when the application exports its type to clients.
- Generated OpenAPI inspection when schemas, response status maps, tags, security metadata, or type generation changes.
- Real HTTP smoke test for listen/export, proxy headers, cookies, CORS preflight, streaming, and runtime-specific behavior.
- WebSocket connection, invalid-message, close, timeout, and backpressure checks when realtime behavior changes.
- Deployment-target smoke test when changing adapters, bundling, binary compilation, serverless exports, environment variables, or platform bindings.
Report which checks ran, which did not, and any version-sensitive assumptions that remain.