sian-dag-factory

Creates and reviews Airflow DAGs using SIAN factory patterns with naming and placement conventions.

Updated May 21, 2026
One-click install
npx skills add https://github.com/gestaosian/gtsi-claude-skills --skill sian-dag-factory-gestaosian
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sian-dag-factory
Source: https://github.com/gestaosian/gtsi-claude-skills/tree/main/plugins/gtsi-ops-plugin/skills/sian-dag-factory
Command: npx skills add https://github.com/gestaosian/gtsi-claude-skills --skill sian-dag-factory-gestaosian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams on the SIAN data platform risk creating ad-hoc Airflow DAGs that bypass established factory patterns, use wrong naming conventions, or land in incorrect folders, causing architectural drift and maintenance issues. ## Core Features & Use Cases - Factory Enforcement: Ensures DAGs for Protheus, RM, Pontotel, TDMAX, and Supabase are created via their dedicated factory functions instead of manually. - Naming & Placement Rules: Applies the {sistema}__{tabela}__{cliente}__{frequência} naming convention and the dags/<sistema>/<domínio>/ folder structure. - Use Case: When asked to add a new Protheus CT1 table extraction, the Skill generates a DAG file calling create_protheus_dag() with the correct dag_id, sys.path depth, schedule, and table format, placed under dags/protheus/controladoria/. ## Quick Start Ask the AI to create a new SIAN DAG for a specific source system table using the appropriate factory pattern.

Frequently Asked Questions about sian-dag-factory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an Airflow DAG for a Protheus table in SIAN?▼

Create a file under dags/protheus/<domínio>/ that imports create_protheus_dag from data.include.utils.protheus_dag_factory and calls it with dag_id, table_name, and schedule. The dag_id must exactly match the filename without the .py extension.

What naming convention should Airflow DAG files follow?▼

DAG files use the pattern {sistema}__{tabela}__{cliente}__{frequência}.py with double underscores as separators, lowercase system and table names, and frequency limited to daily or intraday. The dag_id equals the filename minus the extension.

Can I create a standalone DAG instead of using a factory?▼

No. Creating an ad-hoc DAG for a system that already has a factory (Protheus, RM, Pontotel, TDMAX, Supabase) is considered an architectural error. Always use the corresponding create function from data/include/utils/.

Why does my DAG fail to import the factory module?▼

The sys.path bootstrap block must match the DAG file's depth. DAGs in dags/<sistema>/<domínio>/ are three levels below the root and need three dirname() calls; DAGs in dags/<sistema>/ need only two.

How should credentials be handled in SIAN DAGs?▼

Never hardcode credentials in DAG files. Use Airflow Variables such as protheus_api_url_new and protheus_token_authorization, which the factories consume internally.

When should a new DAG be unpaused in Airflow?▼

DAGs must be created in a paused state and only unpaused after validation in the environment. This prevents accidental execution of unverified extraction pipelines.