Where to Find the LangGraph Workflow in SkillSpector: Complete Guide

The LangGraph workflow in SkillSpector is defined in src/skillspector/graph.py within the create_graph() function, which wires together analyzers, resolvers, and reporters into a single executable graph using the state schema declared in src/skillspector/state.py.

SkillSpector is an NVIDIA open-source project that leverages LangGraph to orchestrate complex skill analysis pipelines. Understanding the LangGraph workflow in SkillSpector requires knowing exactly where the graph is constructed, how state flows between nodes, and where individual processing steps are implemented. This guide maps the precise file locations and function signatures that define the workflow architecture according to the NVIDIA/SkillSpector source code.

Core Workflow Definition in graph.py

The primary entry point for the entire workflow resides in src/skillspector/graph.py. This module contains the factory logic that instantiates and connects all processing nodes into a cohesive LangGraph structure.

The create_graph() Function

Within src/skillspector/graph.py, the create_graph() function serves as the central factory for the LangGraph instance. This function instantiates each node—including analyzers, resolvers, and reporters—and connects their inputs and outputs to form a complete execution pipeline. When invoked, create_graph() returns a ready-to-run graph object that can process skill directories and generate analysis reports.

State Schema Declaration

The workflow relies on a strongly-typed state definition located in src/skillspector/state.py. The State class describes the data structure that flows through the graph, including the list of skills to analyze, intermediate analysis results, and final artifacts. This schema ensures type safety and consistent data passing between nodes in the LangGraph workflow.

Node Architecture and Implementation

Individual processing steps are modularized in the src/skillspector/nodes/ package. This directory contains the concrete implementations of each node that create_graph() assembles into the workflow.

Key Node Components

The nodes package includes several critical components:

  • resolve_input: Handles initial ingestion and normalization of skill inputs
  • meta_analyzer: Performs high-level analysis of skill metadata
  • deduplicate: Removes redundant entries from the skill list
  • report: Generates final output artifacts from collected analysis

Each node is imported and wired into the graph within create_graph(), allowing the workflow to execute sequentially while maintaining state throughout the pipeline.

Supporting Infrastructure

Additional files provide the supporting infrastructure necessary for the workflow to operate.

Shared Models (models.py)

The src/skillspector/models.py file defines Pydantic models used across multiple nodes. These shared data structures ensure consistency in how skill data is represented and validated throughout the LangGraph workflow.

CLI Integration (cli.py)

The src/skillspector/cli.py module provides a thin command-line wrapper that invokes create_graph(). This allows users to execute the full LangGraph workflow directly from the terminal without writing custom Python scripts.

Executing the LangGraph Workflow

To run the workflow programmatically, import the factory function and invoke it with an initial state dictionary:

from skillspector.graph import create_graph

# Build the graph (internally wires all nodes)

graph = create_graph()

# Execute with initial state

result = graph.invoke({"skill_dir": "/path/to/skills"})
print(result)

This example demonstrates how create_graph() abstracts the complexity of node wiring, presenting a clean interface for executing the complete analysis pipeline.

Summary

  • src/skillspector/graph.py contains the create_graph() function that defines the LangGraph workflow architecture and wires all nodes together
  • src/skillspector/state.py declares the State class managing data flow between nodes with type-safe schema validation
  • src/skillspector/nodes/ houses individual node implementations including resolvers, analyzers, and reporters
  • src/skillspector/models.py provides shared Pydantic models for consistent data validation across the workflow
  • src/skillspector/cli.py offers a command-line interface wrapper for executing the workflow without custom code

Frequently Asked Questions

Where is the LangGraph workflow entry point in SkillSpector?

The entry point is the create_graph() function located in src/skillspector/graph.py. This function instantiates all nodes from src/skillspector/nodes/ and returns a compiled LangGraph object ready for execution via the .invoke() method.

How does state management work in the SkillSpector workflow?

State management is handled through the State class defined in src/skillspector/state.py. This class defines the schema for data flowing through the graph, including skill lists and analysis results, ensuring type-safe transitions between nodes in the LangGraph pipeline.

Which directory contains the node implementations for the SkillSpector graph?

Individual node implementations are stored in the src/skillspector/nodes/ directory. This package contains modules for input resolution, meta-analysis, deduplication, and reporting that the create_graph() function assembles into the complete workflow.

Can I run the SkillSpector LangGraph workflow from the command line?

Yes, the src/skillspector/cli.py module provides a command-line interface that wraps the create_graph() function. This allows direct execution of the LangGraph workflow without requiring custom Python scripting, making it accessible for automation and CI/CD pipelines.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →