lg:node

lg:node is a command for Claude Code from TheLobbi/claude. It costs 34 tokens per session (4,136 once invoked), scanned A, original, MIT.

A command for creating, changing, connecting, and removing nodes in LangGraph, a Python framework for building workflows as graphs. Nodes are the steps that process information or call tools.

In plain words
What is it for?
Use it to add LLM, tool, human-approval, subgraph, or conditional nodes; connect or remove them; and generate related tests and documentation.
Why use it?
It reduces the manual work of keeping node code, graph connections, state definitions, tests, and documentation consistent. It also checks names, node types, and connections before making changes.

Command for Claude Code

Written for Claude Code: arguments in frontmatter. Also seen: mentions Claude Code.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is --subgraph ./subgraphs/research.py.

Part of the langgraph-architect plugin — 5 commands, 12 agents, 1 MCP server shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add TheLobbi/claude
Claude Code
/plugin install langgraph-architect

Made for: Claude Code.

Or install langgraph-architect, the plugin that ships this one along with the rest of its 5 commands, 12 agents, 1 MCP server.

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 lg:node

README.md
[![agentmods](https://agentmods.dev/badge/commands/thelobbi/claude/node.svg)](https://agentmods.dev/commands/thelobbi/claude/node)
Your own site
<a href="https://agentmods.dev/commands/thelobbi/claude/node"><img src="https://agentmods.dev/badge/commands/thelobbi/claude/node.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,136 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.1 $0.00034 $0.04136
Opus 5 $0.00017 $0.02068
Sonnet 5 $0.00007 $0.00827
Haiku 4.5 $0.00003 $0.00414

Measured today against content hash c95551c8b370, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

lg:node 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 today.

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/plugins/langgraph-architect/commands/node.md · 731 lines

How it starts

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

lg:node - Node Management

Manage nodes in LangGraph graphs including creation, connection, and modification of various node types.

Workflow Steps

Add Node

  1. Validate Input

    • Check project structure
    • Verify node name is unique
    • Validate node type
  2. Generate Node Code

    • Create node function/class
    • Setup node configuration
    • Add error handling
    • Configure retries (if enabled)
  3. Update Graph

    • Add node to graph
    • Configure interrupts (if specified)
    • Update state schema (if needed)
  4. Generate Tests

    • Create node test file
    • Add unit tests
    • Add integration tests
  5. Update Documentation

    • Add node to README
    • Document node behavior
    • Update architecture diagram

Connect Nodes

  1. Validate Connection

    • Check source and target exist
    • Verify no circular dependencies (for non-conditional edges)
    • Validate edge type
  2. Add Edge

    • Add regular edge or conditional edge
    • Update routing logic
    • Configure edge conditions
  3. Update Tests

    • Add edge tests
    • Test routing logic
  4. Update Documentation

    • Update graph visualization
    • Document flow

Remove Node

  1. Analyze Dependencies

    • Find all edges to/from node
    • Check for dependent nodes
    • Identify routing impacts
  2. Remove Components

    • Remove edges
    • Remove node from graph
    • Remove node file
    • Clean up routing
  3. Update Tests

    • Remove node tests
    • Update integration tests
  4. Update Documentation

    • Remove from README
    • Update diagrams

Node Types

LLM Node

Language model processing node.

from langchain_anthropic import ChatAnthropic
from langchain_core.messages import SystemMessage

def llm_node(state: State):
    """LLM processing node."""
    llm = ChatAnthropic(model="claude-sonnet-5")

    system_prompt = "You are a helpful assistant."
    messages = [SystemMessage(content=system_prompt)] + state["messages"]

    response = llm.invoke(messages)
    return {"messages": [response]}

Read the full file on GitHub · 731 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. today First seen · 731 lines · 34 tokens per session scan A c95551c8b370

Subscribe to this mod's changes

lg:node is a command published in the GitHub repository TheLobbi/claude (21 stars, last pushed yesterday), licensed MIT. It adds 34 tokens to every session and 4,136 once invoked, about $0.0002 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-09-05.