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.
Before creating a nodes/ folder or writing sliced node files, show the input file, selected output mode, destination directory, expected generated files, and overwrite risk. Require explicit user approval in the current turn before writing files, and require a second explicit approval before overwriting any existing folder or file. Do not fetch, update, publish, or run Beam agents from this skill.
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.tools
Build a Palantir-shape, PDF-native use-case proposal document for a sophisticated enterprise account: research-grounded use cases (each with description, challenge, impact, value), an operating-graph ontology page, a recommended PoC with a week-by-week plan, and a closing page that asks for one decision. Load when a client asks us to 'propose high-impact use cases', requests a use-case presentation/catalog for a function (finance, HR, ops), or when a technical evaluation team will review candidates to pick a PoC. NOT for single-account cold outreach (use prospect-brief), full process diagnostics (use operating-diagnostic), or priced proposals (use proposal-creation).
development
Convert Beam Figma slide designs into high-fidelity, editable HTML presentation decks. Use when Codex is asked to audit Figma slides, extract slide templates, rebuild Beam slides as HTML decks, decide whether Figma imagery should be exported or rebuilt in HTML/CSS, create Beam/Prism-compatible deck templates, or improve fidelity of existing Beam HTML slide rebuilds.
development
Use the Beam AI reusable slide library: individual HTML slide templates extracted from Beam Figma rebuilds, kept separate from deck themes and full deck templates. Load when the user asks for a slide library, specific Beam slide patterns, reusable Figma-inspired slides, Prism slide-library items, or slide-level HTML templates.
development
Use Beam AI deck and report design packs, HTML templates, and curated examples to create sales decks, customer intro decks, RPO decks, and DIN A4 use-case proposal reports. Load when the user asks for Beam-branded presentation templates, Prism-compatible deck templates, Beam report templates, customer intro decks, commercial proposals, or reusable HTML deck/report examples.