add-graph-node
Skill1 starsChanged 8 days agoApache-2.0View on GitHub
Use when adding or changing a node, edge, or routing logic in the LangGraph StateGraph under src/neuron_agent/graphs/, or extending MainGraphState.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- omni-reviewSkill
- add-toolSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Check for architectural creep: if this change introduces retrieval, a queue, custom persistence, or a subgraph, stop — AGENTS.md requires a …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add Graph Node
The graph in src/neuron_agent/graphs/ is intentionally simple (ARCHITECTURE.md: START -> agent -> END). Any change here should stay deliberate — this skill sequences the requirements from DEVELOPMENT.md and AGENTS.md so state scope and docs don't drift.
Steps
- Extend
MainGraphStateonly with fields the graph actually owns. Don't add fields for data that belongs inservices/or a tool's own return value — state fields are for what the graph itself routes or persists on (DEVELOPMENT.md). - Keep business logic out of the graph where practical — put it in
services/or a domain module, and have the node call into that (DEVELOPMENT.md,ARCHITECTURE.mdcomponent responsibilities table). - Add explicit edges or conditional routing — no implicit fallthrough. If routing depends on state, make the condition function testable in isolation.
- Add graph tests in
tests/graph/covering:- Happy path
- Failure path (the node's error handling /
AppErrorclassification) - State transitions (fields set/cleared as expected across the edge)
- Update
ARCHITECTURE.md: the graph flow diagram (theflowchart LRunder "Graph Flow") and, if state fields changed, the "State Model" section. - Check for architectural creep: if this change introduces retrieval, a queue, custom persistence, or a subgraph, stop —
AGENTS.mdrequires a concrete requirement and an ADR update underdocs/decisions/before adding any of those, not just a graph change. - Run the quality gates:
make format lint typecheck test security.
Common mistakes
- Adding a state field "just in case" it's useful later — state is typed and shared across the graph; scope creep here is expensive to unwind.
- Routing logic embedded directly in a node function instead of an isolated, testable condition.
- Forgetting to update
ARCHITECTURE.md's Mermaid diagram, so the doc silently drifts from the actual graph shape.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

