subgraph-access-control

subgraph-access-control is a skill for Claude Code, Codex from AnthonyAlcaraz/agentic-graph-rag-skills. It costs 152 tokens per session (2,253 once invoked), scanned A, original, MIT.

An access-control tool for knowledge graphs, which are databases that store connected facts and relationships. It creates rules for what each agent role may see.

In plain words
What is it for?
Use it to define role-based permissions for graph nodes, relationships, and properties, including privacy and data-erasure rules.
Why use it?
It prevents an agent from traversing into private or unrelated data such as costs, employee records, or personally identifying information.

Skill for Claude CodeCodex

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

Good fit Use it to define role-based permissions for graph nodes, relationships, and properties, including privacy and data-erasure rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anthonyalcaraz/agentic-graph-rag-skills/subgraph-access-control
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 AnthonyAlcaraz/agentic-graph-rag-skills --skill subgraph-access-control
Clone the repo
git clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills

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 subgraph-access-control

README.md
[![agentmods](https://agentmods.dev/badge/skills/anthonyalcaraz/agentic-graph-rag-skills/subgraph-access-control/github.svg)](https://agentmods.dev/skills/anthonyalcaraz/agentic-graph-rag-skills/subgraph-access-control)
Your own site
<a href="https://agentmods.dev/skills/anthonyalcaraz/agentic-graph-rag-skills/subgraph-access-control"><img src="https://agentmods.dev/badge/skills/anthonyalcaraz/agentic-graph-rag-skills/subgraph-access-control/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 subgraph-access-control

Your own site · 80×15
<a href="https://agentmods.dev/skills/anthonyalcaraz/agentic-graph-rag-skills/subgraph-access-control"><img src="https://agentmods.dev/badge/skills/anthonyalcaraz/agentic-graph-rag-skills/subgraph-access-control.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 152 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,253 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.
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.00152 $0.02253
Opus 5 $0.00076 $0.01126
Sonnet 5 $0.00030 $0.00451
Haiku 4.5 $0.00015 $0.00225

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

Security

Grade A, and why

subgraph-access-control 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 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (cli.py, lib.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/optimization/subgraph-access-control/SKILL.md · 172 lines

How it starts

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

Subgraph Access Control

Overview

An agent with unrestricted access to your knowledge graph is a liability. The dense relationships that make agentic reasoning powerful also mean a single unscoped query can traverse from a public product catalog to internal cost data to employee records. In a graph, everything is reachable from everything else.

Graph databases have mature access-control primitives. Neo4j Enterprise supports privileges at the node-label, relationship-type, and property level: you GRANT traverse rights on specific labels, DENY read access to specific properties, and combine them into role-based policies. A critical design feature is security transparency — when a role lacks permission to see a node, the node is invisible, not access-denied. The agent cannot distinguish data that does not exist from data it is not allowed to see, which blocks an autonomous agent from probing access boundaries as part of its reasoning.

This skill covers the three governance concerns from the chapter: subgraph-level access control (a role per persona, bound at connection time), PII and retention (Rehmer's Privacy-by-Architecture UUID separation with GDPR soft/hard erasure), and the execution graph as a compliance artifact (KG.GOV governance metadata that answers auditor questions as a graph query).

When to Use

  • A graph-backed agent serves multiple personas (SRE, finance) who need different views of the same graph.
  • You must prove which role accessed which data for a compliance review.
  • The graph holds PII and you need GDPR Article 17 erasure that does not cascade across densely connected relationships.
  • You are testing that an access policy does not accidentally starve the agent's reasoning (the "governance blocks the agent" pitfall).

Phrases that should invoke this skill: "who can see what in the graph", "subgraph access control", "role-based graph permissions", "GDPR delete from the graph", "PII in the knowledge graph", "compliance audit of agent decisions".

Read the full file on GitHub · 172 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 172 lines · 152 tokens per session scan A 3a546daed5e8

Subscribe to this mod's changes

subgraph-access-control is a skill published in the GitHub repository AnthonyAlcaraz/agentic-graph-rag-skills (10 stars, last pushed 2mo ago), licensed MIT. It adds 152 tokens to every session and 2,253 once invoked, about $0.0008 per session on Opus 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-31.

Related

Other skills, from other repositories

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

cqrs-implementation

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

wshobson/agents · 35 tokens

projection-patterns

Build read models and projections from event streams. Use when implementing CQRS read sides, building materialized views, or optimizing query performance in event-sourced systems.

wshobson/agents · 36 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

prisma-postgres-setup

Set up a new Prisma Postgres database and connect it to a local project using the Management API. Use when asked to "set up a database", "create a Prisma Postgres project", "get a connection string", "connect my app to Prisma Postgres", or "provision a database".

nitrocloudofficial/nitrostack · 67 tokens

prisma-client-api

Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".

nitrocloudofficial/nitrostack · 64 tokens