etl-runner
Skill1 starsChanged 6 months agoMITView on GitHub
Use when running ETL scripts to load data into Neo4j. Ensures correct port (7475 HTTP), proper CSV paths, case property setting, and sequential phase execution.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- academic-evaluationSkill
- academic-writingSkill
- agent-orchestrationSkill
- agents-md-writerSkill
- algorithmic-artSkill
- brand-guidelinesSkill
- codebase-architectureSkill
- code-reviewSkill
- commit-workflowSkill
- context-checkpointSkill
- doc-coauthoringSkill
- docxSkill
- eval-runnerSkill
- feature-devSkill
- frontend-designSkill
- hpc-deucalionSkill
- internal-commsSkill
- langchainSkill
- langfuseSkill
- langgraphSkill
- llm-observability-stackSkill
- mcp-builderSkill
- neo4j-verifySkill
- pdfSkill
- pptxSkill
- project-conventionsSkill
- python-best-practicesSkill
- react-namingSkill
- security-hooksSkill
- service-verifySkill
- skill-creatorSkill
- skill-inspectorSkill
- slack-gif-creatorSkill
- sprint-contractSkill
- theme-factorySkill
- uml-modelingSkill
- webapp-testingSkill
- web-artifacts-builderSkill
- web-debugSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 59
Read CSV files from data/phaseN/ directory
- Very specific: line 106
All nodes must have case property set:
- Distinctive: line 171
Run Phase 1 before Phase 2
- Distinctive: line 172
Check for existing data before CREATE
- Distinctive: line 173
Use MERGE instead of CREATE when appropriate
- Very specific: line 174
Always set case property for isolation
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ETL Runner Skill
Runs ETL scripts correctly to populate Neo4j knowledge graphs.
When to Activate
- Running any ETL script
- Loading data into Neo4j
- Checking ETL results
- Troubleshooting missing data
ETL Port Rule (CRITICAL)
ETL uses HTTP protocol, not Bolt.
| Protocol | Port | Use |
| HTTP | 7475 | ETL scripts |
| Bolt | 7688 | Direct DB access (not for ETL) |
Command Templates
Standalone ETL Script (preferred)
PYTHONPATH=. python [case_path]/etl/01_load_regulation.pyVia Generic Runner
PYTHONPATH=. python -c "
from core.kg.etl_base import run_etl
run_etl('[case_path]/etl')
"Via Make
make etl CASE=[case_name] PHASE=[1|2|3]ETL Phases
| Phase | What it loads | Order |
| Phase 1 | Regulations, domains, subdomains, articles, clauses | First |
| Phase 2 | Obligations, goals, clause-subdomain mappings | Second |
| Phase 3 | Strategic tensions, complementarity, timelines | Third |
Always run Phase 1 before Phase 2 before Phase 3
ETL Script Structure
Each ETL script should:
- Read CSV files from
data/phaseN/directory - Connect via HTTP (port 7475)
- Set
caseproperty on all nodes for isolation - Print progress with ✓ and ✗ markers
Expected Script Pattern
from pathlib import Path
from neo4j import GraphDatabase
def exec_cypher(query, params=None):
"""Execute via HTTP API"""
import os
uri = os.getenv("NEO4J_HTTP_URL", "http://localhost:7475")
# ... execute query
def run(neo4j_config):
"""Main entry point"""
csv_dir = Path(__file__).parent.parent / "data" / "phase1"
# ... load CSVs, create nodes, set case property
print("✓ Loaded N nodes")Verification Steps
Step 1 — Run ETL
PYTHONPATH=. python [script_path]Step 2 — Verify Data Loaded
# Check node counts per phase
python -c "
from neo4j import GraphDatabase
import os
d = GraphDatabase.driver('bolt://localhost:7688', auth=('neo4j', os.getenv('NEO4J_PASSWORD', '')))
s = d.session()
# Check with case filter
count = s.run('MATCH (n:Regulation) WHERE n.case = \"case1\" RETURN count(n)').single()[0]
print(f'Regulation nodes: {count}')
s.close()
"Step 3 — Verify Case Property
All nodes must have case property set:
// Should return ONLY current case nodes
MATCH (n) WHERE n.case = "case1" RETURN count(n)Common Bug Patterns
❌ WRONG — Hardcoded port
uri = "http://localhost:7474" # WRONG✅ CORRECT — From environment
import os
uri = os.getenv("NEO4J_HTTP_URL", "http://localhost:7475")❌ WRONG — No case property
# Creates nodes without case isolation
CREATE (r:Regulation {name: "GDPR"})✅ CORRECT — With case property
CREATE (r:Regulation {name: "GDPR", case: "case1"})ETL Error Handling
| Error | Cause | Fix |
| Connection refused | Wrong port or Neo4j not running | Check 7475, check docker |
| File not found | Wrong CSV path | Check data/phaseN/ exists |
| Duplicate nodes | Running ETL twice | MATCH first, then CREATE |
| Missing relationships | Wrong order | Run phases sequentially |
Output Format
## ETL Results
**Script:** [script_name]
**Phase:** [1|2|3]
**Case:** [case_name]
### Execution
✓ Loaded 150 Regulation nodes
✓ Loaded 23 Domain nodes
✓ Loaded 89 Subdomain nodes
✗ Failed: Constraint error on Article:45
### Verification
Regulation nodes: 150
Domain nodes: 23
Subdomain nodes: 89
**Verdict:** PARTIAL (1 error)
**Next step:** Fix Article:45 constraintSafety Rules
- Run Phase 1 before Phase 2
- Check for existing data before CREATE
- Use MERGE instead of CREATE when appropriate
- Always set
caseproperty for isolation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

