Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问许可证需确认审计提醒

halidehalide 命令行

Agent Skill

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

总安装

242

周安装

10

GitHub Stars

公开资料未说明

下载量

79
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/kevinchatham/halide --skill halide

简介

简化前端构建与预览流程的命令行工具集,提升开发体验。

  • 适用于静态站点生成、热重载和组件沙箱测试等场景。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 支持多种框架集成,提供开箱即用的启动与调试能力。
  • 安装时请核对 Node.js 版本与项目依赖兼容性,避免构建失败。
  • halide 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Overview

Halide is a declarative BFF (Backend for Frontend) runtime built on Hono. It standardizes how SPAs communicate with backend services by providing a shared, predictable structure for auth, routing, proxying, and security.

When to use: You have a SPA (Angular, React, Vue, Svelte) and need a BFF layer between it and your backend services.

When not to use: You need direct HTTP layer control, multi-service routing, circuit breakers, load balancing, or TLS termination — use an API gateway or service mesh instead.

Installation

npm install halide

Or use the CLI to scaffold a server:

npx halide init

Requires Node.js >= 24.0.0. This is an ESM project ("type": "module").

Quick Start

import { createServer, apiRoute, proxyRoute } from 'halide';

const server = createServer({
  spa: {
    name: 'my-app',
    root: 'dist',
  },
  apiRoutes: [
    apiRoute({
      access: 'public',
      method: 'get',
      path: '/api/health',
      handler: async () => ({ status: 'ok' }),
    }),
  ],
  proxyRoutes: [
    proxyRoute({
      access: 'private',
      methods: ['get'],
      path: '/api/users',
      target: 'http://user-svc:3000',
    }),
  ],
});

server.start((port) => {
  console.log(`Server running on port ${port}`);
});

Run with: npx tsx server.ts

Exports

All imports come from 'halide':

ExportDescription
createServer<TClaims>(config)Creates a server instance. Returns {ready, start, stop}. Synchronous.
createApp<TClaims>(config)Creates a Hono app without starting an HTTP server. Returns {app, rateLimitDispose}. Useful for testing.
apiRoute<TClaims, TBody>(input)Factory that fills in type: 'api' and default authorize.
proxyRoute<TClaims>(input)Factory that fills in type: 'proxy' and default authorize.

Server Lifecycle

const server = createServer(config);
server.start((port) => {
  console.log(`Listening on ${port}`);
});
await server.ready;
await server.stop(); // graceful shutdown
  • createServer() is synchronous — no await needed
  • SIGINT/SIGTERM are handled automatically

Error Handling

All unhandled errors are caught and return 500 Internal Server Error with {error: 'Internal Server Error'}. Errors are logged via the configured logger.

Gotchas

  • Framework: Hono (not Express). All HTTP types come from hono
  • Config shape: ServerConfig uses separate arrays: apiRoutes + proxyRoutes, NOT a single routes array
  • Auth config is nested: security.auth.strategy — not a top-level auth key
  • Handler signature: (ctx, claims, logger) — 3 parameters. ctx is a plain object, NOT a Hono Context
  • CSP directives: Must use camelCase (defaultSrc), NOT kebab-case (default-src) — validator throws on kebab-case
  • Private routes require auth: If any route has access: 'private', security.auth must be configured
  • CORS wildcard: origin: '*' cannot be combined with credentials: true — validator throws
  • apiPrefix: Defaults to '/api' — paths starting with this prefix get 404 instead of SPA fallback. Set apiPrefix: '' to disable
  • Default port: 3553 (from PORT env → spa.port → default)
  • Proxy route methods required: methods array is required and must have at least one method
  • Route paths must start with /: Validation throws otherwise
  • Proxy host header: The original Host header is NOT forwarded — it's derived from the target URL. Original host is preserved as X-Forwarded-Host
  • Proxy readonly headers: host, connection, content-length, transfer-encoding, set-cookie cannot be overridden by identity or transform
  • Bearer secret caching: secretTtl defaults to 60 seconds. Set to 0 to disable caching
  • OpenAPI CSP warning: When OpenAPI is enabled, Scalar UI routes use relaxed CSP; custom CSP does not apply to those routes. A warning is logged at startup

Reference Files

  • Configuration — ServerConfig, SpaConfig, SecurityConfig, types
  • Authentication — Bearer, JWKS, authorization functions, claims
  • Routes — API routes, proxy routes, path rewriting, identity, transform
  • Security — CORS, CSP (directives table), rate limiting
  • Observability — Logger, lifecycle hooks, request ID
  • OpenAPI — OpenAPI configuration, per-route metadata

Fallback: Reading Installed Package

If you need to verify types or behavior beyond what this skill covers, look in the consuming project's node_modules/halide/:

  • node_modules/halide/dist/index.d.ts — all exported types and function signatures
  • node_modules/halide/dist/index.js — ESM entry point
  • node_modules/halide/package.json — version, dependencies, exports map

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.46%
按下载量换算29

Claude

29.93%
按下载量换算24

Cursor

19.89%
按下载量换算16

Gemini CLI

10.61%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills