{"id":"b72811dd-10af-4dc7-abe2-15886bc05cbf","shortId":"WeNqPr","kind":"skill","title":"kafka-perf-review","tagline":"Review Kafka producer and consumer performance configurations in both the live cluster (via Lenses MCP) and the codebase. Flags un-tuned defaults, anti-patterns and missing best practices. Use when user says \"review Kafka performance\", \"check producer configs\", \"tune Kafka settin","description":"# Kafka Performance Configuration Review\n\nReviews 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).\n\nTarget environment and path: $ARGUMENTS (defaults to `src/` for codebase scan if path not specified)\n\n## Workflow\n\nCopy this checklist and track your progress:\n\n```\nPerformance Review Progress:\n- [ ] Step 1: Inspect live cluster configs\n- [ ] Step 2: Scan codebase for producer/consumer configs\n- [ ] Step 3: Audit producer configs\n- [ ] Step 4: Audit consumer configs\n- [ ] Step 5: Cross-reference cluster and code configs\n- [ ] Step 6: Generate report\n```\n\n1. **Inspect live cluster configs** via Lenses MCP\n2. **Scan codebase** for producer/consumer config properties (see `references/producer-defaults.md` and `references/consumer-defaults.md`)\n3. **Audit producer configs** against recommended values\n4. **Audit consumer configs** against recommended values\n5. **Cross-reference** cluster and code configs\n6. **Report findings** with current values, recommended values and trade-off explanations\n\n## Step 1: Live Cluster Inspection\n\nUse Lenses MCP tools to check cluster-side performance configs:\n\n- `get_topic` - topic-level configs affecting performance (`min.insync.replicas`, `compression.type`, `max.message.bytes`)\n- `get_topic_broker_configs` - broker-level configs (`message.max.bytes`, `replica.fetch.max.bytes`, `num.io.threads`)\n- `get_topic_partitions` - message distribution across partitions (detect skew where one partition has significantly more bytes than others)\n- `get_dataset_message_metrics` - message throughput over time to identify bottlenecks or capacity headroom\n\nExpected output: Topic-level performance configs, partition distribution and throughput metrics.\n\n**Validation**: If MCP calls fail, proceed with codebase-only analysis and note the limitation in the report.\n\n## Step 2: Codebase Inspection\n\nSearch 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.\n\nAlso search for anti-patterns listed in `references/producer-defaults.md`:\n- Synchronous produce calls (`.get()`, `.result()`, `flush()` after every send)\n- Missing delivery callbacks / error handlers\n- Missing graceful shutdown / rebalance listeners\n\n## Step 3: Audit Producer Configs\n\nCompare 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`.\n\n## Step 4: Audit Consumer Configs\n\nCompare 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`.\n\n## Success Criteria\n\n### Quantitative\n- Triggers on 90% of performance-related queries (test with 10-20 varied phrasings)\n- Completes review in under 15 tool calls (MCP + codebase search)\n- 0 failed MCP calls per run\n\n### Qualitative\n- Every finding shows current value, recommended value and trade-off explanation\n- Anti-patterns are identified with file and line references\n- Estimated throughput impact (low/medium/high) is consistently calibrated\n\n## Examples\n\n### Example 1: Routine performance review\n\nUser says: \"Review Kafka performance configs for staging\"\n\nActions:\n1. Inspect cluster-side configs for all topics in staging\n2. Scan `src/` for producer/consumer property definitions\n3. Cross-reference code configs against reference tables\nResult: Report with per-property findings and throughput impact estimates\n\n### Example 2: Investigating slow consumers\n\nUser says: \"Why are my consumers slow? Check the performance settings.\"\n\nActions:\n1. Focus on consumer config properties in the codebase\n2. Check `max.poll.records`, `fetch.min.bytes` and `enable.auto.commit`\n3. Look for anti-patterns like synchronous processing\nResult: Targeted report on consumer-side bottlenecks with remediation steps\n\n### Example 3: Scoped codebase review\n\nUser says: \"Check Kafka configs in src/kafka/ for the production environment\"\n\nActions:\n1. Scan only `src/kafka/` for producer and consumer configs\n2. Cross-reference with live production cluster settings\nResult: Focused report on a specific directory's Kafka configurations\n\n## Troubleshooting\n\n### No Kafka config properties found in codebase\nCause: The codebase may use a framework or wrapper that hides raw Kafka properties.\nSolution: Search for framework-specific config patterns (e.g., Spring Boot `application.yml`, Django settings). Report the framework used and suggest manual review.\n\n### Lenses MCP returns no topic data\nCause: Environment name is incorrect or Lenses agent is offline.\nSolution: Run `check_environment_health` first. Verify the environment name matches what `list_environments` returns.\n\n### Partition skew detection is inconclusive\nCause: Topic has very low throughput so byte counts are similar across partitions.\nSolution: Note that skew detection requires meaningful throughput. For low-volume topics, skip the skew check and note it in the report.\n\n## Output Format\n\n```\n## Performance Review Report\n\n### Cluster-Side Findings\n- [topic-name] {property}: {current value}\n  Recommendation: {recommended value} - {explanation}\n\n### Codebase Findings (Producers)\n- [file:line] {property} = {current value}\n  Recommendation: {recommended value} - {explanation}\n\n### Codebase Findings (Consumers)\n- [file:line] {property} = {current value}\n  Recommendation: {recommended value} - {explanation}\n\n### Anti-Patterns\n- [file:line] Description of the anti-pattern\n  Recommendation: How to fix it\n\n### Summary\n- X producer issues found\n- Y consumer issues found\n- Z anti-patterns found\n- Estimated throughput impact: low/medium/high\n```","tags":["kafka","perf","review","agentic","engineering","for","apache","lensesio","agent-skills","agentic-engineering","apache-kafka","claude-code"],"capabilities":["skill","source-lensesio","skill-kafka-perf-review","topic-agent-skills","topic-agentic-engineering","topic-apache-kafka","topic-claude-code","topic-context-engineering","topic-cursor","topic-data-engineering","topic-devops","topic-kafka","topic-kafka-connect","topic-lenses","topic-mcp"],"categories":["agentic-engineering-for-apache-kafka"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/lensesio/agentic-engineering-for-apache-kafka/kafka-perf-review","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add lensesio/agentic-engineering-for-apache-kafka","source_repo":"https://github.com/lensesio/agentic-engineering-for-apache-kafka","install_from":"skills.sh"}},"qualityScore":"0.463","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 26 github stars · SKILL.md body (5,972 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:05:00.709Z","embedding":null,"createdAt":"2026-05-15T19:05:07.000Z","updatedAt":"2026-05-18T19:05:00.709Z","lastSeenAt":"2026-05-18T19:05:00.709Z","tsv":"'-20':418 '0':431 '1':112,147,202,469,482,537,589 '10':417 '15':425 '2':118,155,302,493,521,546,598 '3':125,166,358,500,552,573 '4':130,173,382 '5':135,180 '6':144,188 '90':409 'ack':374 'across':75,244,708 'action':481,536,588 'affect':223 'agent':674 'also':329 'analysi':293 'anti':29,68,333,451,556,777,785,803 'anti-pattern':28,67,332,450,555,776,784,802 'application.yml':650 'area':373,397 'argument':89 'audit':126,131,167,174,359,383 'auto.offset.reset':400 'batch.size':375 'best':33 'boot':649 'bottleneck':267,568 'broker':230,233 'broker-level':232 'byte':254,704 'calibr':466 'call':286,340,427,434 'callback':349 'capac':269 'caus':625,667,697 'check':42,211,532,547,579,679,726 'checklist':103 'client':78 'cluster':16,61,115,139,150,184,204,213,485,605,739 'cluster-sid':212,484,738 'code':141,186,504 'codebas':22,64,94,120,157,291,303,307,429,545,575,624,627,752,764 'codebase-on':290 'compar':362,386 'complet':421 'compression.type':226,377 'config':44,116,123,128,133,142,151,160,169,176,187,216,222,231,235,277,361,365,385,389,478,487,505,541,581,597,620,645 'configur':11,50,56,313,616 'consist':465 'consult':315 'consum':9,55,132,175,312,327,384,388,524,530,540,566,596,766,798 'consumer-sid':565 'copi':101 'count':705 'criteria':405 'cross':137,182,502,600 'cross-refer':136,181,501,599 'current':192,441,746,758,770 'data':666 'dataset':258 'default':27,90 'definit':499 'deliveri':348 'descript':781 'detect':246,694,714 'directori':613 'distribut':243,279 'django':651 'e.g':647 'enable.auto.commit':401,551 'enable.idempotence':378 'environ':86,587,668,680,685,690 'error':350 'estim':460,519,806 'everi':345,438 'exampl':467,468,520,572 'expect':271 'explan':200,449,751,763,775 'fail':287,432 'fetch.min.bytes':403,549 'file':456,755,767,779 'find':190,439,515,741,753,765 'first':682 'fix':790 'flag':23 'flush':343 'focus':538,608 'format':734 'found':363,387,622,796,800,805 'framework':631,643,655 'framework-specif':642 'full':319 'generat':145 'get':217,228,239,257,341 'grace':353 'handler':351 'headroom':270 'health':681 'hide':635 'identifi':266,454 'impact':462,518,808 'inconclus':696 'incorrect':671 'inspect':113,148,205,304,483 'investig':522 'issu':795,799 'kafka':2,6,40,46,48,77,82,309,476,580,615,619,637 'kafka-perf-review':1 'key':372,396 'lens':18,153,207,661,673 'level':221,234,275 'librari':79 'like':558 'limit':297 'line':458,756,768,780 'linger.ms':376 'list':320,335,689 'listen':356 'live':15,60,114,149,203,603 'look':553 'low':701,720 'low-volum':719 'low/medium/high':463,809 'manual':659 'match':687 'max.message.bytes':227 'max.poll.interval.ms':399 'max.poll.records':398,548 'may':628 'mcp':19,154,208,285,428,433,662 'meaning':716 'messag':242,259,261 'message.max.bytes':236 'metric':260,282 'min.insync.replicas':225 'miss':32,347,352 'name':669,686,744 'note':295,711,728 'num.io.threads':238 'offlin':676 'one':249 'other':256 'output':272,733 'partit':241,245,250,278,692,709 'path':88,97 'pattern':30,69,334,452,557,646,778,786,804 'per':435,513 'per-properti':512 'perf':3 'perform':10,41,49,66,108,215,224,276,412,471,477,534,735 'performance-rel':411 'phrase':420 'practic':34 'proceed':288 'process':560 'produc':7,43,53,127,168,310,322,339,360,364,594,754,794 'producer/consumer':122,159,497 'product':586,604 'progress':107,110 'properti':84,161,314,323,328,498,514,542,621,638,745,757,769 'protocol':83 'qualit':437 'quantit':406 'queri':414 'raw':636 're':81 'rebal':355 'recommend':171,178,194,368,392,443,748,749,760,761,772,773,787 'refer':138,183,459,503,507,601 'references/consumer-defaults.md':165,325,395 'references/producer-defaults.md':163,316,337,371 'relat':413 'remedi':570 'replica.fetch.max.bytes':237 'report':146,189,300,510,563,609,653,732,737 'requir':715 'result':342,509,561,607 'retri':380 'return':663,691 'review':4,5,39,51,52,109,422,472,475,576,660,736 'routin':470 'run':436,678 'say':38,474,526,578 'scan':95,119,156,494,590 'scope':574 'search':305,330,430,640 'see':162 'send':346 'set':71,535,606,652 'settin':47 'show':440 'shutdown':354 'side':214,486,567,740 'signific':252 'similar':707 'skew':247,693,713,725 'skill' 'skill-kafka-perf-review' 'skip':723 'slow':523,531 'solut':639,677,710 'source-lensesio' 'specif':612,644 'specifi':99 'spring':648 'src':92,495 'src/kafka':583,592 'stage':480,492 'step':111,117,124,129,134,143,201,301,357,381,571 'success':404 'suggest':658 'summari':792 'synchron':338,559 'tabl':508 'target':85,562 'test':415 'throughput':262,281,461,517,702,717,807 'time':264 'tool':209,426 'topic':218,220,229,240,274,490,665,698,722,743 'topic-agent-skills' 'topic-agentic-engineering' 'topic-apache-kafka' 'topic-claude-code' 'topic-context-engineering' 'topic-cursor' 'topic-data-engineering' 'topic-devops' 'topic-kafka' 'topic-kafka-connect' 'topic-lenses' 'topic-level':219,273 'topic-mcp' 'topic-nam':742 'track':105 'trade':198,447 'trade-off':197,446 'trigger':407 'troubleshoot':617 'tune':26,45 'un':25 'un-tun':24 'use':35,206,629,656 'user':37,473,525,577 'valid':283 'valu':172,179,193,195,369,393,442,444,747,750,759,762,771,774 'vari':419 'verifi':683 'via':17,152 'volum':721 'workflow':100 'wrapper':633 'x':793 'y':797 'z':801","prices":[{"id":"42560b8e-5400-43e5-854f-0c9d86ff4167","listingId":"b72811dd-10af-4dc7-abe2-15886bc05cbf","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"lensesio","category":"agentic-engineering-for-apache-kafka","install_from":"skills.sh"},"createdAt":"2026-05-15T19:05:07.000Z"}],"sources":[{"listingId":"b72811dd-10af-4dc7-abe2-15886bc05cbf","source":"github","sourceId":"lensesio/agentic-engineering-for-apache-kafka/kafka-perf-review","sourceUrl":"https://github.com/lensesio/agentic-engineering-for-apache-kafka/tree/main/skills/kafka-perf-review","isPrimary":false,"firstSeenAt":"2026-05-15T19:05:07.000Z","lastSeenAt":"2026-05-18T19:05:00.709Z"}],"details":{"listingId":"b72811dd-10af-4dc7-abe2-15886bc05cbf","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"lensesio","slug":"kafka-perf-review","github":{"repo":"lensesio/agentic-engineering-for-apache-kafka","stars":26,"topics":["agent-skills","agentic-engineering","apache-kafka","claude-code","context-engineering","cursor","data-engineering","devops","kafka","kafka-connect","lenses","mcp","model-context-protocol","platform-engineering","real-time-data","schema-registry","skills","streaming","streaming-data"],"license":"mit","html_url":"https://github.com/lensesio/agentic-engineering-for-apache-kafka","pushed_at":"2026-05-15T11:34:19Z","description":"AI agent skills for building, operating and troubleshooting Apache Kafka applications. Topic audit, consumer lag, schema review, security, connectors and DLQ","skill_md_sha":"c8e1e984be14c33c35a572304f4cf1b971a24b23","skill_md_path":"skills/kafka-perf-review/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/lensesio/agentic-engineering-for-apache-kafka/tree/main/skills/kafka-perf-review"},"layout":"multi","source":"github","category":"agentic-engineering-for-apache-kafka","frontmatter":{"name":"kafka-perf-review","license":"MIT","description":"Review Kafka producer and consumer performance configurations in both the live cluster (via Lenses MCP) and the codebase. Flags un-tuned defaults, anti-patterns and missing best practices. Use when user says \"review Kafka performance\", \"check producer configs\", \"tune Kafka settings\" or asks about throughput, batching or compression. Do NOT use for cluster sizing or capacity planning.","compatibility":"Recommended - the Lenses MCP server (lenses-mcp) connected and configured with a valid environment. Any Kafka MCP that exposes an equivalent tool surface (list_topics, list_consumer_groups, etc.) will also work; without an MCP server, the skill falls back to codebase-only inspection and skips live-cluster checks."},"skills_sh_url":"https://skills.sh/lensesio/agentic-engineering-for-apache-kafka/kafka-perf-review"},"updatedAt":"2026-05-18T19:05:00.709Z"}}