Kafka Perf Reviewのロゴ

Kafka Perf Review

組織
lensesio
kafka-perf-review

Lenses MCP経由の稼働中クラスターとコードベースの両方で、Kafkaのプロデューサーおよびコンシューマーのパフォーマンス設定を確認します。調整されていないデフォルト設定、アンチパターン、ベストプラクティスの不足を指摘します。ユーザーが「Kafkaのパフォーマンスを確認して」「プロデューサーの設定をチェックして」「Kafkaの設定を調整して」と言った場合や、スループット、バッチ処理、圧縮について尋ねた場合に使用してください。クラスターのサイジングや容量計画には使用しないでください。

概要

公開者lensesio
リポジトリagentic-engineering-for-apache-kafka
スキル名kafka-perf-review
スター
67
フォーク
19
同梱ファイル
3
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    lensesioがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Kafka Perf Review」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/lensesio/agentic-engineering-for-apache-kafka/tree/main/skills/kafka-perf-review
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lensesio/agentic-engineering-for-apache-kafka.git /tmp/agentic-engineering-for-apache-kafka
mkdir -p .claude/skills
cp -r /tmp/agentic-engineering-for-apache-kafka/skills/kafka-perf-review .claude/skills/kafka-perf-review
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでKafka Perf Reviewを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にKafka Perf Reviewを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Kafka Perf Reviewは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Kafka Performance Configuration Review

Reviews producer and consumer configurations in both the live cluster and the codebase for performance anti-patterns. These settings are the same across all Kafka client libraries (they're Kafka protocol properties).

Target environment and path: $ARGUMENTS (defaults to src/ for codebase scan if path not specified)

Workflow

Copy this checklist and track your progress:

Performance Review Progress:
- [ ] Step 1: Inspect live cluster configs
- [ ] Step 2: Scan codebase for producer/consumer configs
- [ ] Step 3: Audit producer configs
- [ ] Step 4: Audit consumer configs
- [ ] Step 5: Cross-reference cluster and code configs
- [ ] Step 6: Generate report
  1. Inspect live cluster configs via Lenses MCP
  2. Scan codebase for producer/consumer config properties (see references/producer-defaults.md and references/consumer-defaults.md)
  3. Audit producer configs against recommended values
  4. Audit consumer configs against recommended values
  5. Cross-reference cluster and code configs
  6. Report findings with current values, recommended values and trade-off explanations

Step 1: Live Cluster Inspection

Use Lenses MCP tools to check cluster-side performance configs:

  • get_topic - topic-level configs affecting performance (min.insync.replicas, compression.type, max.message.bytes)
  • get_topic_broker_configs - broker-level configs (message.max.bytes, replica.fetch.max.bytes, num.io.threads)
  • get_topic_partitions - message distribution across partitions (detect skew where one partition has significantly more bytes than others)
  • get_dataset_message_metrics - message throughput over time to identify bottlenecks or capacity headroom

Expected output: Topic-level performance configs, partition distribution and throughput metrics.

Validation: If MCP calls fail, proceed with codebase-only analysis and note the limitation in the report.

Step 2: Codebase Inspection

Search the codebase for Kafka producer and consumer configuration properties. Consult references/producer-defaults.md for the full list of producer properties and references/consumer-defaults.md for consumer properties.

Also search for anti-patterns listed in references/producer-defaults.md:

  • Synchronous produce calls (.get(), .result(), flush() after every send)
  • Missing delivery callbacks / error handlers
  • Missing graceful shutdown / rebalance listeners

Step 3: Audit Producer Configs

Compare found producer configs against the recommended values in references/producer-defaults.md. Key areas: acks, batch.size, linger.ms, compression.type, enable.idempotence and retries.

Step 4: Audit Consumer Configs

Compare found consumer configs against the recommended values in references/consumer-defaults.md. Key areas: max.poll.records, max.poll.interval.ms, auto.offset.reset, enable.auto.commit and fetch.min.bytes.

Success Criteria

Quantitative

  • Triggers on 90% of performance-related queries (test with 10-20 varied phrasings)
  • Completes review in under 15 tool calls (MCP + codebase search)
  • 0 failed MCP calls per run

Qualitative

  • Every finding shows current value, recommended value and trade-off explanation
  • Anti-patterns are identified with file and line references
  • Estimated throughput impact (low/medium/high) is consistently calibrated

Examples

Example 1: Routine performance review

User says: "Review Kafka performance configs for staging"

Actions:

  1. Inspect cluster-side configs for all topics in staging
  2. Scan src/ for producer/consumer property definitions
  3. Cross-reference code configs against reference tables Result: Report with per-property findings and throughput impact estimates

Example 2: Investigating slow consumers

User says: "Why are my consumers slow? Check the performance settings."

Actions:

  1. Focus on consumer config properties in the codebase
  2. Check max.poll.records, fetch.min.bytes and enable.auto.commit
  3. Look for anti-patterns like synchronous processing Result: Targeted report on consumer-side bottlenecks with remediation steps

Example 3: Scoped codebase review

User says: "Check Kafka configs in src/kafka/ for the production environment"

Actions:

  1. Scan only src/kafka/ for producer and consumer configs
  2. Cross-reference with live production cluster settings Result: Focused report on a specific directory's Kafka configurations

Troubleshooting

No Kafka config properties found in codebase

Cause: The codebase may use a framework or wrapper that hides raw Kafka properties. Solution: Search for framework-specific config patterns (e.g., Spring Boot application.yml, Django settings). Report the framework used and suggest manual review.

Lenses MCP returns no topic data

Cause: Environment name is incorrect or Lenses agent is offline. Solution: Run check_environment_health first. Verify the environment name matches what list_environments returns.

Partition skew detection is inconclusive

Cause: Topic has very low throughput so byte counts are similar across partitions. Solution: Note that skew detection requires meaningful throughput. For low-volume topics, skip the skew check and note it in the report.

Output Format

## Performance Review Report

### Cluster-Side Findings
- [topic-name] {property}: {current value}
  Recommendation: {recommended value} - {explanation}

### Codebase Findings (Producers)
- [file:line] {property} = {current value}
  Recommendation: {recommended value} - {explanation}

### Codebase Findings (Consumers)
- [file:line] {property} = {current value}
  Recommendation: {recommended value} - {explanation}

### Anti-Patterns
- [file:line] Description of the anti-pattern
  Recommendation: How to fix it

### Summary
- X producer issues found
- Y consumer issues found
- Z anti-patterns found
- Estimated throughput impact: low/medium/high

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Kafka Perf Review」では何ができますか?

Lenses MCP経由の稼働中クラスターとコードベースの両方で、Kafkaのプロデューサーおよびコンシューマーのパフォーマンス設定を確認します。調整されていないデフォルト設定、アンチパターン、ベストプラクティスの不足を指摘します。ユーザーが「Kafkaのパフォーマンスを確認して」「プロデューサーの設定をチェックして」「Kafkaの設定を調整して」と言った場合や、スループット、バッチ処理、圧縮について尋ねた場合に使用してください。クラスターのサイジングや容量計画には使用しないでください。

TypingMindでKafka Perf Reviewを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Kafka Perf Reviewはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにKafka Perf Reviewをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/lensesio/agentic-engineering-for-apache-kafka/tree/main/skills/kafka-perf-reviewを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Kafka Perf Reviewを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Kafka Perf Reviewで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもKafka Perf Reviewを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Kafka Perf Review」は無料ですか?

はい。lensesioがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