agentleFS
pauloribeiro16pauloribeiro16/my-skills/neo4j-verify/SKILL.md

neo4j-verify

Skill1 starsChanged 6 months agoMITView on GitHub

Use before and after any Neo4j-related work. Verifies correct ports (7688/7475), connection settings, and detects hardcoded port bugs. Critical for data integrity.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before running ETL scripts

    line 12
  2. Distinctive:

    After editing any file with Neo4j connection

    line 13
  3. Distinctive:

    Before validation of ETL results

    line 14
  4. Distinctive:

    When troubleshooting connection issues

    line 15
  5. Distinctive:

    When data seems wrong or missing

    line 16
  6. Distinctive:

    If found → FAIL → Fix immediately

    line 36
  7. Distinctive:

    Check that all Neo4j connections read from:

    line 40

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Neo4j Verify Skill

Ensures Neo4j connections use correct ports and detects hardcoded port bugs.

When to Activate

  • Before running ETL scripts
  • After editing any file with Neo4j connection
  • Before validation of ETL results
  • When troubleshooting connection issues
  • When data seems wrong or missing

Port Rules (CRITICAL)

ServiceBoltHTTPPurpose
AEGIS KG76887475This project
D3Fend (NOT this)76877474External

Any occurrence of 7687 or 7474 in core/ or cases/ = BUG

Verification Steps

Step 1 — Check for Hardcoded Ports

# Should return NOTHING
grep -r "7474\|7687" core/ cases/

If found → FAIL → Fix immediately

Step 2 — Verify Connection Config

Check that all Neo4j connections read from:

  • Environment variables (.env), OR
  • Case config (case.yaml), OR
  • Config loader (config.py)

Never hardcode:

  • bolt://localhost:7687
  • http://localhost:7474
  • '7687' or '7474' as strings

Step 3 — Test Connection

# Verify can connect to correct port
python -c "
from neo4j import GraphDatabase
import os
uri = os.getenv('NEO4J_URI', 'http://localhost:7475')
print(f'Testing {uri}')
d = GraphDatabase.driver(uri.replace('http', 'bolt'), auth=('neo4j', os.getenv('NEO4J_PASSWORD', '')))
s = d.session()
result = s.run('RETURN 1 as n').single()
print(f'Connection: {'OK' if result else 'FAIL'}')
s.close()
"

Step 4 — Verify Data Loaded

# Quick count check for expected data
python -c "
from neo4j import GraphDatabase
import os
d = GraphDatabase.driver('bolt://localhost:7688', auth=('neo4j', os.getenv('NEO4J_PASSWORD', '')))
s = d.session()
# Adapt this query to your case
count = s.run('MATCH (n:Regulation) RETURN count(n) as c').single()[0]
print(f'Regulation nodes: {count}')
s.close()
"

Common Bug Patterns

❌ WRONG

driver = GraphDatabase.driver("bolt://localhost:7687", ...)
uri = "http://localhost:7474"

✅ CORRECT

import os
driver = GraphDatabase.driver(
    os.getenv("NEO4J_URI", "bolt://localhost:7688"),
    auth=(os.getenv("NEO4J_USER", "neo4j"), os.getenv("NEO4J_PASSWORD"))
)

Output Format

## Neo4j Verification

### Port Check
grep -r "7474\|7687" core/ cases/ → [PASS/FAIL]
Found: [list files if any]

### Connection Test
URI: [what was used]
Result: [OK/FAIL]

### Data Check
Regulation nodes: [count]
[Other relevant counts]

**Verdict:** [PASS/FAIL]

If FAIL

  1. Identify files with wrong ports
  2. Fix to use environment variables
  3. Re-run verification
  4. Report what was fixed

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.