rpg-encoder: Skill for Claude Code

.claude/skills/rpg/SKILL.md

rpg is a skill for Claude Code from userFRM/rpg-encoder. It costs 40 tokens per session (1,353 once invoked), scanned A, original, MIT.

A skill for building and querying a semantic code graph, which maps code elements and their relationships across files. RPG-Encoder is the tool it uses to create and search that map.

In plain words
What is it for?
Finding what code does, locating functions, tracing callers and callees, checking dependencies, and exploring cross-file relationships.
Why use it?
It helps answer structural questions without manually searching many files for callers, dependencies, or related code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is userFRM/rpg-encoder's own configuration. It tells Claude Code how to work on rpg-encoder itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rpg-encoder configures →

Reuse

Borrowing it

Nothing to install: this file belongs to userFRM/rpg-encoder. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/userFRM/rpg-encoder/main/.claude/skills/rpg/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/userFRM/rpg-encoder

Made for: Claude Code.

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 rpg

README.md
[![agentmods](https://agentmods.dev/badge/skills/userfrm/rpg-encoder/rpg/github.svg)](https://agentmods.dev/skills/userfrm/rpg-encoder/rpg)
Your own site
<a href="https://agentmods.dev/skills/userfrm/rpg-encoder/rpg"><img src="https://agentmods.dev/badge/skills/userfrm/rpg-encoder/rpg/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 rpg

Your own site · 80×15
<a href="https://agentmods.dev/skills/userfrm/rpg-encoder/rpg"><img src="https://agentmods.dev/badge/skills/userfrm/rpg-encoder/rpg.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,353 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.00040 $0.01353
Opus 5.5 $0.00016 $0.00541
Sonnet 5.5 $0.00008 $0.00271
Haiku 4.5 $0.00004 $0.00135

Measured 2mo ago against content hash 01a2c1a6884b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rpg 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 2mo 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.

.claude/skills/rpg/SKILL.md · 165 lines

How it starts

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

RPG-Encoder — USE BEFORE grep/cat/find

Reach for RPG first, shell commands second

Whenever the user asks about code structure, behavior, relationships, impact, dependencies, or cross-file patterns, reach for RPG commands BEFORE falling back to grep, cat, find, wc, or Read. RPG is indexed, semantically organized, and answers structural questions in one call that would otherwise require dozens of chained text searches.

If you'd otherwise... Use this instead
grep -r by intent rpg-encoder search "describe what it does"
grep -r by name rpg-encoder search "name" --mode snippets
cat file for a function rpg-encoder fetch "file:func"
chained greps for callers rpg-encoder explore ENTITY --direction up
chained greps for callees rpg-encoder explore ENTITY --direction down
wc -l / find / tree rpg-encoder info
reading many files Use the MCP semantic_snapshot tool if available

Fall back to grep / cat / Read only when the query is about literal text (string search, comments, TODOs, log messages) — not structure or semantics.

If you have the RPG MCP server connected, prefer its tools (search_node, fetch_node, explore_rpg, impact_radius, plan_change, semantic_snapshot, context_pack) over the CLI — they're faster and return structured data.


You have access to rpg-encoder, a CLI tool that builds semantic code graphs (Repository Planning Graphs) from any codebase. Use it to understand code structure, search by intent, trace dependencies, and perform autonomous semantic lifting.

Quick Reference

Build a graph (run once per repo)

rpg-encoder build

Detects languages automatically, parses all source files, builds structural hierarchy and dependency edges. Creates .rpg/graph.json. Use --force to rebuild.

Search for code by intent

rpg-encoder search "validate user input"
rpg-encoder search "database connection" --mode features
rpg-encoder search "auth" --mode snippets
rpg-encoder search "parse config" --scope DataProcessing

Read the full file on GitHub · 165 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. 2mo ago First seen · 165 lines · 40 tokens per session scan A 01a2c1a6884b

Subscribe to this mod's changes

rpg is a skill published in the GitHub repository userFRM/rpg-encoder (31 stars, last pushed 5mo ago), licensed MIT. It adds 40 tokens to every session and 1,353 once invoked, about $0.0002 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

coding-assistant

Help users write, review, and debug code.

chinkan/RustFox · 13 tokens

scan-for-defects

Run a multi-pass defect scan across the source codebase, checking for logic errors, error handling gaps, concurrency bugs, security issues, API contract violations, and configuration hazards. Use after the architecture phase is complete. Optionally leverages contracts and protocols outputs for spec-grounded analysis.

HuginnIndustries/CodeCartographer · 62 tokens

scan-for-defects-mechanical

Run the early, mechanical subset of the multi-pass defect scan — local bugs that do not need contracts or protocols context to spot. Run after the architecture phase, before contracts. Covers logic and correctness, error handling and resilience, and configuration and environment hazards. The semantic subset…

HuginnIndustries/CodeCartographer · 88 tokens

scan-for-defects-semantic

Run the deep, semantic subset of the multi-pass defect scan — bugs that need contracts and protocols context to spot. Run after protocols, before porting. Covers concurrency and resource management, security and trust boundaries, and API contract violations (including state machine drift). The mechanical subset…

HuginnIndustries/CodeCartographer · 87 tokens

architecture-diagrams

Author and visually review evidence-based software architecture diagrams as D2 v0.7.1 source rendered with ELK to canonical SVG.

unoplat/unoplat-code-confluence · 31 tokens

proactive-analysis

Automatically run a tech-debt scan before opening a pull request, after large refactors, or when the user asks for a code review — surface actionable findings without being asked.

PierreJanineh/TechDebtMCP · 39 tokens