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

aiven-kafka-setup-avnaiven Kafka 设置 AVN

Agent Skill

aiven-kafka-setup-avn 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

216

周安装

9

GitHub Stars

1

下载量

72
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/aiven-open/aiven-skills-bundle --skill aiven-kafka-setup-avn

简介

aiven-kafka-setup-avn 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于 Aiven Kafka 服务创建、SASL_SSL 认证配置和 Avro Schema Registry 集成等场景,可结合来源仓库和原始 README 核验具体用法。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和维护状态。
  • 安装前建议检查是否会触发联网、命令执行或文件读写操作,确保符合安全策略。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Aiven Kafka Setup (avn CLI)

End-to-end workflow for creating an Apache Kafka service on Aiven using the avn CLI, with SASL_SSL authentication, Avro Schema Registry, and a working Java or Python producer/consumer example that reads from CSV and writes to Kafka.

IMPORTANT: This skill ALWAYS creates a fully working example (Java by default). Steps 1–3 are all mandatory. Never stop after creating the service — you MUST also build the example project, generate test data, and run the producer + consumer end-to-end.

Step 1: Prerequisites

1.1 Verify avn CLI login

Run the following to check if the user is logged in:

avn user info

If the command fails, instruct the user:

You are not logged in to the Aiven CLI. Please run:

  avn user login <your-email>

Then confirm when you are logged in.

STOP and wait for the user to confirm login before proceeding.

1.2 Required tools

Verify the following are installed:

  • avn (Aiven CLI) - At least version 4.7.0 or later is required.
  • jq (JSON processing)
  • For Java: java (17+), mvn
  • For Python: python3 (3.9+), pip

Missing Requirements Policy:

  • If a library or CLI tool (like avn) is missing, advise the user on how to install it (e.g., python3 -m pip install aiven-client for avn). However, check first if python3 is available before suggesting a pip command.
  • If a core language runtime (python3 or java) is requested but missing, interrupt the flow immediately. Do NOT advise the user on how to install programming languages.

Step 2: Create the Kafka Service and Export Environment Variables

Follow SERVICE_CREATION_AVN.md sections 1–4 in order:

  1. Choose a region — ask the user with AskQuestion, mapping their choice to the EXACT CLOUD_NAME from the table in SERVICE_CREATION_AVN.md.
  2. Choose a plan — default startup-4; never use free-0 or startup-2.
  3. Run the setup script — a single command creates the service, users, ACLs, schema, extracts all connection details, and writes them to env.sh.
  4. Source env.sh — loads KAFKA_HOST, KAFKA_PORT, SCHEMA_REGISTRY_URL, AVNADMIN_PASS, PRODUCER_PASSWORD, CONSUMER_PASSWORD into the shell.
