features:graph

A command that rebuilds a Mermaid dependency graph in a features README. Mermaid is a text format used to render diagrams from structured descriptions.

In plain words
What is it for?
Use it to find feature files, read their metadata, validate dependency links, detect cycles, and regenerate the graph.
Why use it?
It keeps the feature diagram aligned with the feature files and warns about missing or circular dependencies. A dependency is a feature that another feature relies on.

Command

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.

agentmods
npx agentmods add commands/ruslan-korneev/claude-plugins/features-graph
Clone the repo
git clone --depth 1 https://github.com/ruslan-korneev/claude-plugins
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,040 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00014 $0.01040
Opus 5 $0.00007 $0.00520
Sonnet 5 $0.00003 $0.00208
Haiku 4.5 $0.00001 $0.00104

Measured 2d ago against content hash 9a3caa724949, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

features:graph 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 2d 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.

plugins/tech-lead/commands/features-graph.md · 233 lines

How it starts

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

Command /feature-list:graph

Regenerate the Mermaid dependency graph in the features README.

Instructions

Step 1: Find All Feature Files

Use Glob to find all feature files:

docs/technical-requirements/features/*.md

Exclude:

  • README.md
  • 00-template.md

Step 2: Parse Feature Frontmatter

For each feature file, read and parse YAML frontmatter:

---
id: core-01
title: User Management
phase: core
status: completed
dependencies:
  - integration-01
---

Extract:

  • id — Feature identifier
  • title — Display name
  • phase — Category for grouping
  • status — For status icon
  • dependencies — Links to other features

Step 3: Validate Dependencies

Check each dependency exists:

all_ids = {f.id for f in features}
for feature in features:
    for dep in feature.dependencies:
        if dep not in all_ids:
            warnings.append(f"{feature.id} → {dep} (not found)")

Check for circular dependencies:

# Use DFS to detect cycles
def has_cycle(node, visited, rec_stack):
    visited.add(node)
    rec_stack.add(node)
    for dep in graph[node]:
        if dep in rec_stack:
            return True  # Cycle detected
        if dep not in visited and has_cycle(dep, visited, rec_stack):
            return True
    rec_stack.remove(node)
    return False

Step 4: Generate Mermaid Graph

Build the Mermaid flowchart:

flowchart TD
    subgraph Core
        core-01[User Management ✅]
        core-02[Product Catalog 🔄]
    end

    subgraph Workflow
        workflow-01[Checkout 📝]
    end

    subgraph Integration
        integration-01[Email Service ✅]
    end

    workflow-01 --> core-01
    workflow-01 --> core-02
    workflow-01 --> integration-01

Status icons:

  • — completed
  • 🔄 — in_progress
  • 📝 — draft

Step 5: Update README

Read docs/technical-requirements/features/README.md

Find the markers:

<!-- dependency-graph:start -->
...existing content...
<!-- dependency-graph:end -->

Read the full file on GitHub · 233 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. 2d ago First seen · 233 lines · 14 tokens per session scan A 9a3caa724949

Subscribe to this mod's changes

features:graph is a command published in the GitHub repository ruslan-korneev/claude-plugins (4 stars, last pushed 6mo ago), licensed MIT. It adds 14 tokens to every session and 1,040 once invoked, about $0.0001 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.