← ClaudeAtlas

annotate-source-fileslisted

Add PUT workflow annotations to source files using the correct language-specific comment prefix. Covers annotation syntax, skeleton generation via put_generate(), multiline annotations, .internal variables, and validation. Supports 30+ languages with automatic comment prefix detection. Use after analyzing a codebase and having an annotation plan, when adding workflow documentation to new or existing source files, or when documenting data pipelines, ETL processes, or multi-step computations.
pjt222/agent-almanac · ★ 33 · Data & Documents · score 81
Install: claude install-skill pjt222/agent-almanac
# Annotate Source Files Add PUT workflow annotations to source files so putior can extract structured workflow data and generate Mermaid diagrams. ## When to Use - After analyzing a codebase with `analyze-codebase-workflow` and having an annotation plan - Adding workflow documentation to new or existing source files - Enriching auto-detected workflows with manual labels and connections - Documenting data pipelines, ETL processes, or multi-step computations ## Inputs - **Required**: Source files to annotate - **Required**: Annotation plan or knowledge of the workflow steps - **Optional**: Style preference: single-line or multiline (default: single-line) - **Optional**: Whether to use `put_generate()` for skeleton generation (default: yes) ## Procedure ### Step 1: Determine Comment Prefix Each language has a specific comment prefix for PUT annotations. Use `get_comment_prefix()` to find the correct one. ```r library(putior) # Common prefixes get_comment_prefix("R") # "#" get_comment_prefix("py") # "#" get_comment_prefix("sql") # "--" get_comment_prefix("js") # "//" get_comment_prefix("ts") # "//" get_comment_prefix("go") # "//" get_comment_prefix("rs") # "//" get_comment_prefix("m") # "%" get_comment_prefix("lua") # "--" ``` **Got:** A string like `"#"`, `"--"`, `"//"`, or `"%"`. > **Line and block comments:** putior detects annotations in both line comments (`//`, `#`, `--`) and C-style block comments (`/* */`, `/** */`). For JS/TS, both `//` and