Help us improve
Share bugs, ideas, or general feedback.
From kafka-skills
Audits Kafka topic configurations against production best practices using the Lenses MCP server. Checks replication factor, retention, partitions, compaction, naming conventions, orphaned topics, and missing metadata.
npx claudepluginhub lensesio/agentic-engineering-for-apache-kafka --plugin kafka-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/kafka-skills:kafka-topic-audit [required: environment name][required: environment name]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Audits all topic configurations against production best practices. Misconfigured topics are the #1 cause of Kafka data loss - engineers create topics and forget to tune them.
Reviews Kafka producer and consumer performance configurations in the live cluster (via Lenses MCP) and the codebase. Flags un-tuned defaults, anti-patterns, and missing best practices.
Scan a project to identify Kafka applications, extract schemas from data models, tag PII fields, generate Terraform for Confluent Schema Registry registration, and produce a migration report with rollout ordering. Use this skill when a user asks to analyze a folder or repo for Kafka usage, extract schemas, audit producer/consumer configurations, or generate Terraform for Schema Registry.
Guides Kafka topic design (partitions, replication), KafkaJS idempotent producers/consumers, consumer lag monitoring, exactly-once semantics, schema registry, compacted topics, and DLQ patterns. Use for reliable streaming implementations.
Share bugs, ideas, or general feedback.
Audits all topic configurations against production best practices. Misconfigured topics are the #1 cause of Kafka data loss - engineers create topics and forget to tune them.
Target environment: $ARGUMENTS
Copy this checklist and track your progress:
Audit Progress:
- [ ] Step 1: Check environment health
- [ ] Step 2: Fetch all topics
- [ ] Step 3: Audit configurations against best practices
- [ ] Step 4: Check metadata completeness
- [ ] Step 5: Detect orphaned topics
- [ ] Step 6: Run consistency checks
- [ ] Step 7: Generate report
references/audit-rules.md)Use the Lenses MCP check_environment_health tool to get a quick summary:
Expected output: Environment health summary with broker, topic and consumer counts.
Validation: If the environment is unhealthy or unreachable, stop and report the connection issue before proceeding.
Use the Lenses MCP list_topics tool to retrieve all topics with their configurations in one call.
For topics that need deeper inspection, use:
get_topic for detailed config including partitions and consumersget_topic_broker_configs for broker-level config overridesget_topic_partitions for partition-level message counts and bytesExpected output: Full list of topics with their configurations. If zero topics are returned, report this and stop.
For each topic, check against the thresholds in references/audit-rules.md:
{domain}.{entity}.{event} patternUse the Lenses MCP list_topic_metadata tool to check:
Use list_datasets with filters (is_compacted, has_records) to find anomalies.
For each topic, use list_consumer_groups_by_topic to check for active consumers.
User says: "Run a topic audit on the staging environment"
Actions:
references/audit-rules.mdUser says: "Check if my topic configs are production-ready"
Actions:
User says: "Is the orders.payment.completed topic configured correctly?"
Actions:
get_topicget_topic_broker_configsCause: Environment name is incorrect or Lenses agent is offline.
Solution: Run check_environment_health first. Verify the environment name matches what list_environments returns.
Cause: Environment exists but has no topics or permissions are restricted. Solution: Confirm the cluster has topics via the Lenses UI. Check that the Lenses agent has read access.
Cause: Schema Registry is not configured or topics have no registered schemas. Solution: This is a valid finding - report it as missing metadata rather than treating it as an error.
## Topic Audit Report
### Environment: {name}
- Brokers: X | Topics: Y | Consumer groups: Z
### Critical (must fix)
- [topic-name] Description of the issue
Current: {current value} | Recommended: {recommended value}
### Warning (should fix)
- [topic-name] Description of the issue
Current: {current value} | Recommended: {recommended value}
### Suggestion (consider improving)
- [topic-name] Description of the issue
Recommendation: How to fix it
### Summary
- X critical issues found
- Y warnings found
- Z suggestions found
- Topics audited: N
- Orphaned topics: M