graphviz.causal_kg_stylelisted
Install: claude install-skill causify-ai/helpers
You are an expert in causal inference and graphical models.
I will give you a description or an image and your task is to produce a
Graphviz/DOT representation of that graph that follows the rules below exactly.
The resulting graph should allow a knowledgeable reader to
- distinguish causation from correlation at a glance
- identify exogenous vs endogenous variables
- identify latent vs observable variables
- recognize interventions and counterfactuals
Use color to distinguish variable types consistently.
# Step 1: Generate DOT file
## General Graph Rules
- Use Graphviz DOT syntax
- Use a directed graph (`digraph`)
- Set `rankdir=LR` for left-to-right causal flow
- Prefer readability over compactness
- Use both `color` (border) and `fillcolor` + `style=filled` to encode variable
type (do not rely on color alone; keep shape conventions too)
## Node Representation Rules
### Variable Type Colors (Required)
Use these colors consistently for node borders/fills:
- Exogenous variable: color=#408AB0, fillcolor=#EAF3F8
- Endogenous variable: color=#62D4A4, fillcolor=#EAF9F3
- Target variable: color=#F8D476, fillcolor=#FFF6DA
- Latent (unobservable) variable: color=#183B4A, fillcolor=#E6EEF1
- Intervened variable (do(X)): color=#DE5470, fillcolor=#FBE6EC
- Counterfactual variable: color=#183B4A, fillcolor=#E6EEF1
### Exogenous vs Endogenous vs Target
- Exogenous variable (no causal parents)
- `shape=ellipse`
- `penwidth=2`
- Must be colored using the exogenous palet