graph-modeler
npx machina-cli add skill a5c-ai/babysitter/graph-modeler --openclawGraph Modeler Skill
Purpose
Convert problem descriptions into appropriate graph representations, identifying entities as nodes and relationships as edges.
Capabilities
- Entity-to-node mapping from problem text
- Relationship-to-edge mapping
- Graph property detection (bipartite, DAG, tree, etc.)
- Suggest optimal representation (adjacency list vs matrix)
- Generate graph visualization
- Identify implicit graph structures
Target Processes
- graph-modeling
- shortest-path-algorithms
- graph-traversal
- advanced-graph-algorithms
Graph Modeling Framework
- Entity Identification: What objects/states become nodes?
- Relationship Analysis: What connections become edges?
- Edge Properties: Directed? Weighted? Capacities?
- Graph Properties: Special structure to exploit?
- Representation Choice: List vs matrix vs implicit?
Input Schema
{
"type": "object",
"properties": {
"problemDescription": { "type": "string" },
"constraints": { "type": "object" },
"examples": { "type": "array" },
"outputFormat": {
"type": "string",
"enum": ["analysis", "code", "visualization"]
}
},
"required": ["problemDescription"]
}
Output Schema
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"nodes": { "type": "object" },
"edges": { "type": "object" },
"properties": {
"type": "object",
"properties": {
"directed": { "type": "boolean" },
"weighted": { "type": "boolean" },
"bipartite": { "type": "boolean" },
"dag": { "type": "boolean" },
"tree": { "type": "boolean" }
}
},
"representation": { "type": "string" },
"suggestedAlgorithms": { "type": "array" }
},
"required": ["success"]
}
Source
git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/specializations/algorithms-optimization/skills/graph-modeler/SKILL.mdView on GitHub Overview
The Graph Modeler converts problem descriptions into graph representations by identifying entities as nodes and relationships as edges. It detects graph properties (bipartite, DAG, tree, etc.) and suggests the optimal representation (adjacency list vs matrix), plus it can generate visualizations and reveal implicit structures.
How This Skill Works
It analyzes the problem description to identify objects or states as nodes and connections as edges. It then determines edge properties (directed, weighted, capacities) and checks for special graph structures (bipartite, DAG, tree). Finally, it recommends a representation (list, matrix, or implicit) and outputs a graph-ready model along with optional visualization.
When to Use It
- Modeling network routing or transportation problems to derive shortest paths
- Representing project tasks and dependencies to analyze schedules
- Analyzing social networks or collaboration graphs to study relationships
- Planning supply chains with entities and flow constraints
- Exploring implicit structures in problem statements to simplify algorithms
Quick Start
- Step 1: Provide a problemDescription that outlines objects and relations
- Step 2: Include constraints and any known edge properties (directed, weighted)
- Step 3: Specify outputFormat (analysis, code, visualization) and request a graph model
Best Practices
- Start by extracting a comprehensive list of entities before mapping edges
- Explicitly specify edge directions, weights, and capacities when relevant
- Validate the graph with a small, concrete example to check consistency
- Choose representation based on typical operations (traversal vs updates)
- Document assumptions about unlabeled nodes or ambiguous relationships
Example Use Cases
- Road network modeling for a city to compute fastest routes
- Task dependency graph in a software release plan
- Bipartite matching for job assignment between applicants and roles
- Social graph analysis of followers and interactions on a platform
- Workflow graphs in manufacturing to optimize process steps