Token导航 LogoToken导航

Agent Skill · 前端设计

cloudevents(cloudevents 命令行)

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

cloudevents 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 9,185。

总安装 233周安装 10GitHub Stars 4下载 82核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/accolver/skill-maker --skill cloudevents

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

cloudevents 用于构建、验证和反序列化符合 CNCF CloudEvents v1.0.2 规范的事件。确保 Agent 生成合规的事件结构、HTTP/Kafka 绑定及 JSON 序列化格式。当任务涉及 CloudEvents 信封、属性或传输绑定时推荐使用此技能。

需验证 ce-headers、application/cloudevents+json 类型及互操作性要求。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/cloudevents

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cloudevents 怎么安装?

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

cloudevents 支持哪些 AI 工具?

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

cloudevents 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

cloudevents 是免费的吗?

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

cloudevents 用的人多吗?

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

cloudevents 安全吗?

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

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

值得选的地方

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

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

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

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
cloudevents

cloudevents 命令行 · 本页

2334需要联网未明确通过

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

SKILL.md 原文

CloudEvents

Build, validate, and serialize events conforming to the CNCF CloudEvents v1.0.2 specification. This skill ensures agents produce spec-compliant event structures, correct HTTP/Kafka bindings, and proper JSON serialization — details that agents consistently get wrong without guidance.

When to use

  • The task explicitly involves CloudEvents v1.0 envelopes, attributes, or transport bindings.
  • The user needs to build, validate, serialize, or parse events in structured or binary mode.
  • The request mentions ce- headers, application/cloudevents+json, or CloudEvents interoperability.
  • The event contract must be CNCF CloudEvents-compliant across HTTP, Kafka, AMQP, or similar transports.

Do NOT use when:

  • The event format is proprietary or intentionally not CloudEvents.
  • The task is generic pub/sub design without a CloudEvents requirement.
  • The user only needs business-payload schema design with no event-envelope concern.

Response format

Always structure the final response with these top-level sections, in this order:

  1. Summary — state the task, scope, and main conclusion in 1-3 sentences.
  2. Decision / Approach — state the key classification, assumptions, or chosen path.
  3. Artifacts — provide the primary deliverable(s) for this skill. Use clear subheadings for multiple files, commands, JSON payloads, queries, or documents.
  4. Validation — state checks performed, important risks, caveats, or unresolved questions.
  5. Next steps — list concrete follow-up actions, or write None if nothing remains.

Rules:

  • Do not omit a section; write None when a section does not apply.
  • If files are produced, list each file path under Artifacts before its contents.
  • If commands, JSON, SQL, YAML, or code are produced, put each artifact in fenced code blocks with the correct language tag when possible.
  • Keep section names exactly as written above so output stays predictable across skills.

Workflow

1. Determine the event shape

Identify the REQUIRED context attributes and which OPTIONAL/extension attributes apply. Every CloudEvent MUST have these four attributes:

AttributeTypeRule
specversionStringMUST be "1.0"
idStringNon-empty, unique within scope of source
sourceURI-referenceNon-empty; absolute URI recommended
typeStringNon-empty; reverse-DNS prefix recommended

OPTIONAL attributes:

AttributeTypeNotes
datacontenttypeStringRFC 2046 media type. Defaults to application/json in JSON
dataschemaURISchema for data. Change URI on incompatible schema changes
subjectStringSub-resource within source context
timeTimestampRFC 3339 format (2024-01-15T09:30:00Z)

Extension attributes follow the same naming rules (lowercase a-z, 0-9 only, max 20 chars) and are serialized as top-level properties in JSON or ce- prefixed headers in HTTP binary mode.

2. Choose the content mode

There are three content modes. Pick based on your transport and consumer needs:

ModeWhen to useContent-Type
BinaryEfficient transfer; consumers need raw data accessThe datacontenttype value
StructuredSimple forwarding across hops and protocolsapplication/cloudevents+json
BatchedMultiple events in one HTTP request/responseapplication/cloudevents-batch+json

3. Serialize the event

JSON Structured Mode

All attributes and data go in a single JSON object. Media type: application/cloudevents+json.

{
  "specversion": "1.0",
  "type": "com.example.order.created",
  "source": "https://example.com/orders",
  "id": "A234-1234-1234",
  "time": "2024-01-15T09:30:00Z",
  "datacontenttype": "application/json",
  "data": {
    "orderId": "12345",
    "amount": 99.99
  }
}

