graph-db-writes

graph-db-writes is a skill for Claude Code, Codex from samugit83/redamon. It costs 174 tokens per session (4,518 once invoked), scanned A, original, MIT.

A set of rules for writing project data to a Neo4j graph in RedAmon, a security-reconnaissance application. It explains which records need project and user identifiers, where graph-writing methods belong, and which schema locations must change together.

In plain words
What is it for?
Use it when adding or changing Cypher that writes findings, nodes, relationships, or properties, especially in graph database mixins or tools that save scan results.
Why use it?
It prevents data from different projects being silently merged and avoids overwriting information owned by another tool. It also keeps shared reference records, such as CVEs, from being incorrectly duplicated per project.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding or changing Cypher that writes findings, nodes, relationships, or properties, especially in graph database mixins or tools that save scan results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/samugit83/redamon/graph-db-writes
About the project

RedAmon is an AI framework that connects reconnaissance, exploitation, and post-exploitation activities into an automated security-testing pipeline, while organizing findings and proposing code fixes. It is for authorized penetration testing, security research, and education. The catalogue entries provide skills and instructions for working with the framework.

samugit83/redamon · 3,640 stars · on GitHub · redamon.org

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add samugit83/redamon --skill graph-db-writes
Clone the repo
git clone --depth 1 https://github.com/samugit83/redamon

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graph-db-writes

README.md
[![agentmods](https://agentmods.dev/badge/skills/samugit83/redamon/graph-db-writes/github.svg)](https://agentmods.dev/skills/samugit83/redamon/graph-db-writes)
Your own site
<a href="https://agentmods.dev/skills/samugit83/redamon/graph-db-writes"><img src="https://agentmods.dev/badge/skills/samugit83/redamon/graph-db-writes/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for graph-db-writes

Your own site · 80×15
<a href="https://agentmods.dev/skills/samugit83/redamon/graph-db-writes"><img src="https://agentmods.dev/badge/skills/samugit83/redamon/graph-db-writes.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 174 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,518 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00174 $0.04518
Opus 5.5 $0.00070 $0.01807
Sonnet 5.5 $0.00035 $0.00904
Haiku 4.5 $0.00017 $0.00452

Measured 7d ago against content hash c8e89d5d9ae8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

graph-db-writes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/graph-db-writes/SKILL.md · 251 lines

How it starts

The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When to Use

  • Adding or changing any Cypher that writes nodes/relationships/properties, in a graph_db mixin or a scan tool that persists to the graph.

For placing a whole new recon tool (which includes its graph write), use recon-tool-integration; this skill is the graph-write rules it depends on.


Critical Rules

  • NEVER add the tenant key to a reference node, and NEVER omit it from an entity node. Entity nodes (per-project findings) MERGE on {<natural_key>, user_id, project_id} - the tenant-isolation triple. A MERGE missing user_id/project_id merges one project's data into another's, silently. Global reference nodes (e.g. CVE) key on their natural id only (MERGE (c:CVE {id: $cve_id})); adding tenant keys there fragments shared data.
  • NEVER edit graph_db/neo4j_client.py directly. It is a thin orchestrator that combines the mixins by inheritance. Graph methods live in the mixin for their domain (see the table below).
  • NEVER unconditionally SET a field another tool owns. Use ON CREATE SET for provenance/first-writer fields (e.g. source) so a later tool merging the same node does not clobber them; use plain SET only for this tool's own enrichment fields. Reference: the ON CREATE SET bu.source = 'graphql_scan' merges in graph_db/mixins/graphql_mixin.py.
  • NEVER collect a field in a tool and not write it to the graph. Every field in the tool's output dict must land on a node property or relationship, or it is silent data loss. If it fits no node, map it to the closest property or say why it is dropped.
  • NEVER put a map, or a list of maps, in a property. Neo4j rejects it, so SET v += $props fails the whole node write and the mixin's per-finding except turns that into a silently dropped finding. Flatten first: nuclei's cves arrive as {id,cvss,url} maps and are stored as id strings via nuclei_cve_ids in graph_db/mixins/recon/vuln_mixin.py.
  • NEVER delete a finding a person has touched, and NEVER clear findings up front. A scan MERGEs its findings (which refreshes updated_at) and afterwards prunes the ones it did not touch - ingest-then-prune, never clear-then-ingest. A half-failed scan that reported nothing would otherwise empty the project, so the CALLER decides whether to prune and only does so after an ingest that actually produced findings. Nodes an operator muted and ones carrying triage_source = 'human' are never deleted, only stamped stale_since: they hold an operator's mute, verdict and the fix items written against them. A mute a node-filter RULE applied (muted_by starting rule:) is not a person's decision and is pruned like any stale finding. Reference: prune_unseen_findings in graph_db/mixins/base_mixin.py, and the four clears that spare them. A delete that spares muted findings takes the node's write lock (SET n._prune_lock = true REMOVE n._prune_lock) BEFORE it reads n:Muted, or a mute committing in between is deleted with the node. An external agent's MCP mute keeps the owner's id in muted_by, so it is kept like a person's; its muted_channel/muted_token stamp must be REMOVEd by every unmute and cleared by every other mute, or a later mute inherits it.
  • NEVER prune a source or host the run could not re-check (circuit breakers). When a data provider was paused or a scan host was skipped, "not seen this run" does NOT mean "gone". The caller passes keep_hosts (anchored regexes, matched against _KEEP_HOST_FIELDS with toStringOrNull, passed as a Cypher parameter) to prune_unseen_findings, and skips the prune entirely for a degraded source. A finding that names hosts in a list (source_urls) is matched on every element too (_KEEP_HOST_LIST_FIELDS): toStringOrNull of a list is null, so a list field missing from that tuple keeps nothing. Host names may contain _ (_dmarc.example.com); the coverage accumulator and _KEEP_HOST_CHARS must keep accepting it, or such a host drops out of every note. What was cut is recorded on the coverage record of the org Domain (one per registrable domain), merged across the run's groups of that org — recon_coverage_at, recon_coverage_gaps (each entry tagged with its scan root), recon_skipped_hosts, recon_nuclei_truncated, recon_coverage_roots and recon_coverage_run (written by update_graph_coverage in graph_db/mixins/recon/domain_mixin.py, one locked unit of work: the first group of a run overwrites, later ones merge). They are in the webapp's VOLATILE_PROPERTIES, so they never make a Domain read as "changed" in the Recon Delta.
  • ALWAYS give a new host-bound prune source positive coverage. Record the hosts it actually re-checked with circuit_breaker.note_checked(source, hosts=[...], checks=[...]) (a 09.1 coverage record does it through coverage_stamps.note_rows_checked): the prune then deletes its findings only on those hosts (prune_unseen_findings(..., only_hosts=, types=)), so a host it never reached keeps its findings even when nobody called note_degraded. Degraded still wins. Skip it when switched off by configuration, and for a source whose findings carry no host field. A host the source's own filter dropped before asking (a CDN edge, a private address) was decided, not skipped: record it as checked (note_cve_coverage(considered=...) in passive_cve_coverage.py does this for the passive CVE lookups). A source that records only some of its finding types (checks=, as security_check does for its DNS and service probes) also gets one source-level prune for every other type (_checked_prune_batches passes exclude_types=), so the types it does not record still prune as before.
  • NEVER queue a background writer of findings without a _WRITER_SOURCES row in recon/main.py naming the _PHASE_FINDING_SOURCES phase whose sources it writes. A finding the write did not MERGE keeps last run's updated_at, so the prune reads it as gone; with the row, a writer that raises, reports an item error, finds Neo4j unreachable or is never queued notes those sources degraded (graph write failed (<writer>)), which wins over note_checked. A writer of assets only goes in the test's ASSET_ONLY instead: recon/tests/test_graph_writer_failures.py fails a queued writer in neither.
  • NEVER attach to Domain {name: <scan root>}. A writer decides scope and attach separately (graph_db/mixins/recon/scope.py): scan_root_for_host / attach_for_host say whether a host is in scope, and org_for_scan_root names the Domain it hangs off. A deeper scan root that is a target is Subdomain {is_scan_root: true}, never a Domain; only update_graph_from_domain_discovery, update_graph_from_ip_recon and ensure_root_domains may MERGE a Domain (tests/test_no_stray_domain_merge.py).
  • NEVER create, MERGE or re-parent a Vulnerability {source: 'agent'} outside graph_db/agent_vulnerability.py (promote, reanchor; the backfill reuses promote). Its id comes from the finding's key, never a cited id; it lands only on a recon node the project holds (the agent creates none); it keeps exactly one HAS_VULNERABILITY parent and at most one FOUND_AT / AFFECTS_PARAMETER (the report joins on them: a second prints the row twice); promote MERGEs, locks (SET v._agent_lock = true REMOVE v._agent_lock), then reads, and reanchor locks before it reads. agent is in NON_RECON_SOURCES (schema.py), so recon's clears and prune spare it. The other writers touch only their part:

Read the full file on GitHub · 251 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed · +22 lines · +15 tokens per session c8e89d5d9ae8
  2. 21d ago Changed · +69 lines · +40 tokens per session 60c8a81cc683
  3. 1mo ago Changed · +1 lines 4e83806440b0
  4. 1mo ago Changed · +10 lines 992f4922da73
  5. 2mo ago Changed · +16 lines 48dbe4547a4b
  6. 2mo ago Changed · +11 lines 00dee181f8d9
  7. 2mo ago Changed · +2 lines 2aa087768e14
  8. 2mo ago Changed · +11 lines 5c61df7291e3
  9. 2mo ago Changed · +16 lines c07e5e2d0db8
  10. 3mo ago First seen · 93 lines · 119 tokens per session scan A 8e46418748b0

Subscribe to this mod's changes

graph-db-writes is a skill published in the GitHub repository samugit83/redamon (3,640 stars, last pushed 2d ago), licensed MIT. It adds 174 tokens to every session and 4,518 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

graph-db-writes compared with skills from other repositories

graph-db-writes next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
graph-db-writessamugit83/redamonSkill3.6k2d agoMITA174Claude Code, Codex
exploiting-sql-injection-vulnerabilitiesxalgorix/xalgorixSkill1.6kyesterdayApache-2.0A108Claude Code, Codex
pentesting-mssqlxalgorix/xalgorixSkill1.6kyesterdayApache-2.0A65Claude Code, Codex
pentesting-mysqlxalgorix/xalgorixSkill1.6kyesterdayApache-2.0A65Claude Code, Codex
pentesting-oraclexalgorix/xalgorixSkill1.6kyesterdayApache-2.0A69Claude Code, Codex
pentesting-postgresqlxalgorix/xalgorixSkill1.6kyesterdayApache-2.0A72Claude Code, Codex
pentesting-mongodbxalgorix/xalgorixSkill1.6kyesterdayApache-2.0A65Claude Code, Codex