graph-db-writes

graph-db-writes is a skill for Claude Code, Codex from samugit83/redamon. It costs 119 tokens per session (2,354 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,170 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 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,354 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.00119 $0.02354
Opus 5.5 $0.00048 $0.00942
Sonnet 5.5 $0.00024 $0.00471
Haiku 4.5 $0.00012 $0.00235

Measured 20d ago against content hash 48dbe4547a4b, 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 20d 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 · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 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: graph_db/mixins/graphql_mixin.py:189.
  • 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. What was cut is recorded on the Domain coverage record — recon_coverage_at, recon_coverage_gaps, recon_skipped_hosts, recon_nuclei_truncated (written by update_graph_coverage in graph_db/mixins/recon/domain_mixin.py). Those four are in the webapp's VOLATILE_PROPERTIES, so they never make a Domain read as "changed" in the Recon Delta.
  • NEVER write an unscoped MATCH for an entity node. Uniqueness is the (id, user_id, project_id) triple, so a natural id is NOT unique across the database and MATCH (n {id: $id}) can read or write another project's node. Every read and write carries user_id/project_id; agent-facing queries go through scope_query, never inject_tenant_filter alone.
  • ALWAYS reuse an existing node label before inventing one. Discovered hostnames are Subdomain, not a new label. Check graph_db/schema_sections.md first - that is the single declaration of every label, property and relationship.
  • ALWAYS declare a new label / relationship / property in ONE place: graph_db/schema_sections.md, then re-seed with python3 tooling/scripts/seed_schema_catalog.py. A uniqueness key also goes in graph_db/schema_keys.py, from which schema.py renders its CREATE CONSTRAINT statements. Do NOT copy the schema into the prompt or into GRAPH.SCHEMA.md: the prompt splices the catalog in at __GRAPH_SCHEMA__, and GRAPH.SCHEMA.md deliberately no longer lists labels at all. Three copies is what drifted, and four tests now fail if you make a fourth. Editing or removing a line there fails test_the_composed_document_still_contains_the_baseline in recon/tests/test_schema_catalog.py (additions pass: it is a CONTAINS check, so a stale golden file can sit unnoticed). Refresh the fixture in the same commit with the command in that test's docstring, then read the fixture diff. Still update NODE_COLORS in webapp/src/app/graph/config/colors.ts, which is presentation, not schema.

Read the full file on GitHub · 149 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. 20d ago Changed · +16 lines 48dbe4547a4b
  2. 21d ago Changed · +11 lines 00dee181f8d9
  3. 25d ago Changed · +2 lines 2aa087768e14
  4. 1mo ago Changed · +11 lines 5c61df7291e3
  5. 1mo ago Changed · +16 lines c07e5e2d0db8
  6. 1mo 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,170 stars, last pushed yesterday), licensed MIT. It adds 119 tokens to every session and 2,354 once invoked, about $0.0005 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

Other skills, from other repositories

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

stripe-projects

Use when the user wants to provision infrastructure or third-party services using Stripe Projects. Triggers: "I need a database", "set up auth", "add caching", "give me a Postgres", "provision Redis", "I need hosting", "add a vector DB", "get me an API key for X", "get credentials for X", "sign up for a service", "set…

stripe/ai · 213 tokens

detecting-shadow-api-endpoints

Discover and inventory shadow API endpoints that operate outside documented specifications using traffic analysis, code scanning, and API discovery platforms.

xalgorix/xalgorix · 30 tokens

implementing-aes-encryption-for-data-at-rest

AES (Advanced Encryption Standard) is a symmetric block cipher standardized by NIST (FIPS 197) used to protect classified and sensitive data. This skill covers implementing AES-256 encryption in GCM m.

xalgorix/xalgorix · 52 tokens

whatsapp-db-skill

Query WhatsApp database for contacts, groups, channels, and chat history. Look up contact info, search groups, manage channels, retrieve messages.

zeenie-ai/OpenCompany · 35 tokens

codex-autoresearch

Triage improvement work and run or resume accepted measured loops in a local project. Architecture, documentation, UX, product study, open research, taste, and one-shot fixes stay direct unless the user explicitly requests repeated measurement with a complete experiment contract.

TheGreenCedar/codex-autoresearch · 55 tokens