Data handling rules:

  • JSON data (*/json or */*+json content type) → use data member, store as native JSON value (NOT a stringified JSON string)
  • Binary data → use data_base64 member with Base64-encoded value
  • data and data_base64 are mutually exclusive
  • No datacontenttype → implied application/json
HTTP Binary Mode

Event data goes in HTTP body. All context attributes go in ce- prefixed headers. The Content-Type header carries the datacontenttype value (do NOT also send a ce-datacontenttype header).

POST /webhook HTTP/1.1
Host: example.com
ce-specversion: 1.0
ce-type: com.example.order.created
ce-source: https://example.com/orders
ce-id: A234-1234-1234
ce-time: 2024-01-15T09:30:00Z
Content-Type: application/json

{"orderId": "12345", "amount": 99.99}

Header value encoding: String values in headers MUST be percent-encoded for characters outside printable ASCII (U+0021-U+007E), plus space (U+0020), double-quote (U+0022), and percent (U+0025).

JSON Batch Mode

An array of CloudEvent JSON objects. Media type: application/cloudevents-batch+json.

[
  {
    "specversion": "1.0",
    "type": "com.example.order.created",
    "source": "/orders",
    "id": "evt-001",
    "data": { "orderId": "123" }
  },
  {
    "specversion": "1.0",
    "type": "com.example.order.shipped",
    "source": "/orders",
    "id": "evt-002",
    "data": { "orderId": "123", "trackingId": "TRK-456" }
  }
]

4. Validate the event

Check these rules against every CloudEvent you produce:

  • specversion is exactly "1.0" (string, not number)
  • id is a non-empty string
  • source is a non-empty URI-reference
  • type is a non-empty string with reverse-DNS prefix
  • time (if present) is RFC 3339 format
  • datacontenttype (if present) is a valid RFC 2046 media type
  • dataschema (if present) is a non-empty absolute URI
  • Extension attribute names are lowercase alphanumeric only, max 20 chars
  • JSON mode: data and data_base64 are not both present
  • HTTP binary mode: Content-Type matches datacontenttype, no ce-datacontenttype header
  • Event wire size ≤ 64 KB for safe intermediary forwarding
  • No sensitive data in context attributes (only in encrypted data)

5. Implement consumer detection

Consumers receiving HTTP messages distinguish content modes by inspecting Content-Type:

Content-Type prefixMode
application/cloudeventsStructured
application/cloudevents-batchBatched
Anything else (with ce- headers)Binary

Checklist

  • All four REQUIRED attributes present (specversion, id, source, type)
  • specversion is the string "1.0", not a number
  • type uses reverse-DNS prefix (e.g., com.example.object.created)
  • source is a valid URI-reference (absolute URI recommended)
  • Content mode chosen and correct Content-Type set
  • Data serialized correctly for chosen mode (JSON value vs base64 vs raw body)
  • HTTP binary mode: attributes in ce- headers, no ce-datacontenttype
  • Extension attributes follow naming rules (lowercase, alphanumeric, ≤20 chars)

Examples

Producer: HTTP structured mode (TypeScript)

import { randomUUID } from "crypto";

interface CloudEvent<T = unknown> {
  specversion: "1.0";
  type: string;
  source: string;
  id: string;
  time?: string;
  datacontenttype?: string;
  dataschema?: string;
  subject?: string;
  data?: T;
  data_base64?: string;
  [extension: string]: unknown;
}

function createCloudEvent<T>(
  type: string,
  source: string,
  data: T,
  options?: {
    subject?: string;
    datacontenttype?: string;
    dataschema?: string;
    extensions?: Record<string, string | number | boolean>;
  },
): CloudEvent<T> {
  const event: CloudEvent<T> = {
    specversion: "1.0",
    id: randomUUID(),
    type,
    source,
    time: new Date().toISOString(),
    data,
  };

  if (options?.subject) event.subject = options.subject;
  if (options?.datacontenttype) event.datacontenttype = options.datacontenttype;
  if (options?.dataschema) event.dataschema = options.dataschema;

  // Extensions are top-level properties
  if (options?.extensions) {
    for (const [key, value] of Object.entries(options.extensions)) {
      if (!/^[a-z0-9]+$/.test(key) || key.length > 20) {
        throw new Error(
          `Extension "${key}" must be lowercase alphanumeric, max 20 chars`,
        );
      }
      event[key] = value;
    }
  }

  return event;
}

// Send as structured mode
async function sendStructured(url: string, event: CloudEvent): Promise<void> {
  await fetch(url, {
    method: "POST",
    headers: { "Content-Type": "application/cloudevents+json" },
    body: JSON.stringify(event),
  });
}

// Send as binary mode
async function sendBinary(url: string, event: CloudEvent): Promise<void> {
  const { data, data_base64, datacontenttype, ...attrs } = event;
  const headers: Record<string, string> = {};

  for (const [key, value] of Object.entries(attrs)) {
    if (value !== undefined && value !== null) {
      headers[`ce-${key}`] = String(value);
    }
  }

  headers["Content-Type"] = datacontenttype ?? "application/json";

  await fetch(url, {
    method: "POST",
    headers,
    body: data_base64
      ? Buffer.from(data_base64, "base64")
      : JSON.stringify(data),
  });
}

Consumer: detecting and parsing (TypeScript)

function parseCloudEvent(
  headers: Record<string, string>,
  body: string | Buffer,
): CloudEvent {
  const contentType = headers["content-type"] ?? "";

  if (contentType.startsWith("application/cloudevents-batch")) {
    throw new Error("Use parseBatch() for batched events");
  }

  if (contentType.startsWith("application/cloudevents")) {
    // Structured mode: entire event is in the body
    return JSON.parse(typeof body === "string" ? body : body.toString("utf-8"));
  }

  // Binary mode: attributes in ce- headers, data in body
  const event: CloudEvent = {
    specversion: "1.0",
    id: "",
    type: "",
    source: "",
  };

  for (const [key, value] of Object.entries(headers)) {
    if (key.toLowerCase().startsWith("ce-")) {
      const attr = key.slice(3).toLowerCase();
      event[attr] = decodeURIComponent(value);
    }
  }

  event.datacontenttype = contentType;

  if (contentType.includes("json")) {
    event.data = JSON.parse(
      typeof body === "string" ? body : body.toString("utf-8"),
    );
  } else {
    event.data_base64 = Buffer.from(body).toString("base64");
  }

  return event;
}

Common mistakes

MistakeFix
specversion: 1.0 (number)Must be the string "1.0", not a numeric 1.0
Putting data as a stringified JSON stringStore as native JSON value; use data_base64 only for actual binary
Sending both data and data_base64They are mutually exclusive — pick one
ce-datacontenttype header in binary modeContent-Type header carries this value; don't duplicate with ce- prefix
Extension names with uppercase or hyphensNames MUST be lowercase a-z and digits 0-9 only, no hyphens
type without reverse-DNS prefixUse com.example.entity.action pattern
Missing source or using empty stringMUST be a non-empty URI-reference
Omitting datacontenttype when data is not JSONOnly omit when data is JSON (it's the implied default)
Events exceeding 64 KB wire sizeLink to large payloads instead of embedding them
Nested events inside data without separate envelopeEach event is its own CloudEvent; use batching for multiple events

Quick reference

ConceptValue
Spec version string"1.0"
JSON structured media typeapplication/cloudevents+json
JSON batch media typeapplication/cloudevents-batch+json
HTTP header prefix (binary mode)ce-
Attribute name ruleslowercase a-z, digits 0-9, max 20 chars
Timestamp formatRFC 3339 (2024-01-15T09:30:00Z)
Max safe event size64 KB (wire size)
Default datacontenttype in JSONapplication/json (implicit)
source + id uniquenessMUST be unique per distinct event

See references/spec-quick-ref.md for the complete type system, Kafka/AMQP bindings, and extension attribute details.

Key principles

  1. Spec compliance is binary — An event either conforms to CloudEvents v1.0 or it doesn't. There is no "close enough." All four REQUIRED attributes must be present and correctly typed.
  2. Context attributes are for routing, not data — Attributes like type, source, and subject exist so intermediaries can route events without deserializing the payload. Never put sensitive or domain-specific data in context attributes.
  3. Content mode determines serialization — Binary and structured modes are not interchangeable format choices; they have different serialization rules, different Content-Type values, and different header requirements. Pick one and follow its rules exactly.
  4. Extensions are top-level, not nested — Extension attributes sit alongside core attributes (in JSON) or as ce- headers (in HTTP binary). They are never nested under an extensions key.
  5. Data format follows datacontenttype — The data member is a native JSON value when the content type is JSON-compatible, but a string when it's not. Binary data uses data_base64. These rules are not optional.

平台分布

Codex

35.21%
按下载量换算29

Claude

28.9%
按下载量换算24

Cursor

19.52%
按下载量换算16

Gemini CLI

9.74%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills