skills/beam/beam-tools/graph-slicer/SKILL.md
Slice Beam.ai agent graphs into separate node files with topology-aware naming and Mermaid flowchart generation. Supports both exported JSON files with graphTools arrays AND direct Beam API responses with embedded toolConfiguration. Handles all fill types (static, linked, ai_fill) with appropriate rendering. Use when users want to split an agent graph into individual node files.
npx skillsauth add beam-ai-team/beam-next-skills graph-slicerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Extract individual tools from a Beam.ai agent graph into separate files with topology-aware naming and automatic Mermaid flowchart generation.
This skill processes Beam.ai JSON files containing graph objects and:
3.1-ToolName.md for level 3, branch 1)The script automatically detects and handles two JSON structures:
[{
"agent": {...},
"graph": {
"nodes": [...], // Graph topology with childEdges
...
},
"graphTools": [...], // Separate tool definitions
"sampleAgentTasks": [...]
}]
{
"graph": {
"nodes": [
{
"id": "...",
"objective": "...",
"toolConfiguration": {
"toolName": "...",
"inputParams": [...],
"outputParams": [...],
"originalTool": {
"prompt": "..."
}
},
"childEdges": [...]
}
]
}
}
When graphTools array is empty or missing, the script automatically extracts tool data from each node's embedded toolConfiguration, including prompts from originalTool.prompt.
Locate the JSON file containing the graph structure. This can be:
get_agent_graph.pyAsk the user: "Which output mode would you like?"
CRITICAL - ALWAYS ASK: "Where should I create the nodes/ folder?"
Check for existing files:
nodes/ folder already exists at the target location, STOPBased on user choices, run with the appropriate flags:
Creates clean documentation for human reading:
node 03-skills/graph-slicer/scripts/slice_graph.js <input-file> --markdown --output <output-dir>
If user chose same directory as input file, omit --output flag:
node 03-skills/graph-slicer/scripts/slice_graph.js <input-file> --markdown
Output in nodes/ folder:
GRAPH.md - High-level overview with:
1-ToolName.md, 2.1-AnotherTool.md, etc.
Example markdown output:
# 1 - B2B Data Processing Tool
**Level**: 1
**Branch**: 0
**Tool Name**: B2B Data Processing Tool
## Description
This tool is designed to process and verify company data...
## Input Parameters
**new_customer_json** `string` *(ai_fill)*: Data of a new customer provided...
## Prompt
\`\`\`
## Role
You are a precise data extraction assistant...
\`\`\`
## Output Parameters
**registration_vat_id** `string`: Extract from root level field 'taxId'...
Creates enriched JSON with topology metadata:
node 03-skills/graph-slicer/scripts/slice_graph.js <input-file> --json --output <output-dir>
Output in nodes/ folder:
1-ToolName.json, 2.1-AnotherTool.json, etc._topology metadata block (level, branch, edges, conditions)Level numbering (both modes):
Tool files include:
_topology metadata block with:
level, branch, levelNumbernodeId, objectiveonError, evaluationCriteriaincomingEdges (parent nodes + conditions)outgoingEdges (child nodes + conditions)isExitNode flagGRAPH.md includes:
0 - Entry Node (1 branches)
1 - B2B Data Processing Tool (3 branches)
2.1 - Beam Task URL Generator (1 branches)
2.2 - Beam Task URL Generator (1 branches)
2.3 - Logging Assistant [EXIT]
3.1 - No VAT ID Report Generator (1 branches)
3.2 - VAT ID Format Determination Tool (2 branches)
...
flowchart TD
classDef entry fill:#2d5016,stroke:#4a7c2c,stroke-width:3px,color:#fff
classDef exit fill:#8b2252,stroke:#b8255f,stroke-width:3px,color:#fff
classDef router fill:#1e5a8e,stroke:#2b7dc1,stroke-width:2px,color:#fff
classDef processor fill:#6b5d0f,stroke:#9c8718,stroke-width:2px,color:#fff
Entry_Node[("0<br/>Entry")]:::entry
B2B_Data_Processing_Tool{"1<br/>B2B Data Processing Tool"}:::router
...
About JSON Structure:
data[0] or data['0']graphTools array using toolFunctionNametoolConfiguration when graphTools is empty (Beam API responses)toolConfiguration.originalTool.promptGraph Metadata Captured:
childEdgesUse Cases:
The skill handles three fill types for input parameters, rendering each appropriately:
fillType: "static")Parameters with fixed values set in the Beam UI. The markdown output shows:
staticValue content{name, content} objects): renders with syntax highlightingExample output:
**language** `string` *(static)*
**Value**: `python`
> Name of the programming language
fillType: "linked")Parameters that receive their value from a previous node's output. The markdown output shows:
linkOutputParam.paramName)Example output:
**stdin** `string` *(linked)*
**Linked to**: `country_tax_rate_array`
> Source parameter description: Return ONLY a valid JSON array...
**Example value**:
\`\`\`json
[{"country":"FINLAND","tax_rate":"25.5","tax_amount":"0.00"}]
\`\`\`
fillType: "ai_fill")Parameters where the AI determines the value based on instructions. The markdown output shows:
paramDescription)Example output:
**tax_details** `string` *(ai_fill)*
**AI Instructions**:
Extract the tax details from the Airtable response...
**Example**:
\`\`\`
{"country": "GERMANY", "tax_rate": "19"}
\`\`\`
node.toolConfiguration when graphTools array is empty. Added description section and data type annotations to markdown output. Now works with direct Beam API responses.graphTools array.testing
Audit registry.yaml against disk, validate SKILL.md frontmatter, find duplicates and orphans. Load when user says 'audit skills registry', 'validate beam-next-skills', 'registry drift', 'skills catalog audit', 'check registry yaml'.
tools
All Workable ATS operations — fetch JDs, search candidates, post assessments/reviews. Load when user says "fetch JD", "search workable", "push to workable", "post review", "rate candidate", "workable", "push assessment", "list jobs", or after interview-coach completes an evaluation. Replaces workable-fetch-jd and workable-push-assessment.
data-ai
Load when user mentions "tavily research", "market intelligence", "competitive research", "GTM research", or needs real-time market data for sales, marketing, or vertical strategy.
development
Shared resource library for Slack integration skills. DO NOT load directly - provides common references (setup, API docs, error handling, authentication) and scripts used by slack-connect and individual Slack skills.