Skip to main content

Module parser

Module parser 

Source
Expand description

JSON parsing and format string processing utilities

This module provides functions for:

  • Parsing JSON input from Claude Code
  • Processing format strings with variable substitution
  • Extracting module names from format strings

§Format String Syntax

Format strings use $ prefix for variables that correspond to module names:

  • $directory - Replaced with directory module output
  • $claude_model - Replaced with model information
  • $git_branch - Replaced with current git branch

Example: "$directory $git_branch $claude_model"

Functions§

extract_modules_from_format
Extracts module names from a format string
parse_claude_input
Parses JSON string into ClaudeInput structure
parse_format
Parses format string and substitutes variables with module outputs