| name | de-lead-routing |
| description | Routes data engineering tasks to the correct DE expert agent. Use when user requests data pipeline design, DAG authoring, SQL modeling, stream processing, or warehouse optimization. |
| scope | core |
| user-invocable | false |
| context | fork |
Mandatory delegation directive (R010 bypassPermissions)
When this skill spawns a subagent via the Agent tool, the spawned prompt MUST include this directive verbatim (or equivalent):
์ด ์คํฌ์ด Agent tool๋ก ์๋ธ์์ด์ ํธ๋ฅผ ์คํฐํ ๋ mode: "bypassPermissions"๋ฅผ ๋ฐ๋์ ํฌํจํ๋ค. ์๋ธ์์ด์ ํธ๋ .claude/ ๊ฒฝ๋ก์ ์ง์ Write/Edit/Bash๋ฅผ ์ฌ์ฉํ๋ค(/tmp ์ฐํ ๋ถํ์, CC v2.1.121+). See R010.
This directive is preserved inline because Agent-tool prompt synthesis can drop SKILL.md notes; inline mandatory directives survive (#1046 lesson).
DE Lead Routing Skill
Purpose
Routes data engineering tasks to appropriate DE expert agents. This skill contains the coordination logic for orchestrating data engineering agents across orchestration, modeling, processing, streaming, and warehouse specializations.
Engineers Under Management
| Type | Agents | Purpose |
|---|
| de/orchestration | de-airflow-expert | DAG authoring, scheduling, testing |
| de/modeling | de-dbt-expert | SQL modeling, testing, documentation |
| de/processing | de-spark-expert | Distributed data processing |
| de/streaming | de-kafka-expert | Event streaming, topic design |
| de/warehouse | de-snowflake-expert | Cloud DWH, query optimization |
| de/architecture | de-pipeline-expert | Pipeline design, cross-tool patterns |
Tool/Framework Detection
Keyword Mapping
| Keyword | Agent |
|---|
| "airflow", "dag", "scheduling", "orchestration" | de-airflow-expert |
| "dbt", "modeling", "sql model", "analytics engineering" | de-dbt-expert |
| "spark", "pyspark", "distributed processing", "distributed" | de-spark-expert |
| "kafka", "streaming", "event", "consumer", "producer" | de-kafka-expert |
| "snowflake", "warehouse", "clustering key" | de-snowflake-expert |
| "pipeline", "ETL", "ELT", "data quality", "lineage" | de-pipeline-expert |
| "iceberg", "table format" | de-snowflake-expert or de-pipeline-expert |
File Pattern Mapping
| Pattern | Agent |
|---|
dags/*.py, airflow.cfg, airflow_settings.yaml | de-airflow-expert |
models/**/*.sql, dbt_project.yml, schema.yml | de-dbt-expert |
Spark job files, spark-submit configs | de-spark-expert |
Kafka configs, *.properties (Kafka), streams/*.java | de-kafka-expert |
| Snowflake SQL, warehouse DDL | de-snowflake-expert |
Routing Decision (Priority Order)
Before routing via Agent tool, evaluate in this order:
Step 1: Agent Teams Eligibility (R018)
Check if Agent Teams is available (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 or TeamCreate/SendMessage tools present).
| Scenario | Preferred |
|---|
| Single-tool DE task | Agent Tool |
| Multi-tool pipeline design (3+ tools) | Agent Teams |
| Cross-tool data quality analysis | Agent Teams |
| Quick DAG/model validation | Agent Tool |
Step 2: Expert Selection
Route to appropriate DE expert based on tool/framework detection.
Permission Mode: When spawning agents via Agent tool, always pass mode: "bypassPermissions". The Agent tool default (acceptEdits) overrides agent frontmatter permissionMode, causing permission prompts during unattended execution.
Step 4: Ontology-RAG Enrichment (R019)
If get_agent_for_task MCP tool is available, call it with the original query and inject suggested_skills into the agent prompt. Skip silently on failure.
Step 4b: Wiki-RAG Enrichment
For ambiguous routing (confidence < 90%), query the wiki for context:
- Search
wiki/index.yaml for DE-related pages matching the request
- Inject relevant skill/guide suggestions into the spawned agent's prompt
- Particularly useful for cross-domain DE tasks (e.g., Kafka + Spark)
Advisory only โ skip silently if wiki unavailable.
Step 5: Soul Injection (R006)
If the selected agent has soul: true in frontmatter, read and prepend .claude/agents/souls/{agent-name}.soul.md content to the prompt. Skip silently if file doesn't exist.
Command Routing
DE Request โ Detection โ Expert Agent
Airflow DAG โ de-airflow-expert
dbt model โ de-dbt-expert
Spark job โ de-spark-expert
Kafka topic โ de-kafka-expert
Snowflake โ de-snowflake-expert
Pipeline โ de-pipeline-expert
Multi-tool โ Multiple experts (parallel)
Routing Rules
1. Pipeline Development Workflow
1. Receive pipeline task request
2. Identify tools and components:
- DAG orchestration โ de-airflow-expert
- SQL transformations โ de-dbt-expert
- Distributed processing โ de-spark-expert
- Event streaming โ de-kafka-expert
- Warehouse operations โ de-snowflake-expert
- Architecture decisions โ de-pipeline-expert
3. Select appropriate experts
4. Distribute tasks (parallel if 2+ tools)
5. Aggregate results
6. Present unified report
Example:
User: "Design a pipeline that runs dbt models from Airflow and loads into Snowflake"
Detection:
- Airflow DAG โ de-airflow-expert
- dbt model โ de-dbt-expert
- Snowflake loading โ de-snowflake-expert
- Pipeline architecture โ de-pipeline-expert
Route (parallel where independent):
Agent(de-pipeline-expert โ overall architecture design)
Agent(de-airflow-expert โ DAG structure)
Agent(de-dbt-expert โ model design)
Agent(de-snowflake-expert โ warehouse setup)
Aggregate:
Pipeline architecture defined
Airflow DAG: 5 tasks designed
dbt: 12 models structured
Snowflake: warehouse + schema configured
2. Data Quality Workflow
1. Analyze data quality requirements
2. Route to appropriate experts:
- dbt tests โ de-dbt-expert
- Pipeline validation โ de-pipeline-expert
- Source freshness โ de-airflow-expert
3. Coordinate cross-tool quality strategy
3. Multi-Tool Projects
For projects spanning multiple DE tools:
1. Detect all DE tools in project
2. Identify primary tool (most files/configs)
3. Route to appropriate experts:
- If task spans multiple tools โ parallel experts
- If task is tool-specific โ single expert
4. Coordinate cross-tool consistency
Sub-agent Model Selection
Model Mapping by Task Type
| Task Type | Recommended Model | Reason |
|---|
| Pipeline architecture | opus | Deep reasoning required |
| DAG/model review | sonnet | Balanced quality judgment |
| Implementation | sonnet | Standard code generation |
| Quick validation | haiku | Fast response |
Model Mapping by Agent
| Agent | Default Model | Alternative |
|---|
| de-pipeline-expert | sonnet | opus for architecture |
| de-airflow-expert | sonnet | haiku for DAG validation |
| de-dbt-expert | sonnet | haiku for test checks |
| de-spark-expert | sonnet | opus for optimization |
| de-kafka-expert | sonnet | opus for topology design |
| de-snowflake-expert | sonnet | opus for warehouse design |
No Match Fallback
When a data engineering tool is detected but no matching agent exists:
User Input โ No matching DE agent
โ
Detect: DE tool keyword or config file pattern
โ
Delegate to mgr-creator with context:
domain: detected DE tool
type: de-engineer
keywords: extracted tool names
file_patterns: detected config patterns
skills: auto-discover from .claude/skills/
guides: auto-discover from templates/guides/
Examples of dynamic creation triggers:
- New data tools (e.g., "Dagster DAG ๋ง๋ค์ด์ค", "Flink ์คํธ๋ฆฌ๋ฐ ์ค์ ํด์ค")
- Unfamiliar data formats or connectors
- Data tool detected in project but no specialist agent
Usage
This skill is NOT user-invocable. It should be automatically triggered when the main conversation detects data engineering intent.
Detection criteria:
- User requests pipeline design or data engineering
- User mentions DE tool names (Airflow, dbt, Spark, Kafka, Snowflake)
- User provides DE-related file paths (dags/, models/, etc.)
- User requests data quality or lineage work