Skip to content
cccskills
FreePublished on GitHub

de-lead-routing

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.

The English summary is being prepared. Showing the original description.

Works withSnowflake
See how to install

Files included (1)

  • SKILL.md9.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Mandatory delegation directive (R010 Universal /tmp Script Bypass)

When this skill spawns a subagent via the Agent tool, the spawned prompt MUST include this directive verbatim (or equivalent):

ALL tool calls targeting .claude/ paths MUST go through /tmp/*.sh script via Bash. This includes read-only measurement (sed/cat/wc/ls/grep), Write, Edit. Read tool is exempt. Direct Write/Edit/Bash on .claude/ triggers user approval prompts that block unattended automation. See R010 for the full pattern.

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

TypeAgentsPurpose
de/orchestrationde-airflow-expertDAG authoring, scheduling, testing
de/modelingde-dbt-expertSQL modeling, testing, documentation
de/processingde-spark-expertDistributed data processing
de/streamingde-kafka-expertEvent streaming, topic design
de/warehousede-snowflake-expertCloud DWH, query optimization
de/architecturede-pipeline-expertPipeline design, cross-tool patterns

Tool/Framework Detection

Keyword Mapping

KeywordAgent
"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

PatternAgent
dags/*.py, airflow.cfg, airflow_settings.yamlde-airflow-expert
models/**/*.sql, dbt_project.yml, schema.ymlde-dbt-expert
Spark job files, spark-submit configsde-spark-expert
Kafka configs, *.properties (Kafka), streams/*.javade-kafka-expert
Snowflake SQL, warehouse DDLde-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).

ScenarioPreferred
Single-tool DE taskAgent Tool
Multi-tool pipeline design (3+ tools)Agent Teams
Cross-tool data quality analysisAgent Teams
Quick DAG/model validationAgent Tool

Step 2: Codex-Exec Hybrid (Code Generation)

For new pipeline code, DAG scaffolding, or SQL model generation:

  1. Check /tmp/.claude-env-status-* for codex, gemini, and rtk availability
  2. If codex available AND task involves new file creation → automatically delegate to /codex-exec for scaffolding:
    • Display: [Codex Hybrid] Delegating to codex-exec...
    • codex-exec generates initial code (strength: fast generation)
    • Selected DE expert reviews and refines codex output (strength: reasoning, quality)
  3. If codex unavailable but gemini available → delegate to /gemini-exec for scaffolding:
    • Display: [Gemini Hybrid] Delegating to gemini-exec...
    • gemini-exec generates initial code
    • Selected DE expert reviews and refines output
  4. If RTK available (RTK=available in env status) → optionally wrap DE expert output through RTK to reduce token consumption by 60-90%:
    • Display: [RTK Proxy] Token optimization active via rtk-exec
    • RTK acts as a transparent proxy — no change to expert selection
  5. If none available → display [External CLI] Unavailable — proceeding with {expert} directly and use DE expert directly

Suitable: New DAG files, dbt model scaffolding, SQL template generation Unsuitable: Existing pipeline modification, architecture decisions, data quality analysis

Step 3: 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:

  1. Search wiki/index.yaml for DE-related pages matching the request
  2. Inject relevant skill/guide suggestions into the spawned agent's prompt
  3. 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 TypeRecommended ModelReason
Pipeline architectureopusDeep reasoning required
DAG/model reviewsonnetBalanced quality judgment
ImplementationsonnetStandard code generation
Quick validationhaikuFast response

Model Mapping by Agent

AgentDefault ModelAlternative
de-pipeline-expertsonnetopus for architecture
de-airflow-expertsonnethaiku for DAG validation
de-dbt-expertsonnethaiku for test checks
de-spark-expertsonnetopus for optimization
de-kafka-expertsonnetopus for topology design
de-snowflake-expertsonnetopus 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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Adversarial code review using attacker mindset — trust boundary, attack surface, business logic, and defense evaluation

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Apache Airflow best practices for DAG authoring, testing, and production deployment

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Alembic migration patterns for naming conventions, safety checks, expand-contract, env.py configuration, and CI integration

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Pre-routing ambiguity analysis — scores request clarity and asks clarifying questions when needed (inspired by ouroboros)

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

See all skills by baekenough

Report a problem with this skill