bash scripts/setup_aiven_kafka.sh <name> <CLOUD_NAME> <plan> 4.1
source env.sh
CRITICAL: Do NOT read or cat env.sh in the agent context — it contains passwords. Only source it and verify passwords by ${#VAR} (length).

Step 3: Create and Run the Working Example

MANDATORY: This step is NOT optional. After the Kafka service is running and environment variables are exported, you MUST create a working producer/consumer example, compile/install it, generate test data, and run it end-to-end. Default language is Java unless the user explicitly requests Python.

3.1 Ask the user which language to use

Use the AskQuestion tool:

Prompt: "Which language for the producer/consumer example?"
Options:
  - Java (default, recommended)
  - Python

If the user requests a language other than Java or Python, warn them:

"Results with languages other than Java or Python are unpredictable. It is recommended to use Java or Python for reliable results."

If the user does not answer or skips, default to Java.

3.2 Copy templates into the workspace

The templates live under this skill's templates/ directory. They MUST be copied to the workspace root so the run scripts can find them at the expected relative paths.

# Copy from the skill directory into the workspace root
cp -r <SKILL_DIR>/templates/ <WORKSPACE_ROOT>/templates/
cp -r <SKILL_DIR>/scripts/  <WORKSPACE_ROOT>/scripts/

After copying, verify the files exist:

ls templates/order.avsc
ls templates/producer_consumer_java/Producer.java   # if Java
ls templates/producer_consumer_python/producer.py    # if Python
ls scripts/run_producer.sh scripts/run_consumer.sh

3.3 Generate test data

Run the data generator (no external dependencies):

python3 scripts/generate_orders.py

This creates orders.csv with 20 rows in the format id,user_id,product,price. Verify it was created:

wc -l orders.csv   # should show 21 (1 header + 20 data rows)

3.4 Build the project

Java (default)

Set up the Maven source tree and compile:

JAVA_DIR="templates/producer_consumer_java"
mkdir -p "$JAVA_DIR/src/main/java/com/aiven/demo"
cp "$JAVA_DIR/Producer.java" "$JAVA_DIR/src/main/java/com/aiven/demo/"
cp "$JAVA_DIR/Consumer.java" "$JAVA_DIR/src/main/java/com/aiven/demo/"
cp "$JAVA_DIR/Order.java"    "$JAVA_DIR/src/main/java/com/aiven/demo/"
mvn -f "$JAVA_DIR/pom.xml" package -DskipTests

Verify the JAR was created:

ls "$JAVA_DIR/target/kafka-orders-demo-1.0-SNAPSHOT.jar"

If compilation fails, check that java (17+) and mvn are installed.

Python (if selected)

Install dependencies:

python3 -m pip install -r templates/producer_consumer_python/requirements.txt

Verify the install succeeded:

python3 -c "import confluent_kafka; print(confluent_kafka.version())"

3.5 Run the producer (start FIRST)

The producer MUST run first to publish messages into Kafka. The consumer reads them afterwards (the consumer uses auto.offset.reset=earliest, so it will pick up all messages from the beginning of the topic regardless of when it starts).

bash scripts/run_producer.sh <java|python>

Wait for the producer to finish (it will print "Done. Produced 20 messages.").

3.6 Run the consumer

After the producer has finished, start the consumer to read and process the messages:

bash scripts/run_consumer.sh <java|python>

The consumer will read all 20 messages (starting from the earliest offset), write them to orders_completed.csv, and then exit (both Java and Python exit automatically after consuming the expected 20 records).

3.7 Verify output

python3 scripts/verify_output.py

This checks that orders_completed.csv has 20 rows with correct columns and all completed_at timestamps populated.

If verification fails, check:

  • The producer finished successfully before the consumer was started
  • Environment variables (KAFKA_HOST, KAFKA_PORT, etc.) are all set
  • The cert/ca.pem file exists
  • For Java: the JAR exists in templates/producer_consumer_java/target/
  • For Python: confluent_kafka is installed

Step 4: Teardown Information

DO NOT run teardown automatically. Instead, inform the user how to clean up when they are ready:

When you're done with the demo, you can tear down the service by running: ``bash bash scripts/teardown.sh "$KAFKA_SERVICE" ` This will delete the Aiven Kafka service, remove the local cert/` directory, and clean up generated CSV files.

For detailed avn CLI command reference and troubleshooting, see reference.md.


File Reference

FilePurpose
SERVICE_CREATION_AVN.mdRegion/plan selection (interactive), then delegates to setup script
reference.mdavn CLI cheat sheet, region map, troubleshooting
templates/order.avscAvro schema for orders topic
templates/producer_consumer_java/Java Producer + Consumer + pom.xml
templates/producer_consumer_python/Python producer + consumer + requirements.txt
scripts/generate_orders.pyGenerate orders.csv (20 rows)
scripts/setup_aiven_kafka.shFull setup: service, users, ACLs, schema, env.sh
scripts/run_producer.shRun producer (Java or Python)
scripts/run_consumer.shRun consumer (Java or Python)
scripts/verify_output.pyValidate orders_completed.csv
scripts/teardown.shDelete service and clean up

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

38.07%
按下载量换算27

Claude

29.77%
按下载量换算21

Cursor

18.41%
按下载量换算13

Gemini CLI

10.24%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills