[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DRHZ4GZ2PC2RSCJEJSX5JZ":3,"skill-same:01M6DRHZ4GZ2PC2RSCJEJSX5JZ":115},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":6,"ownerHtmlUrl":67,"ownerBlogUrl":68,"ownerDescription":69,"updatedAt":70,"install":71,"resources":84},"01M6DRHZ4GZ2PC2RSCJEJSX5JZ","confluent-cloud-flink-sql",null,"Write and debug Flink SQL that runs on Confluent Cloud, enforcing the CC-vs-Apache-Flink (OSS) dialect boundary. Use when the working directory is a Confluent Cloud Flink workspace, when a Flink SQL statement needs checking before it runs on a CC compute pool, or when the user mentions CC Flink, Confluent Cloud Flink SQL, the `confluent flink` CLI, a CFU compute pool, `CREATE CONNECTION`, or asks to check or debug Flink SQL whose runtime is Confluent Cloud. Also trigger when a Flink SQL question is posed and nothing establishes an Apache Flink OSS runtime. Do NOT trigger for: building or deploying Flink UDFs in Java (UDF\u002FUDTF\u002FPTF — use flink-udf); a full CDC pipeline from a database through Flink into Tableflow\u002FIceberg\u002FDelta Lake (use confluent-cloud-cdc-tableflow); Kafka Streams topology work (use kafka-streams-programming); or Flink SQL confirmed to run on Apache Flink OSS, not Confluent Cloud.","confluentinc\u002Fagent-skills","confluentinc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9439498?v=4","01M6DRHHXAPZ51S955GTK4NG5H","Confluent Inc.","01M6DRHJ1QGVS341XSPAW6G0QF",64,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfluent-cloud-flink-sql\u002FSKILL.md",[18,23,28],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":29,"categoryName":30,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000033","数据分析师",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"flink","confluent cloud flink sql","cloud","sql","cli","create","active","only","write","question","work","credentials","pipeline","directory","cdc","iceberg","delta lake","apache","database","run","2026-11-10 10:12:30",false,"---\nname: confluent-cloud-flink-sql\ndescription: \"Write and debug Flink SQL that runs on Confluent Cloud, enforcing the CC-vs-Apache-Flink (OSS) dialect boundary. Use when the working directory is a Confluent Cloud Flink workspace, when a Flink SQL statement needs checking before it runs on a CC compute pool, or when the user mentions CC Flink, Confluent Cloud Flink SQL, the `confluent flink` CLI, a CFU compute pool, `CREATE CONNECTION`, or asks to check or debug Flink SQL whose runtime is Confluent Cloud. Also trigger when a Flink SQL question is posed and nothing establishes an Apache Flink OSS runtime. Do NOT trigger for: building or deploying Flink UDFs in Java (UDF\u002FUDTF\u002FPTF — use flink-udf); a full CDC pipeline from a database through Flink into Tableflow\u002FIceberg\u002FDelta Lake (use confluent-cloud-cdc-tableflow); Kafka Streams topology work (use kafka-streams-programming); or Flink SQL confirmed to run on Apache Flink OSS, not Confluent Cloud.\"\ncompatibility: Requires the `confluent` CLI (authenticated session) and an active Confluent Cloud compute pool — statement runs consume CFUs. Terraform is optional, needed only if managing `CREATE CONNECTION` credentials via the Confluent Terraform provider.\nmetadata:\n  author: confluent\n  version: \"1.1.0\"\n  last_updated: \"2026-09-18\"\n---\n\n# Confluent Cloud Flink SQL\n\nEnforce the CC-Flink-vs-OSS-Flink dialect boundary and the CLI-driven verification loop for any Confluent Cloud Flink SQL work. Apache Flink OSS training data is a trap — CC rejects or silently mishandles a long list of otherwise-valid Flink SQL constructs.\n\nScope note: this skill's reference material is built around the OSS-vs-CC dialect boundary — traps in constructs that exist in both dialects but behave differently. It does not yet catalog CC-only DDL that has no OSS counterpart (e.g. `CREATE MATERIALIZED TABLE`, `CREATE MODEL`\u002F`AI_COMPLETE`, `CREATE AGENT`, `USE CATALOG`). For those, verify directly against the [CC Flink SQL reference](https:\u002F\u002Fdocs.confluent.io\u002Fcloud\u002Fcurrent\u002Fflink\u002Freference\u002Foverview.md) rather than expecting a trap entry here.\n\n## Non-negotiables\n\n1. **CC Flink ≠ Apache Flink.** Verify every API, SQL construct, and runtime behavior against:\n   - [Confluent Cloud Flink docs](https:\u002F\u002Fdocs.confluent.io\u002Fcloud\u002Fcurrent\u002Fflink\u002Foverview.md)\n   - [CC Flink SQL reference](https:\u002F\u002Fdocs.confluent.io\u002Fcloud\u002Fcurrent\u002Fflink\u002Freference\u002Foverview.md)\n   - [Confluent Terraform provider](https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fconfluentinc\u002Fconfluent\u002Flatest\u002Fdocs)\n   - Live `confluent flink shell` against the user's compute pool\n2. **No mocks in verification.** Integration claims require real `confluent` CLI runs. Unit tests may mock; anything calling itself \"end-to-end verification\" may not.\n3. **Record decisions somewhere durable.** Ask the user where they want dialect traps and verification notes tracked (e.g. `docs\u002Fflink-dialect-traps.md` in their project) before writing any new file — don't assume a `docs\u002F` layout.\n4. **Secrets never in repo.** `CREATE CONNECTION` parameters are Terraform-injected, never hardcoded. Gitignore `.tfvars`, `.tfstate*`, `*.secret*` from day one.\n5. **EXPLAIN before CREATE.** Always `EXPLAIN` a query before `statement create` — catches parse\u002Ftype errors without consuming CFUs.\n6. **Don't invent identifiers.** Use `\u003Cplaceholder>` for any topic, table, statement, or resource name you haven't verified.\n\n## Stream Processing Workflow\n\nWhen a user asks to build, modify, or troubleshoot a Flink SQL streaming solution, first understand the streaming problem and identify the required data and processing semantics before generating SQL.\n\nUse this workflow:\n\n1. Understand the requirement\n2. Discover existing Confluent resources\n3. Establish the required streaming semantics (when needed)\n4. Propose the processing design (when needed)\n5. Confirm the design before modifying resources\n6. Generate and validate Flink SQL\n7. Execute the statement when explicitly approved\n8. Observe and verify the result\n\nDo not ask clarifying questions if a request is complete (i.e., all required information, context, and parameters are provided or retrievable via available MCP tools). Skip directly to implementation and validation. \n\nOnly ask questions when critical information is missing and cannot be resolved through existing context or tools.\n\n### 1. Understand the Requirement\n\nBefore generating Flink SQL, determine what the user is trying to accomplish.\n\nEstablish, when relevant:\n\n- What streaming problem is being solved?\n- What data\u002Fevents should be processed?\n- What are the input sources?\n- What should the output represent?\n- Where should the output go?\n- What business conditions determine which records are processed?\n- What are the required time semantics?\n- What should happen with duplicates, late events, or invalid data?\n- Are there important assumptions that could change the result?\n\nAsk only questions that materially affect the pipeline design.\n\nDo not ask for information that is already available in the conversation.\n\n### 2. Discover Existing Confluent Resources\n\nWhen MCP tools are available, prefer inspecting existing Confluent resources over asking the user for information that can be discovered.\n\nFor referenced input resources:\n\n1. Find the relevant topic\u002Ftable.\n2. Inspect its schema.\n3. Inspect representative records when necessary.\n4. Identify relevant keys and timestamp fields.\n5. Confirm the fields required by the proposed transformation.\n6. Identify the target resource if it already exists.\n\nDo not invent topic names, table names, column names, schemas, or timestamp fields.\n\nIf multiple resources could match the request, present the candidates and ask the user to select one.\n\n### 3. Establish Streaming Semantics (when needed)\n\nBefore generating SQL, determine the semantics that materially affect the result. Skip this step if all relevant semantics are already established from the user's prompt or the discovery step.\n\nExamples include:\n\n- Event time vs processing time\n- Window duration and behavior\n- Grouping keys\n- Join keys and temporal semantics\n- Deduplication key and ordering\n- Late-event handling\n- Output granularity\n- Whether the result represents individual events, aggregates, alerts, or another derived stream\n\n### 4. Propose the Processing Design (when needed)\n\nFor non-trivial requests, summarize the proposed design before generating executable SQL. For simple, fully specified requests, this can be reduced to a brief summary or skipped entirely.\n\nUse:\n\n**Input**\n- Relevant topic\u002Ftable(s)\n- Relevant fields\n\n**Processing**\n- Main transformations\n- Joins\u002Fenrichment\n- Aggregation\u002Fwindowing\n- Other required operations\n\n**Output**\n- Target topic\u002Ftable\n- Output semantics\n\n**Assumptions**\n- Material assumptions that have not been explicitly specified\n\nAsk the user to confirm or correct the design before creating or modifying resources.\n\n### 5. Plan Before Execute\n\nBefore creating, modifying, or deleting a Confluent resource, present the execution plan.\n\nThe plan should identify:\n\n1. Resources that will be inspected.\n2. SQL that will be validated.\n3. Statements\u002Fresources that will be created or modified.\n4. MCP tools or CLI commands that will be used.\n5. How the resulting pipeline will be verified.\n\nWait for explicit user confirmation before performing resource-modifying operations.\n\nRead-only discovery and inspection may be performed before confirmation.\n\n### 6. Generate and Validate Flink SQL\n\nAfter the design is confirmed, generate and validate the SQL:\n\n1. Generate the Flink SQL.\n2. Validate it against the Confluent Cloud Flink SQL dialect.\n3. Use `EXPLAIN` where appropriate to catch parse\u002Ftype errors without consuming CFUs.\n4. Follow the existing resource-modification and safety guidance.\n\nUse the existing dialect, SQL pattern, CLI, and troubleshooting references for implementation details.\n\n### 7. Execute the Statement\n\nCreate or modify the Flink statement only after receiving explicit user confirmation:\n\n1. Create the statement using the CLI or MCP tools.\n2. Wait for the statement to reach RUNNING state.\n3. Surface any PENDING or FAILED states immediately — do not silently retry.\n\n### 8. Observe and Verify the Result\n\nAfter the statement is running:\n\n1. Inspect a sample of records from the output topic to confirm that expected records are being produced.\n2. Monitor statement status and exceptions.\n3. If the output is unexpected, inspect the input data and statement configuration before making changes.\n\n### Requirements Gathering Guardrails\n\nRequirements gathering must be adaptive rather than a fixed questionnaire.\n\n- Do not ask for information already provided.\n- Do not ask for information that can be reliably discovered through available MCP tools.\n- Do not ask every possible question before performing useful read-only discovery.\n- Ask follow-up questions only when missing information materially affects correctness or semantics.\n- Prefer a clearly stated, low-risk assumption over unnecessary questioning.\n- When an assumption could materially change the result, ask the user to confirm it.\n\n## Reference files\n\nLoad these on demand when the topic matches — do not read them all upfront:\n\n| File | When to load |\n|------|-------------|\n| [references\u002Fdialect-traps.md](references\u002Fdialect-traps.md) | Before writing ANY Flink SQL — 22 CC-vs-OSS traps, single source of truth |\n| [references\u002Fcli-reference.md](references\u002Fcli-reference.md) | Before running `confluent` CLI — flag schemas, carry-over recipe, timing, token expiry |\n| [references\u002Fsql-patterns-cc.md](references\u002Fsql-patterns-cc.md) | When writing SQL — CC-validated patterns: windows, joins, dedup, MATCH_RECOGNIZE, JSON, External Tables |\n| [references\u002Fformats-and-serialization.md](references\u002Fformats-and-serialization.md) | When configuring table formats — 7 supported formats, id-encoding, consume flags |\n| [references\u002Ftroubleshooting-cc.md](references\u002Ftroubleshooting-cc.md) | When debugging errors — CC-specific error to cause to fix |\n| [references\u002Freserved-words.md](references\u002Freserved-words.md) | When hitting parse errors — must-backquote identifiers |\n\n## Red flags\n\nStop and consult `references\u002Fdialect-traps.md` if you catch yourself writing any of these:\n\n- DataStream API (Java\u002FScala) — not supported on CC. Table API + PTF are GA in Java; Python Table API is Open Preview with no PTF yet\n- `CREATE CATALOG ...` — catalog = CC environment, not creatable\n- `SET 'execution.checkpointing.*'` — CC-managed, not settable\n- `CREATE TABLE ... WITH ('connector' = 'kafka', ...)` — tables auto-map from topics\n- `'value.format' = 'json'` — must be `'json-registry'` (or another SR-backed format)\n- `WITH cte AS (...) INSERT INTO ...` — CC requires the CTE AFTER `INSERT INTO`\n- `GROUP BY TUMBLE(ts, INTERVAL ...)` — must use the TVF form: `TUMBLE(TABLE t, DESCRIPTOR(ts), ...)`\n- `LATERAL TABLE(UNNEST(...))` — parse error; use `CROSS JOIN UNNEST(...)`\n- `PROCTIME()` — not supported; use External Tables\u002F`KEY_SEARCH_AGG` or an event-time temporal join (avoid a regular join against an upsert-kafka topic — it retains the whole table in state)\n- `CREATE FUNCTION f AS '...'` without `USING JAR` — CC UDFs require an uploaded artifact\n- Savepoints \u002F `STOP WITH SAVEPOINT` — not exposed on CC\n- `--sql-file` flag — doesn't exist; use `--sql \"$(cat file.sql)\"`\n- `DROP TABLE` — deletes the physical Kafka topic and its data on CC, not just metadata; confirm before running\n\n## Verification loop\n\nCanonical validation loop for any CC Flink SQL claim:\n\n0. **EXPLAIN** the query in `flink shell` — catches syntax and type errors for free.\n1. Write a minimal reproducer.\n2. **Present the plan and wait for explicit user confirmation** before running anything that creates or modifies a real resource. State: the statement name and SQL, the compute pool\u002Fdatabase\u002Fenvironment it targets, and any side effects (DDL creates a Kafka topic and Schema Registry subject; every run consumes CFUs). Do not proceed to step 3 without a go-ahead.\n3. Run: `confluent flink statement create \u003Cname> --sql \"$(cat repro.sql)\" --compute-pool \u003Cid> --database \u003Ccluster> --environment \u003Cenv> --wait`\n4. Observe. Consume downstream: `confluent kafka topic consume \u003Ctopic> --cluster \u003Cid> --from-beginning --value-format \u003Cmatching-format> 2>\u002Fdev\u002Fnull | grep -v '^%'` — match `\u003Cmatching-format>` to the sink's `value.format` (see [references\u002Fformats-and-serialization.md](references\u002Fformats-and-serialization.md); `jsonschema` for `json-registry`, `avro` for `avro-registry`, `protobuf` for `proto-registry`, `string` for `raw`)\n5. Record the command + output for later reference.\n\nEscalation-required states (no silent workarounds):\n\n- Statement `PENDING` > 60s → `confluent flink statement exception list \u003Cname> --cloud \u003Cprovider> --region \u003Cregion>`\n- UDF deploy \"jar not found\" → `confluent flink artifact list --cloud \u003Cprovider> --region \u003Cregion>`\n- Schema mismatch → `DESCRIBE \u003Ctable>`, diff against the producer schema\n- Egress denied → check `CREATE CONNECTION` + `USING CONNECTIONS` clause\n\nSee [references\u002Fcli-reference.md](references\u002Fcli-reference.md) for full flag schemas and timing expectations.\n\n## Anti-patterns\n\n- Apache Flink docs or Stack Overflow answers tagged `apache-flink` cited as CC authority\n- LLM memory of \"Flink SQL syntax\" used without CC verification\n- Mocking the `confluent` CLI in anything claiming end-to-end verification\n- `terraform apply -auto-approve` on the first run of a root module\n- Committing `.tfvars`, `.tfstate*`, `.terraform\u002F`, `*.secret*`\n- Swallowing Flink statement exceptions — fail loud; read `statement exception list`\n- Hardcoded secrets in `CREATE CONNECTION` or UDF source\n\n## Tutorials\n\n[developer.confluent.io\u002Ftutorials\u002F#flink](https:\u002F\u002Fdeveloper.confluent.io\u002Ftutorials\u002F#flink) mixes OSS and CC tutorials.\n\n**Filter rule:** Only use tutorials that list \"Confluent Cloud\" in prerequisites or use `confluent flink shell`. Apply the dialect trap table to any SQL copied from a tutorial — many target OSS Flink or Kafka Streams and are not CC-compatible as-is.\n\n## Source-of-truth hierarchy\n\n1. `references\u002Fdialect-traps.md` (this skill) — canonical, consolidated\n2. Per-project `CLAUDE.md` — references this skill, adds project-specific context\n3. A per-project trap log, if the user wants one kept — ask where before creating it\n\nWhen a new trap is discovered during a session, tell the user so they can decide whether to record it in their project's own notes. Do not edit this skill's own installed files (`references\u002Fdialect-traps.md` or elsewhere) — propose the change and let the user (or a separate PR to this skill's repo) apply it.\n\n## References\n\n- [Confluent Cloud Flink docs](https:\u002F\u002Fdocs.confluent.io\u002Fcloud\u002Fcurrent\u002Fflink\u002Foverview.md)\n- [Confluent Cloud Flink SQL reference](https:\u002F\u002Fdocs.confluent.io\u002Fcloud\u002Fcurrent\u002Fflink\u002Freference\u002Foverview.md)\n- [Confluent Terraform provider](https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fconfluentinc\u002Fconfluent\u002Flatest\u002Fdocs)\n- [Confluent CLI reference — Flink](https:\u002F\u002Fdocs.confluent.io\u002Fconfluent-cli\u002Fcurrent\u002Fcommand-reference\u002Fflink\u002Findex.md)\n- [Tutorials (filter for CC only)](https:\u002F\u002Fdeveloper.confluent.io\u002Ftutorials\u002F#flink)\n","# Confluent Cloud Flink SQL\n\nEnforce the CC-Flink-vs-OSS-Flink dialect boundary and the CLI-driven verification loop for any Confluent Cloud Flink SQL work. Apache Flink OSS training data is a trap — CC rejects or silently mishandles a long list of otherwise-valid Flink SQL constructs.\n\nScope note: this skill's reference material is built around the OSS-vs-CC dialect boundary — traps in constructs that exist in both dialects but behave differently. It does not yet catalog CC-only DDL that has no OSS counterpart (e.g. `CREATE MATERIALIZED TABLE`, `CREATE MODEL`\u002F`AI_COMPLETE`, `CREATE AGENT`, `USE CATALOG`). For those, verify directly against the [CC Flink SQL reference](https:\u002F\u002Fdocs.confluent.io\u002Fcloud\u002Fcurrent\u002Fflink\u002Freference\u002Foverview.md) rather than expecting a trap entry here.\n\n## Non-negotiables\n\n1. **CC Flink ≠ Apache Flink.** Verify every API, SQL construct, and runtime behavior against:\n   - [Confluent Cloud Flink docs](https:\u002F\u002Fdocs.confluent.io\u002Fcloud\u002Fcurrent\u002Fflink\u002Foverview.md)\n   - [CC Flink SQL reference](https:\u002F\u002Fdocs.confluent.io\u002Fcloud\u002Fcurrent\u002Fflink\u002Freference\u002Foverview.md)\n   - [Confluent Terraform provider](https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fconfluentinc\u002Fconfluent\u002Flatest\u002Fdocs)\n   - Live `confluent flink shell` against the user's compute pool\n2. **No mocks in verification.** Integration claims require real `confluent` CLI runs. Unit tests may mock; anything calling itself \"end-to-end verification\" may not.\n3. **Record decisions somewhere durable.** Ask the user where they want dialect traps and verification notes tracked (e.g. `docs\u002Fflink-dialect-traps.md` in their project) before writing any new file — don't assume a `docs\u002F` layout.\n4. **Secrets never in repo.** `CREATE CONNECTION` parameters are Terraform-injected, never hardcoded. Gitignore `.tfvars`, `.tfstate*`, `*.secret*` from day one.\n5. **EXPLAIN before CREATE.** Always `EXPLAIN` a query before `statement create` — catches parse\u002Ftype errors without consuming CFUs.\n6. **Don't invent identifiers.** Use `\u003Cplaceholder>` for any topic, table, statement, or resource name you haven't verified.\n\n## Stream Processing Workflow\n\nWhen a user asks to build, modify, or troubleshoot a Flink SQL streaming solution, first understand the streaming problem and identify the required data and processing semantics before generating SQL.\n\nUse this workflow:\n\n1. Understand the requirement\n2. Discover existing Confluent resources\n3. Establish the required streaming semantics (when needed)\n4. Propose the processing design (when needed)\n5. Confirm the design before modifying resources\n6. Generate and validate Flink SQL\n7. Execute the statement when explicitly approved\n8. Observe and verify the result\n\nDo not ask clarifying questions if a request is complete (i.e., all required information, context, and parameters are provided or retrievable via available MCP tools). Skip directly to implementation and validation. \n\nOnly ask questions when critical information is missing and cannot be resolved through existing context or tools.\n\n### 1. Understand the Requirement\n\nBefore generating Flink SQL, determine what the user is trying to accomplish.\n\nEstablish, when relevant:\n\n- What streaming problem is being solved?\n- What data\u002Fevents should be processed?\n- What are the input sources?\n- What should the output represent?\n- Where should the output go?\n- What business conditions determine which records are processed?\n- What are the required time semantics?\n- What should happen with duplicates, late events, or invalid data?\n- Are there important assumptions that could change the result?\n\nAsk only questions that materially affect the pipeline design.\n\nDo not ask for information that is already available in the conversation.\n\n### 2. Discover Existing Confluent Resources\n\nWhen MCP tools are available, prefer inspecting existing Confluent resources over asking the user for information that can be discovered.\n\nFor referenced input resources:\n\n1. Find the relevant topic\u002Ftable.\n2. Inspect its schema.\n3. Inspect representative records when necessary.\n4. Identify relevant keys and timestamp fields.\n5. Confirm the fields required by the proposed transformation.\n6. Identify the target resource if it already exists.\n\nDo not invent topic names, table names, column names, schemas, or timestamp fields.\n\nIf multiple resources could match the request, present the candidates and ask the user to select one.\n\n### 3. Establish Streaming Semantics (when needed)\n\nBefore generating SQL, determine the semantics that materially affect the result. Skip this step if all relevant semantics are already established from the user's prompt or the discovery step.\n\nExamples include:\n\n- Event time vs processing time\n- Window duration and behavior\n- Grouping keys\n- Join keys and temporal semantics\n- Deduplication key and ordering\n- Late-event handling\n- Output granularity\n- Whether the result represents individual events, aggregates, alerts, or another derived stream\n\n### 4. Propose the Processing Design (when needed)\n\nFor non-trivial requests, summarize the proposed design before generating executable SQL. For simple, fully specified requests, this can be reduced to a brief summary or skipped entirely.\n\nUse:\n\n**Input**\n- Relevant topic\u002Ftable(s)\n- Relevant fields\n\n**Processing**\n- Main transformations\n- Joins\u002Fenrichment\n- Aggregation\u002Fwindowing\n- Other required operations\n\n**Output**\n- Target topic\u002Ftable\n- Output semantics\n\n**Assumptions**\n- Material assumptions that have not been explicitly specified\n\nAsk the user to confirm or correct the design before creating or modifying resources.\n\n### 5. Plan Before Execute\n\nBefore creating, modifying, or deleting a Confluent resource, present the execution plan.\n\nThe plan should identify:\n\n1. Resources that will be inspected.\n2. SQL that will be validated.\n3. Statements\u002Fresources that will be created or modified.\n4. MCP tools or CLI commands that will be used.\n5. How the resulting pipeline will be verified.\n\nWait for explicit user confirmation before performing resource-modifying operations.\n\nRead-only discovery and inspection may be performed before confirmation.\n\n### 6. Generate and Validate Flink SQL\n\nAfter the design is confirmed, generate and validate the SQL:\n\n1. Generate the Flink SQL.\n2. Validate it against the Confluent Cloud Flink SQL dialect.\n3. Use `EXPLAIN` where appropriate to catch parse\u002Ftype errors without consuming CFUs.\n4. Follow the existing resource-modification and safety guidance.\n\nUse the existing dialect, SQL pattern, CLI, and troubleshooting references for implementation details.\n\n### 7. Execute the Statement\n\nCreate or modify the Flink statement only after receiving explicit user confirmation:\n\n1. Create the statement using the CLI or MCP tools.\n2. Wait for the statement to reach RUNNING state.\n3. Surface any PENDING or FAILED states immediately — do not silently retry.\n\n### 8. Observe and Verify the Result\n\nAfter the statement is running:\n\n1. Inspect a sample of records from the output topic to confirm that expected records are being produced.\n2. Monitor statement status and exceptions.\n3. If the output is unexpected, inspect the input data and statement configuration before making changes.\n\n### Requirements Gathering Guardrails\n\nRequirements gathering must be adaptive rather than a fixed questionnaire.\n\n- Do not ask for information already provided.\n- Do not ask for information that can be reliably discovered through available MCP tools.\n- Do not ask every possible question before performing useful read-only discovery.\n- Ask follow-up questions only when missing information materially affects correctness or semantics.\n- Prefer a clearly stated, low-risk assumption over unnecessary questioning.\n- When an assumption could materially change the result, ask the user to confirm it.\n\n## Reference files\n\nLoad these on demand when the topic matches — do not read them all upfront:\n\n| File | When to load |\n|------|-------------|\n| [references\u002Fdialect-traps.md](references\u002Fdialect-traps.md) | Before writing ANY Flink SQL — 22 CC-vs-OSS traps, single source of truth |\n| [references\u002Fcli-reference.md](references\u002Fcli-reference.md) | Before running `confluent` CLI — flag schemas, carry-over recipe, timing, token expiry |\n| [references\u002Fsql-patterns-cc.md](references\u002Fsql-patterns-cc.md) | When writing SQL — CC-validated patterns: windows, joins, dedup, MATCH_RECOGNIZE, JSON, External Tables |\n| [references\u002Fformats-and-serialization.md](references\u002Fformats-and-serialization.md) | When configuring table formats — 7 supported formats, id-encoding, consume flags |\n| [references\u002Ftroubleshooting-cc.md](references\u002Ftroubleshooting-cc.md) | When debugging errors — CC-specific error to cause to fix |\n| [references\u002Freserved-words.md](references\u002Freserved-words.md) | When hitting parse errors — must-backquote identifiers |\n\n## Red flags\n\nStop and consult `references\u002Fdialect-traps.md` if you catch yourself writing any of these:\n\n- DataStream API (Java\u002FScala) — not supported on CC. Table API + PTF are GA in Java; Python Table API is Open Preview with no PTF yet\n- `CREATE CATALOG ...` — catalog = CC environment, not creatable\n- `SET 'execution.checkpointing.*'` — CC-managed, not settable\n- `CREATE TABLE ... WITH ('connector' = 'kafka', ...)` — tables auto-map from topics\n- `'value.format' = 'json'` — must be `'json-registry'` (or another SR-backed format)\n- `WITH cte AS (...) INSERT INTO ...` — CC requires the CTE AFTER `INSERT INTO`\n- `GROUP BY TUMBLE(ts, INTERVAL ...)` — must use the TVF form: `TUMBLE(TABLE t, DESCRIPTOR(ts), ...)`\n- `LATERAL TABLE(UNNEST(...))` — parse error; use `CROSS JOIN UNNEST(...)`\n- `PROCTIME()` — not supported; use External Tables\u002F`KEY_SEARCH_AGG` or an event-time temporal join (avoid a regular join against an upsert-kafka topic — it retains the whole table in state)\n- `CREATE FUNCTION f AS '...'` without `USING JAR` — CC UDFs require an uploaded artifact\n- Savepoints \u002F `STOP WITH SAVEPOINT` — not exposed on CC\n- `--sql-file` flag — doesn't exist; use `--sql \"$(cat file.sql)\"`\n- `DROP TABLE` — deletes the physical Kafka topic and its data on CC, not just metadata; confirm before running\n\n## Verification loop\n\nCanonical validation loop for any CC Flink SQL claim:\n\n0. **EXPLAIN** the query in `flink shell` — catches syntax and type errors for free.\n1. Write a minimal reproducer.\n2. **Present the plan and wait for explicit user confirmation** before running anything that creates or modifies a real resource. State: the statement name and SQL, the compute pool\u002Fdatabase\u002Fenvironment it targets, and any side effects (DDL creates a Kafka topic and Schema Registry subject; every run consumes CFUs). Do not proceed to step 3 without a go-ahead.\n3. Run: `confluent flink statement create \u003Cname> --sql \"$(cat repro.sql)\" --compute-pool \u003Cid> --database \u003Ccluster> --environment \u003Cenv> --wait`\n4. Observe. Consume downstream: `confluent kafka topic consume \u003Ctopic> --cluster \u003Cid> --from-beginning --value-format \u003Cmatching-format> 2>\u002Fdev\u002Fnull | grep -v '^%'` — match `\u003Cmatching-format>` to the sink's `value.format` (see [references\u002Fformats-and-serialization.md](references\u002Fformats-and-serialization.md); `jsonschema` for `json-registry`, `avro` for `avro-registry`, `protobuf` for `proto-registry`, `string` for `raw`)\n5. Record the command + output for later reference.\n\nEscalation-required states (no silent workarounds):\n\n- Statement `PENDING` > 60s → `confluent flink statement exception list \u003Cname> --cloud \u003Cprovider> --region \u003Cregion>`\n- UDF deploy \"jar not found\" → `confluent flink artifact list --cloud \u003Cprovider> --region \u003Cregion>`\n- Schema mismatch → `DESCRIBE \u003Ctable>`, diff against the producer schema\n- Egress denied → check `CREATE CONNECTION` + `USING CONNECTIONS` clause\n\nSee [references\u002Fcli-reference.md](references\u002Fcli-reference.md) for full flag schemas and timing expectations.\n\n## Anti-patterns\n\n- Apache Flink docs or Stack Overflow answers tagged `apache-flink` cited as CC authority\n- LLM memory of \"Flink SQL syntax\" used without CC verification\n- Mocking the `confluent` CLI in anything claiming end-to-end verification\n- `terraform apply -auto-approve` on the first run of a root module\n- Committing `.tfvars`, `.tfstate*`, `.terraform\u002F`, `*.secret*`\n- Swallowing Flink statement exceptions — fail loud; read `statement exception list`\n- Hardcoded secrets in `CREATE CONNECTION` or UDF source\n\n## Tutorials\n\n[developer.confluent.io\u002Ftutorials\u002F#flink](https:\u002F\u002Fdeveloper.confluent.io\u002Ftutorials\u002F#flink) mixes OSS and CC tutorials.\n\n**Filter rule:** Only use tutorials that list \"Confluent Cloud\" in prerequisites or use `confluent flink shell`. Apply the dialect trap table to any SQL copied from a tutorial — many target OSS Flink or Kafka Streams and are not CC-compatible as-is.\n\n## Source-of-truth hierarchy\n\n1. `references\u002Fdialect-traps.md` (this skill) — canonical, consolidated\n2. Per-project `CLAUDE.md` — references this skill, adds project-specific context\n3. A per-project trap log, if the user wants one kept — ask where before creating it\n\nWhen a new trap is discovered during a session, tell the user so they can decide whether to record it in their project's own notes. Do not edit this skill's own installed files (`references\u002Fdialect-traps.md` or elsewhere) — propose the change and let the user (or a separate PR to this skill's repo) apply it.\n\n## References\n\n- [Confluent Cloud Flink docs](https:\u002F\u002Fdocs.confluent.io\u002Fcloud\u002Fcurrent\u002Fflink\u002Foverview.md)\n- [Confluent Cloud Flink SQL reference](https:\u002F\u002Fdocs.confluent.io\u002Fcloud\u002Fcurrent\u002Fflink\u002Freference\u002Foverview.md)\n- [Confluent Terraform provider](https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fconfluentinc\u002Fconfluent\u002Flatest\u002Fdocs)\n- [Confluent CLI reference — Flink](https:\u002F\u002Fdocs.confluent.io\u002Fconfluent-cli\u002Fcurrent\u002Fcommand-reference\u002Fflink\u002Findex.md)\n- [Tutorials (filter for CC only)](https:\u002F\u002Fdeveloper.confluent.io\u002Ftutorials\u002F#flink)\n",{"name":5,"metadata":57,"description":7,"compatibility":61},{"author":58,"version":59,"last_updated":60},"confluent","1.1.0","2026-09-18","Requires the `confluent` CLI (authenticated session) and an active Confluent Cloud compute pool — statement runs consume CFUs. Terraform is optional, needed only if managing `CREATE CONNECTION` credentials via the Confluent Terraform provider.","main","204b36f10e9be41819557988e8f5291711fda986","skills\u002Fconfluent-cloud-flink-sql",11,"https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills","https:\u002F\u002Fgithub.com\u002Fconfluentinc","https:\u002F\u002Fconfluent.io","Real-time streams powered by Apache Kafka®","2026-10-27 13:08:16",{"source":8,"skillName":5,"commands":72,"prompt":82,"zipAvailable":83},[73,76,79],{"tool":74,"command":75},"npx","npx skills add confluentinc\u002Fagent-skills --skill confluent-cloud-flink-sql",{"tool":77,"command":78},"bunx","bunx skills add confluentinc\u002Fagent-skills --skill confluent-cloud-flink-sql",{"tool":80,"command":81},"pnpm","pnpm dlx skills add confluentinc\u002Fagent-skills --skill confluent-cloud-flink-sql","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfluent-cloud-flink-sql\u002FSKILL.md",true,[85,91,95,99,103,107,111],{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"evals\u002Fevals.json","REFERENCE","参考文档",14402,"https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfluent-cloud-flink-sql\u002Fevals\u002Fevals.json",{"path":92,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fcli-reference.md",6876,"https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfluent-cloud-flink-sql\u002Freferences\u002Fcli-reference.md",{"path":96,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fdialect-traps.md",8100,"https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfluent-cloud-flink-sql\u002Freferences\u002Fdialect-traps.md",{"path":100,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fformats-and-serialization.md",3053,"https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfluent-cloud-flink-sql\u002Freferences\u002Fformats-and-serialization.md",{"path":104,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002Freserved-words.md",2101,"https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfluent-cloud-flink-sql\u002Freferences\u002Freserved-words.md",{"path":108,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":109,"sourceHtmlUrl":110},"references\u002Fsql-patterns-cc.md",9831,"https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfluent-cloud-flink-sql\u002Freferences\u002Fsql-patterns-cc.md",{"path":112,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":113,"sourceHtmlUrl":114},"references\u002Ftroubleshooting-cc.md",5145,"https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfluent-cloud-flink-sql\u002Freferences\u002Ftroubleshooting-cc.md",[116,144,169,197,216,231],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":126,"publishedAt":52},"01M6DRM9K8G3X7H4N445JGEVPT","msk-migration","Use this skill to assess and plan a migration from AWS MSK (Managed Streaming for Apache Kafka) to Confluent Cloud. Triggers on user intent like \"migrate MSK to Confluent Cloud\", \"move off MSK\", \"MSK to CC cutover\", \"Zero-Cut migration from MSK\", \"kcp scan my MSK\", or any discussion of MSK-to-CC assessment, planning, cluster sizing, Cluster Linking setup, Gateway-based switchover, or post-cutover validation. Do NOT trigger for non-MSK Kafka sources (open-source Kafka, Aiven, Confluent Platform, Redpanda) — this skill is MSK-only. Do NOT trigger for greenfield Confluent Cloud projects with no existing Kafka source. Do NOT trigger for general Kafka programming questions (producer\u002Fconsumer code, Kafka Streams) unrelated to migration.","https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fmsk-migration\u002FSKILL.md",[122,125],{"categoryNo":123,"categoryName":124,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},[127,128,129,130,49,131,132,133,134,135,136,39,137,138,139,140,141,58,142,143],"migration","msk migration","assessment","code","streaming","gateway","open","migrate","plan","projects","unrelated","intent","cc","do","cut","confluent cloud","kafka streams",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":151,"publishedAt":52},"01M6DRM48N8ZCGTA0MSNADJXJ9","kafka-streams-programming","Architect, build, and debug Kafka Streams apps (JVM-embedded stream processing). Use when user mentions KStream, KTable, topology, TopologyTestDriver, StreamsBuilder, interactive queries, GlobalKTable, joins\u002Fwindows\u002Faggregations, or debugging issues (rebalancing, state stores, lag, deserialization errors). Also use when user wants to optimize Kafka Streams for WarpStream or tune Kafka Streams client configuration for WarpStream. Do NOT trigger for Flink, connectors, CDC, or plain producer\u002Fconsumer.","https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkafka-streams-programming\u002FSKILL.md",[150],{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},[152,153,143,154,155,156,157,158,159,160,46,161,162,163,164,140,165,166,167,168],"kafka","programming","kafka streams programming","windows","debug","connectors","debugging","issues","stream processing","topology","architect","interactive","use","optimize","jvm","trigger","apps",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":179,"publishedAt":52},"01M6DRKX6HCEW6QC3TSJD47R3X","kafka-schema-registry","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\u002Fconsumer configurations, or generate Terraform for Schema Registry.","https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkafka-schema-registry\u002FSKILL.md",[175,178],{"categoryNo":176,"categoryName":177,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":123,"categoryName":124,"taxonomyType":21,"taxonomyTypeDesc":22},[180,152,181,182,183,184,185,186,187,188,189,190,191,164,192,127,193,194,195,196],"registry","schema","kafka schema registry","generate","report","produce","audit","data","pii","applications","analyze","repo","rollout","models","registration","scan","project",{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":206,"publishedAt":52},"01M6DRKR2J9MFM4HSSPJBX26SD","flink-udf","Build and deploy Apache Flink user-defined functions (UDFs) in Java for stream processing over Kafka. Use this skill when users want to create scalar UDFs, user-defined table functions (UDTFs), or process table functions (PTFs) in Java, deploy them to Confluent Cloud or local Docker environments, and invoke them from Flink SQL or the Table API. Trigger on: Flink UDF, custom Flink function, process table function, PTF, UDTF, Flink user defined, extend Flink SQL, stateful stream processing with Flink. Do NOT trigger for: Kafka Streams UDFs (use kafka-streams-programming skill), general Flink job development without custom functions, CDC streaming data piplines that include Flink (prefer the confluent-cloud-cdc-tableflow skill), Flink connector setup, or Kafka producer\u002Fconsumer code.","https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fflink-udf\u002FSKILL.md",[203,204,205],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":176,"categoryName":177,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},[32,207,208,209,37,130,49,210,160,131,152,211,153,164,212,213,214,140,215,167],"flink udf","docker","development","java","api","Connector","general","functions","local",{"skillNo":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":223,"publishedAt":52},"01M6DRKJ5YMXKVD7BG52K68NK6","developing-kafka-python-client","Use when the user wants to build a Python Kafka producer or consumer, add Schema Registry to existing Python code, migrate from raw JSON to schema-backed serialization, or scaffold a confluent-kafka-python project for Confluent Cloud, local Docker, or WarpStream. Also use when user wants to optimize Python Kafka client configuration for WarpStream.","https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdeveloping-kafka-python-client\u002FSKILL.md",[222],{"categoryNo":176,"categoryName":177,"taxonomyType":21,"taxonomyTypeDesc":22},[224,152,225,208,130,180,226,34,134,227,228,164,181,229,230,165,215,196,58,142],"python","developing kafka python client","serialization","json","user","build","configuration",{"skillNo":232,"name":233,"nameZh":6,"description":234,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":235,"categories":236,"keywords":238,"publishedAt":52},"01M6DRKCFWR3TXQDYCNBPBPTCK","developing-kafka-java-client","Use when the user wants to integrate a Kafka client into an existing application or scaffold a Java Kafka client project (Maven or Gradle based) for Confluent Cloud, local Docker, or WarpStream. Covers the Apache Kafka Java clients (KafkaProducer\u002FKafkaConsumer\u002FKafkaShareConsumer) with Avro, JSON Schema, or Protobuf serializers. Also use when the user wants to optimize Java Kafka client configuration for WarpStream. Do NOT trigger for Kafka Streams apps (use kafka-streams-programming), Flink, connectors, or Kafka Python client (use developing-kafka-python-client).","https:\u002F\u002Fgithub.com\u002Fconfluentinc\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdeveloping-kafka-java-client\u002FSKILL.md",[237],{"categoryNo":176,"categoryName":177,"taxonomyType":21,"taxonomyTypeDesc":22},[210,152,239,224,208,240,241,49,242,243,140,165,215,196,244,167,168,58,142,143],"developing kafka java client","json schema","protobuf","maven","integrate","gradle"]