yardoc

Generate YARD annotations for Ruby methods via AST analysis and type inference.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/b08x/syncopated-context --skill yardoc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yardoc
Source: https://github.com/b08x/syncopated-context/tree/main/plugins/rubysmithing/skills/yardoc
Command: npx skills add https://github.com/b08x/syncopated-context --skill yardoc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

YARD documentation generation for Ruby code is often manual and error-prone; this skill automates the creation of precise YARD annotations by performing AST analysis and type inference, ensuring consistency with project conventions and YARD configuration.

Core Features & Use Cases

  • Semantic AST analysis identifies class, module, and method shapes to generate accurate documentation blocks.
  • Automatic generation of @param, @return, @example, and @raise tags with precise types and usage notes.
  • Validation against existing project patterns and YARD configuration to preserve consistency.
  • Seamless integration that inserts or updates YARD comments in source files and provides a post-generation quality report.

Quick Start

Document a Ruby file by applying the yardoc skill to generate YARD annotations in-place.

Frequently Asked Questions about yardoc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically generate YARD documentation for Ruby methods?

Automatically generate YARD documentation for Ruby methods by analyzing AST structures and inferring types to produce @param, @return, @example, and @raise annotations directly in your source files.

How does AST type inference improve Ruby documentation generation?

AST type inference improves Ruby documentation by parsing source code structure to deduce precise method signatures and types, enabling the generation of accurate @param and @return tags without manual annotation.

Can I generate YARD annotations that match my existing project conventions?

Yes, you can generate YARD annotations that match existing project conventions because the tool validates syntax and respects YARD configuration across diverse Ruby codebases, ensuring stylistic consistency.

What is the best way to add @raise and @example tags to Ruby source files?

The best way to add @raise and @example tags to Ruby source files is using semantic AST analysis to automatically insert validated annotations in-place, followed by a quality report.

How do I validate YARD documentation after inserting it into Ruby code?

Validate YARD documentation after insertion by checking the post-generation quality report, which confirms syntax validation and example accuracy after the annotations are written back into the source.