Token导航 LogoToken导航

Agent Skill · 开发

elysia(elysia 命令行)

elysia 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

elysia 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 12,520。

总安装 1,247周安装 53GitHub Stars 323下载 437核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:elysia(elysia 命令行)
来源仓库:https://github.com/pedronauck/skills
仓库路径:skills/elysia
安装命令:
npx skills add https://github.com/pedronauck/skills --skill elysia
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/pedronauck/skills --skill elysia

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

elysia 提供 Elysia 框架开发指南、模式规范和最佳实践参考。涵盖路由组织、控制器设计、TypeBox 验证和错误处理等企业级特性。推荐“一个 Elysia 实例对应一个控制器”的结构原则,提升可维护性。安装前需确认项目是否基于 Elysia 框架以避免误用。

注意:主要面向 Bun 运行时环境,其他平台可能存在兼容性问题。

来源仓库内路径:skills/elysia

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/pedronauck/skills --skill elysia;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

elysia 怎么安装?

在终端执行 npx skills add https://github.com/pedronauck/skills --skill elysia。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

elysia 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

elysia 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

elysia 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

elysia 用的人多吗?

公开数据是累计安装 1,247 次,近一周安装 53 次,下载 437 次,GitHub 323 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

elysia 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
elysia

elysia 命令行 · 本页

1,247323接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Elysia Developer Guide

This skill provides guidelines, patterns, and best practices for working with the Elysia framework in this project.

Quick Start

For detailed development guidelines, imports, and patterns, please refer to references/patterns.md in this skill directory.

Core Philosophy

  • Pattern-agnostic but feature-based structure recommended
  • "1 Elysia instance = 1 controller" principle
  • Strong typing with TypeBox for runtime validation
  • Centralized error handling and consistent responses
  • Production-ready deployment strategies

Structure, Routing & Controllers

Essential Organization Patterns

  • App as controller: Treat each new Elysia({prefix}) instance as the controller for that feature. Do not pass entire class methods directly as handlers. Instead, inline a small handler that calls service functions.
  • Feature folders: Use a feature-based structure:

- src/modules/<feature>/index.ts - Elysia controller (routes, guards, cookies) - src/modules/<feature>/service.ts - business logic (no HTTP context) - src/modules/<feature>/model.ts - schemas & types via t (TypeBox) - Keep shared utilities in src/utils/*.

  • Method chaining: Prefer fluent chaining on the Elysia instance for routes, guards, plugins.
  • Plugins: Encapsulate cross-cutting concerns in plugins via .use() (e.g., OpenAPI, JWT, CORS).
  • Context hygiene: If a service needs request data, keep it in the controller and pass only the relevant fields into the service function.

Feature Scaffolding Pattern

When scaffolding a feature, generate:

  1. model.ts with t.Object(...) schemas and exported type aliases via typeof schema.static.
  2. service.ts with pure functions (or an abstract class of statics when no instance state is needed).
  3. index.ts that mounts the Elysia routes, applies guard() with shared validation, and returns typed responses.

Validation, Schemas & Types

Runtime Validation + Static Types

  • Use import {t} from 'elysia' to define Body, Query, Params, Headers, Cookie, and Response schemas.
  • Derive TS types from typeof schema.static and export them (e.g., export type SignInBody = typeof signInBody.static).
  • Apply shared validation with .guard({...}). If combining guards, consider schema: 'standalone' to keep them independent.
  • Validate files by content: use fileType (magic number) when using standard schema systems.
  • Ensure response schemas are present for 2xx and error variants for strong end-to-end typing.

Handler Schema Guidelines

When generating handlers:

  • Include the 3rd argument schema object with body/query/params/headers/cookie/response.
  • Don't parse body for GET/HEAD (Elysia follows HTTP spec).
  • Provide examples with t.Object, t.Array, t.Union, t.Literal, file schemas, and show guard() for shared query/headers.

Error Handling & Response Shape

Centralized Error Management

  • Use .onError(({code, error, path, request}) => {...}) on the app to map framework and custom errors to a uniform JSON shape (e.g., {ok: false, error: {code, message, details}}).
  • Prefer throw status(code, messageOrPayload) for error control flow that onError can catch. Note: return status(...) won't be caught by onError.
  • Validation errors: normalize them to a predictable JSON (array of issues) while hiding sensitive internals in production.
  • Include correlation ids (e.g., x-request-id) and log within onError. Avoid leaking stack traces in production.
  • For success responses, optionally wrap in {ok: true, data} for uniformity.

Error Plugin Structure

When generating code, create:

  • src/plugins/error.ts that installs .onError(...).
  • Optionally src/plugins/logging.ts to log in onResponse & onError.

OpenAPI, Auth & Cross-cutting

OpenAPI

  • Add @elysiajs/openapi plugin and expose docs route (Scalar UI).
  • Keep response schemas accurate - OpenAPI derives from them.
  • If building SDKs, ensure routes are fully typed and examples provided.

Auth

  • Use @elysiajs/jwt for JWT signing/verification, or integrate with your auth of choice.
  • Keep auth in a plugin that decorates context with user after verification.
  • Protect routes via .guard({headers: t.Object({authorization: t.String()})}) and verify bearer tokens before handlers.

Cross-cutting Plugins

  • Install @elysiajs/cors where needed.
  • Consider @elysiajs/server-timing and @elysiajs/opentelemetry for observability.

When scaffolding, generate src/plugins/openapi.ts, src/plugins/auth.ts, and wire them in src/app.ts.

Deploy, Performance & Docker

Production Deployment

  • Cluster mode for multi-core: use a small launcher (index.ts) that forks workers and imports server.ts per worker.
  • Prefer building with bundlers like Vite or esbuild for production deployments.
  • If compiling interferes with tracing (OpenTelemetry), avoid --minify or mark instrumented modules as --external.
  • Accept process.env.PORT (with fallback) and bind 0.0.0.0 for PaaS.

Docker

  • Build stage: use Node.js base image with pnpm.
  • Runtime: distroless base, copy binary, CMD ["./server"].

Deployment Scaffolding

When generating a deploy scaffold, include:

  • src/index.ts (cluster launcher), src/server.ts (app), Dockerfile (multi-stage), and build scripts.

Testing

Unit Tests

  • Use vitest.
  • Import the app and use app.handle(new Request(url, options)) to assert status/body/headers.
  • For service tests, call pure functions directly.

Test Examples to Include

  • Simple GET test returning text.
  • POST with body validation (both valid and invalid paths).
  • Authenticated route example using a mocked Authorization header.
  • Prefer small, focused tests per route and per service.

Quick Utilities

Common Patterns

  • App context: use .state() and .decorate() to add version info, helpers, etc., then read from {store, getDate}.
  • WebSocket endpoints via .ws() for simple real-time APIs.
  • Custom body parser with .onParse() for special content types.

Validation Checklist

Before finishing a task involving Elysia:

  • Feature structure follows model.ts, service.ts, index.ts pattern.
  • All handlers have proper schema definitions (body/query/params/response).
  • Error handling uses centralized .onError() plugin.
  • Response schemas are defined for OpenAPI generation.
  • Tests use app.handle(new Request(...)) pattern.
  • Run type checks (pnpm run typecheck) and tests (pnpm run test).

For detailed patterns and code examples, see references/patterns.md.

平台分布

Codex

34.41%
按下载量换算150

Claude

30.35%
按下载量换算133

Cursor

18.22%
按下载量换算80

Gemini CLI

8.9%
按下载量换算39

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills