Gumroad Prod Console
antiwork/gumroad
Execute read-only Ruby/Rails commands against Gumroad's production database for debugging and investigation.
General YARD documentation rules and workflow for all Ruby source code.
$ npx skills add ruby-git/ruby-git --skill yard-documentation -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ruby-git/ruby-git yard-documentation --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ruby-git/ruby-git.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/yard-documentation .claude/skills/yard-documentation && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "yard-documentation" agent skill from https://github.com/ruby-git/ruby-git/tree/main/.github/skills/yard-documentation into .claude/skills/yard-documentation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yard-documentation", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ruby-git/ruby-git/tree/main/.github/skills/yard-documentationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ruby-git/ruby-git --skill yard-documentation -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ruby-git/ruby-git yard-documentation --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ruby-git/ruby-git.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/skills/yard-documentation .agents/skills/yard-documentation && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "yard-documentation" agent skill from https://github.com/ruby-git/ruby-git/tree/main/.github/skills/yard-documentation into .agents/skills/yard-documentation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yard-documentation", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ruby-git/ruby-git --skill yard-documentation -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ruby-git/ruby-git yard-documentation --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ruby-git/ruby-git.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/skills/yard-documentation .cursor/skills/yard-documentation && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "yard-documentation" agent skill from https://github.com/ruby-git/ruby-git/tree/main/.github/skills/yard-documentation into .cursor/skills/yard-documentation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yard-documentation", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ruby-git/ruby-git.git --path .github/skills/yard-documentation--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ruby-git/ruby-git --skill yard-documentation -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ruby-git/ruby-git yard-documentation --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ruby-git/ruby-git.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/skills/yard-documentation .gemini/skills/yard-documentation && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "yard-documentation" agent skill from https://github.com/ruby-git/ruby-git/tree/main/.github/skills/yard-documentation into .gemini/skills/yard-documentation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yard-documentation", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ruby-git/ruby-git yard-documentationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ruby-git/ruby-git --skill yard-documentation -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ruby-git/ruby-git.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/skills/yard-documentation .github/skills/yard-documentation && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "yard-documentation" agent skill from https://github.com/ruby-git/ruby-git/tree/main/.github/skills/yard-documentation into .github/skills/yard-documentation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yard-documentation", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ruby-git/ruby-git --skill yard-documentation -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ruby-git/ruby-git yard-documentation --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ruby-git/ruby-git.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/skills/yard-documentation .opencode/skills/yard-documentation && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "yard-documentation" agent skill from https://github.com/ruby-git/ruby-git/tree/main/.github/skills/yard-documentation into .opencode/skills/yard-documentation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yard-documentation", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
yard-documentationGeneral YARD documentation rules and workflow for all Ruby source code.
Yard Documentation is an agent skill from ruby-git/ruby-git. General YARD documentation rules and workflow for all Ruby source code. Use when writing or reviewing YARD doc comments, generating missing docs, updating examples, fixing doc errors, or checking documentation coverage.
Its SKILL.md is about 9.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `element-rules.md`).
It works with Ruby. The repository describes itself as: Ruby/Git is a Ruby library that can be used to create, read and manipulate Git repositories by wrapping system calls to the git binary. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit f3bf20f. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
bundlerubyFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
git-scm.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Yard Documentation loads about 9.9k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 3,974 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ruby-git/ruby-git at commit f3bf20f, republished under its MIT licence (© ruby-git). 3,974 words, ~9,869 tokens.
.claude/skills/yard-documentation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.General YARD documentation rules and workflow for all Ruby source code.
@return must always include a type@example blocks@example blocks@example titles are requiredArray<...> (collection) vs Array(...) (tuple)@api private vs @private@api visibility (Required)@since tags are not used@todo tags are not used@abstractAttach this file to your Copilot Chat context, then invoke it with the source files that need YARD updates. Use it when adding new APIs, fixing doc warnings, or improving existing YARD quality and examples.
Work top to bottom: follow the three-step Workflow, reaching into the
Documentation Standards reference below as you write,
and into element-rules.md when documenting a class, module,
constant, attribute, dynamically defined method, or value object.
Git::Commands::Base subclassesSituational rules live in a sibling file, loaded only when the element type calls for it:
element-rules.md — per-element requirements for classes,
modules, constants, attributes, dynamically defined methods, and value
objects (Data.define / Struct.new). Read it whenever you document one
of those elements. Rules for methods and rules that apply to every doc
comment stay in this file.When a more specific YARD skill applies, its rules override this general skill:
Git::Commands::Base subclasses.Git::Repository::* topic modules.Otherwise, the rules in this file apply to all Ruby source.
Documenting or fixing YARD docs follows three steps:
ruby-git uses YARD for API documentation. All classes, modules, constants,
attributes, and methods must have YARD documentation. Methods with Ruby private
visibility require a short description and all applicable tags from the
Method Rules — @param, @return, @raise,
@yield/@yieldparam/@yieldreturn, and @overload — with the exception that
@example may be omitted unless an example materially clarifies the behavior.
Private methods still need YARD docs for developer reference in source, even though
YARD excludes them from generated HTML by default.
Three named limits govern line and description length throughout this skill. They are referenced by name in Step 3 and the Formatting Rules:
LINE_LIMIT (90 characters) — the preferred maximum length of any
physical YARD comment line, measured from column 1 and including every
character: indentation, #, tag metadata, and all text. Wrap prose at
this limit wherever possible.LINE_MAX (120 characters) — the hard ceiling for lines that cannot
be wrapped without breaking their meaning. The following content may
exceed LINE_LIMIT up to LINE_MAX; it must not exceed LINE_MAX:@see tags or markdown links; a URL cannot be split`backtick` span whose content
alone approaches or exceeds LINE_LIMIT[Type] expressions — a type such as
[String, Pathname, Array<String, Pathname>] that fills the tag
metadata column before any description text begins@example code lines — real code inside an example block that
cannot be reflowed without changing its meaningSUMMARY_LIMIT (90 characters) — the maximum length of a short
description — either a tag's description text or a documentable object's short
description (class, module, method, constant, or attribute) — measured by
concatenating the text from the first line with all immediately following
indented continuation lines (stripping the leading # and continuation indent
from each and joining with a single space).
For tags, this covers the description text only — not the tag name, [Type],
option key, or (default).# Find undocumented objects
bundle exec yard stats --list-undoc
# Check a specific file
bundle exec yard doc lib/git/repository.rb --no-outputFollow the YARD documentation templates below and apply the Documentation Standards as you write. Use the standard template when a method has a single call signature. Use the overload template when a method has distinct call signatures with different parameters or return types.
When @overload blocks are present:
@example, @param, @option, @return, overload-specific @raise,
and @yield/@yieldparam/@yieldreturn@return inside each @overload block. For overloaded methods,
@return is overload-scoped even when the return type/text is the same
across call shapes@raise at top level only once (outside all overload blocks)@raise inside an overload only when that exception applies to that
overload shape only@raise in both places (top-level and overload)@note, @deprecated, @see, @api) at top level@api inside an @overload block; it applies to the method
itself, not to an individual call shapeCorrect placement pattern:
# @overload fetch(name)
#
# @param name [String] the remote name
#
# @return [Git::CommandLine::Result] the command result
#
# @overload fetch(name, **options)
#
# @param name [String] the remote name
#
# @param options [Hash] command options
#
# @return [Git::CommandLine::Result] the command result
#
# @raise [ArgumentError] when the remote name is invalid
#
# @api publicIncorrect placement pattern:
# @overload fetch(name)
#
# @param name [String] the remote name
#
# @return [Git::CommandLine::Result] the command result
#
# @raise [ArgumentError] when the remote name is invalid
#
# @overload fetch(name, **options)
#
# @param name [String] the remote name
#
# @param options [Hash] command options
#
# @raise [ArgumentError] when the remote name is invalid
#
# @api publicTrigger: always use @overload for anonymous *, anonymous **, or ...
Anonymous splats and the forwarding parameter give @param, @option, @yield,
and @yieldparam no named parameter to bind to, so YARD silently drops them.
Switch to @overload for the entire signature — see
Documenting anonymous splats with @overload.
@overload)When present, tags must appear in the order shown. @param tags appear in
parameter order, with one exception described below; @option tags appear
immediately after the @param for the hash they describe. Every @option tag
must be preceded by a @param for the options hash, and all @option tags
under that @param must reference the same parameter name. For keyword arguments
(**options or **kwargs), use @param options [Hash] (or the actual splat
name) as the preceding @param.
For public APIs with known option keys, every @option tag must document a real
supported key, such as :force or :timeout. Do not invent placeholder option
keys for a public options hash.
For private helpers that accept arbitrary keyword collectors whose keys are
validated elsewhere, use a neutral splat name such as candidate_keywords and
document the collector shape with a single pseudo-option entry named key_name.
A pseudo-option is required because yard-lint's Documentation/UndocumentedOptions
flags any documented ** collector that has no @option tag, and that check has
no type, name, or visibility exemption for double-splats. Use key_name rather
than a literal-looking key so it is not mistaken for a real option key. This is
only for arbitrary-keyword helpers where the accepted keys are intentionally not
known at that abstraction layer:
# Validate that candidate option keys are listed in `allowed`
#
# @param allowed [Array<Symbol>] the permitted option keys
#
# @param candidate_keywords [Hash<Symbol, Object>] the keywords to validate
#
# @option candidate_keywords [Object] key_name a candidate keyword value
#
# @return [void]
#
# @raise [ArgumentError] when any candidate key is not in `allowed`
#
def assert_valid_opts!(allowed, **candidate_keywords)
endThe exception to parameter order: all @param tags must come before the first
@option tag, because yard-lint's Tags/Order validator rejects a @param that
follows an @option. When a positional parameter follows the options hash in the
signature, document the options-hash @param (and its @option tags) last so the
@option tags stay grouped at the end — that is, move the options-hash @param
after the later positional @param rather than in strict signature order:
# Short description of what the method does
#
# Longer description with more details about behavior,
# edge cases, or important notes.
#
# @example Basic usage
# git = Git.open('/path/to/repo')
# result = git.method_name('arg', {}, '/path')
#
# @example With options
# git.method_name('arg', { option: true }, '/path')
#
# @param name [Type] description of parameter
#
# @param path [String] a parameter that follows the options hash in the signature
#
# @param options [Hash] options hash description
#
# @option options [Type] :key description of option
#
# @return [Type] description of return value
#
# @raise [ArgumentError] when invalid arguments are provided
#
# @raise [Git::FailedError] when git exits with a non-zero exit status
#
# @yield [commit] passes each commit to the block
#
# @yieldparam commit [Git::Object::Commit] a commit object
#
# @yieldreturn [void]
#
# @note This method is not thread-safe
#
# @deprecated Use {#new_method} instead
#
# @see #related_method
#
# @see Git::RelatedClass
#
# @see https://git-scm.com/docs/git-log
#
# @api public
#
def method_name(name, options = {}, path)
endEach @overload block carries only signature-specific tags: @example,
@param, @option, @return, overload-specific @raise, and
@yield/@yieldparam/@yieldreturn. Tags that are not
call-signature-specific — @note, @deprecated, @see, @api — remain
at the top level. @return remains overload-scoped even when identical across
call shapes. @raise can be top-level when shared across all call shapes, and
overload-local when shape-specific. Never place @api inside an overload
block.
# Short description of what the method does
#
# Longer description with more details about behavior,
# edge cases, or important notes.
#
# @overload method_name(arg)
#
# Single-argument form description
#
# @example Basic usage
# result = git.method_name('arg')
#
# @param arg [String] the argument
#
# @return [String] the result
#
# @overload method_name(arg, options)
#
# Two-argument form description
#
# @example With options
# result = git.method_name('arg', { force: true })
#
# @param arg [String] the argument
#
# @param options [Hash] additional options
#
# @return [Array<String>] the results
#
# @raise [ArgumentError] when an invalid argument is provided
#
# @note This method is not thread-safe
#
# @deprecated Use {#new_method} instead
#
# @see #related_method
#
# @see https://git-scm.com/docs/git-log
#
# @api public
#
def method_name(arg, options = {})
endUse this matrix to decide whether to use @overload and where to place tags:
| Method signature or behavior | Documentation form |
|---|---|
Single named signature, no */**/... | Standard template (no @overload) |
Uses anonymous *, **, or ... | @overload required |
| Private arbitrary keyword collector | Neutral splat name plus pseudo-option key_name |
| Multiple call shapes (different params and/or return types) | One @overload per shape |
| Return value for overloaded methods | @return in each overload; never top-level |
| Shared errors across all call shapes | Top-level @raise once (outside overloads) |
| Error only for specific call shape | @raise only in that overload |
| Same error documented top-level and inside overloads | Invalid; choose one placement |
Method-level API visibility (@api) | Top-level @api only; never inside @overload |
@overloadWhen the method signature uses an anonymous splat — def foo(*), def foo(**),
def foo(*, **) — or the argument forwarding parameter def foo(...) —
@param, @option, @yield, and @yieldparam tags have no parameter name
to bind to. RuboCop's Style/ArgumentsForwarding cop prefers these forms when
arguments are forwarded unchanged, so naming the splat (or expanding ...
into *args, **kwargs, &block) is not an acceptable workaround. Use
@overload blocks that introduce named parameters for documentation purposes
only:
# Update the index with the current content found in the working tree
#
# @overload add(paths = '.', **options)
#
# @example Stage a specific file
# git.add('README.md')
#
# @param paths [String, Array<String>] file(s) to add (relative to the
# worktree root); defaults to `'.'` (all files)
#
# @param options [Hash] command options
#
# @option options [Boolean, nil] :all (nil) add, modify, and remove index entries to
# match the worktree
#
# @option options [Boolean, nil] :force (nil) allow adding otherwise ignored files
#
# @return [String] the command output
#
# @raise [Git::FailedError] if `git add` exits with a non-zero status
#
def add(paths = '.', **)
Git::Commands::Add.new(@execution_context).call(*Array(paths), **).stdout
endThe same approach applies to .... The overload signature names the
parameters; the actual def keeps ... so RuboCop is satisfied:
# Run a command against the underlying execution context
#
# @overload run(command, *args, **options, &block)
#
# @example Run git status
# result = git.run('status')
#
# @param command [String] the git subcommand to run
#
# @param args [Array<String>] positional arguments forwarded to the command
#
# @param options [Hash] keyword options forwarded to the command
#
# @return [Git::CommandLine::Result] the command result
#
# @yield [result] yields the command result, when a block is given
#
# @yieldparam result [Git::CommandLine::Result] the command result
#
# @yieldreturn [void]
#
def run(command, ...)
Git::Commands::Run.new(@execution_context).call(command, ...)
endWhen a method has multiple genuinely distinct call shapes, write one
@overload block per shape as in the Overload template
above.
Anonymous block parameter (&) is not covered by this rule.
@yield, @yieldparam, and @yieldreturn describe what is yielded to the
block, not the block parameter itself, so they bind correctly even with an
anonymous &. Use a named block parameter (&block) and a @param block [Proc] tag only in the rare case where the block is documented as a
first-class Proc value (stored, returned, or passed elsewhere) rather than
yielded to.
The templates above cover methods. When documenting a class, module,
constant, attribute, dynamically defined method (@!method), or a value
object (Data.define / Struct.new), follow the per-element requirements
in element-rules.md.
First, run the automated linter. yard-lint enforces many of the rules in this
skill (undocumented objects, missing @param/@option/@return, tag order,
type syntax, orphaned doc comments) and the minimum documentation coverage
threshold:
# Lint YARD docs against the project standards (config: .yard-lint.yml)
bundle exec yard-lint lib/
# Lint only the files you changed
bundle exec yard-lint lib/ --diff main
# Or run it through rake (build + lint + example-test)
bundle exec rake yardA clean yard-lint run is necessary but not sufficient: the linter cannot check
every rule here (e.g. the LINE_LIMIT/LINE_MAX distinction, SUMMARY_LIMIT,
short-description capitalization and punctuation, noun-phrase class descriptions,
required @example titles, class/module-level @api visibility correctness).
Still perform the manual checks below.
Legacy offenses are baselined in .yard-lint-todo.yml; when you touch a file
listed there, remove it from every Exclude: list that names it (a file may be
baselined under more than one validator) and fix the offenses as part of your
change.
Then generate and review the rendered docs:
# Generate and review docs
bundle exec yard doc
# then open doc/index.html in your browser
# Check for warnings
bundle exec yard doc 2>&1 | ruby -ne 'puts $_ if $_ =~ /warn/i'Verify @example code runs correctly in bundle exec bin/console.
Check that all @see references point to valid targets.
Apply these checks to every YARD doc comment — the description on a class,
module, method, constant, or attribute, and every tag within it (@param,
@return, @raise, @option, @yield, @yieldparam, @yieldreturn, etc.).
Check all three limits:
LINE_LIMIT: Count every character from column 1 (indentation, #,
metadata, text) on each physical line. If any wrappable line exceeds
LINE_LIMIT, split at a word boundary onto a continuation line (indented
two extra spaces). Apply this check to every continuation line
independently.LINE_MAX: Confirm no physical line exceeds LINE_MAX — the hard
ceiling that nothing may cross. Only unwrappable content (URLs, long inline
code spans, long [Type] expressions, @example code, markdown table rows)
may sit between LINE_LIMIT and LINE_MAX; every other line must stay
within LINE_LIMIT.SUMMARY_LIMIT: For each short description — a tag's description or a
documented object's short description — strip the leading # and its
indentation from every continuation line and join with a single space. If the
concatenated text exceeds SUMMARY_LIMIT, shorten it and move the excess into
a paragraph after a blank # line.The rules below are the reference the Workflow draws on. The
Formatting Rules apply to every doc comment regardless of
element type; the Method Rules govern method doc comments.
Per-element rules for classes, modules, constants, attributes, and value objects
are in element-rules.md.
Treat every rule in this section as mandatory unless its heading is marked (SHOULD) or (Optional). Headings that name a descriptive topic (e.g. type-specifier conventions) are reference material; any obligations they carry are stated with “must” inline.
Doc comments are rendered as markdown via the redcarpet gem. Write all
free-text descriptions, tag values, and examples using markdown syntax. These rules
apply to all documentation regardless of element type. They reference the three
Named length limits (LINE_LIMIT, LINE_MAX,
SUMMARY_LIMIT) defined earlier.
YARD doc comments must appear immediately above the element they document (class, module, method, constant, or attribute) with no intervening blank lines or non-comment code.
Every individual YARD tag must be preceded by a blank comment line (#) unless it is the very first line of a doc comment.
A YARD tag is any comment token matching @!?[a-z_]+ — that is, @word (regular
tags such as @param, @return, @raise, @api, @abstract, @deprecated,
etc.) or @!word (directives such as @!attribute, @!method, @!scope, etc.).
Within the tag block there are no other exceptions: consecutive same-kind tags (e.g.
multiple @param lines) each require their own preceding blank line.
A raw blank line — an empty line with no leading # — terminates the YARD doc
comment block at that point. Any comment lines that follow the raw blank line are
treated as separate, unattached comments and will not appear in the generated
documentation. Always use a blank comment line (#) to separate paragraphs or
continuation text within a YARD block:
Correct — blank comment line keeps the block intact:
# @option options [Boolean, nil] :ipv4 (nil) use IPv4 addresses only
#
# Alias: :"4"Incorrect — raw blank line silently drops the alias note:
# @option options [Boolean, nil] :ipv4 (nil) use IPv4 addresses only
# Alias: :"4"Watch for editors that auto-strip trailing spaces from # lines, silently
creating raw blank lines.
The short description (the first sentence of any doc comment, or the inline text of
a @param, @return, @raise, etc. tag) must:
., ?, !)Returns the commit count,
Represents a Git branch)@option, @param, @return, @raise, @yield,
@yieldparam, etc.) all start with a lowercase letter (e.g. @option options [Boolean, nil] :force (nil) overwrite existing files, @param name [String] the branch name, @return [String] the result, @raise [ArgumentError] when no name is provided)For tags, the summary text is the description that follows the tag
metadata (tag name, [Type], option key, and (default)). For example, in:
@option options [Boolean, nil] :ignore_case (nil) ignore case distinctionsthe summary text is ignore case distinctions.
Every physical YARD doc line should not exceed LINE_LIMIT. When a description
would push a line past LINE_LIMIT, split it at a word boundary
onto a continuation line indented two extra spaces. For content that cannot
be wrapped (URLs, long inline code spans, long [Type] expressions,
@example code lines, markdown table rows), lines may extend up to
LINE_MAX but must not exceed it.
Additionally, the concatenated description — the description text from the
first line joined with all continuation lines — must not exceed
SUMMARY_LIMIT. If the concatenated description exceeds SUMMARY_LIMIT,
shorten it and move the excess detail into a paragraph after a blank # line.
For example, this tag has a description of 84 characters (within
SUMMARY_LIMIT), but the single physical line is 102 characters (exceeds
LINE_LIMIT) and must be split:
# @return [Array] a two-element array `[target, options]` containing the translated checkout argumentsSplit so each physical line fits within LINE_LIMIT:
# @return [Array] a two-element array `[target, options]` containing the
# translated checkout argumentsIf the tag metadata itself is long (e.g. a long [Type] or @option key),
start the description on an indented continuation line so only the metadata
appears on the first physical line.
If more explanation is needed, add continuation paragraphs after a blank
comment line (#). Every physical line — in the summary and in any
continuation paragraph — must independently fit within LINE_LIMIT
(or LINE_MAX for unwrappable content such as URLs, long inline code
spans, long [Type] expressions, @example code, or table rows).
These rules apply to every doc comment — an object's short description and a tag's text alike; the first sentence is the short description. The no-punctuation rule applies only to short descriptions; continuation paragraphs use normal prose punctuation (periods). Separate continuation paragraphs with a blank comment line.
Correct — tag title without punctuation, blank line before continuation:
# @option options [Boolean, nil] :ignore_case (nil) ignore case
# distinctions in both the pattern and the file contents
#
# Alias: :i
#
# @option options [String, Array<String>] :pattern the search pattern
# (required; must not be nil)
#
# Pass a String for a simple pattern (emitted as `-e <pattern>`).
# Pass an Array of raw CLI arguments for compound boolean
# expressions.
#
# @return [Git::CommandLine::Result] the result of calling `git grep`
#
# Exit status 0 means matches were found; exit status 1 means no
# lines were selected (not an error).Incorrect — trailing period on title, missing blank line before continuation, and @return concatenated summary exceeds SUMMARY_LIMIT (132 chars):
# @option options [Boolean, nil] :ignore_case (nil) ignore case
# distinctions in both the pattern and the file contents.
# Alias: :i
#
# @return [Git::CommandLine::Result] the result of calling `git grep`.
# Exit status 0 means matches were found; exit status 1 means no
# lines were selected (not an error).@return must always include a typeEvery @return tag must include a [Type] specifier. @return the value is
incorrect; write @return [Object] the value (or a more specific type). If the
return value is the block's return value, use @return [Object].
@example blocksNever use backtick shell calls (`true`, `git version`) or process-status
globals ($?, $CHILD_STATUS) in @example blocks. They are side-effecting,
environment-dependent, and confuse readers about the type of object being
demonstrated. Construct example objects directly in Ruby instead:
Incorrect:
# @example Incorrect shell call
# `true`
# result = Git::CommandLine::Result.new([], $?, '', '')Correct:
# @example Constructing a result with a double
# status = instance_double(ProcessExecuter::Result)
# result = Git::CommandLine::Result.new([], status, '', '')@example blocksWithin @example blocks, blank comment lines (#) render as literal blank lines in
the displayed code. Use them for readability between setup and assertions, but be
aware they are literal content, not tag separators.
@example titles are requiredEvery @example tag must include a title — the descriptive text on the same line
after @example. Write @example Basic usage, not bare @example. Titles appear
as headings in generated docs and help readers scan multiple examples.
YARD renders {ClassName#method} as a hyperlink only when the target method is
included in the generated documentation. Public objects are included by default,
and objects marked with @api private remain included with a private annotation.
Ruby private methods are excluded by default. Do not write
{Git::Commands::Base#execute_command} — it will render as plain text and may
generate an unresolved reference warning.
If you need to refer to a private method, describe it in prose instead, or link to the public method that callers should use.
Use backtick code spans for inline code (`true`, `nil`, symbols, type
names, method calls). Do not use the RDoc +value+ style; it is inconsistent with
the project's markdown rendering via redcarpet.
YARD treats { as the start of a cross-reference link. Because redcarpet consumes
one \ before YARD sees it, write \\{ (two backslashes) to produce a literal
{ — redcarpet reduces \\ to \, leaving \{ for YARD. For example, use
'stash@\\{0}' to render as stash@{0}. Using only \{ still triggers a YARD
unresolved link warning.
Link to other code objects anywhere in a doc comment using {ClassName},
{ClassName#method}, {#method_in_same_class}, or {Class::CONSTANT}. An
optional title follows the reference separated by a space:
{Git::Repository#log the log method}. Do not use brace syntax inside @see tags —
@see links automatically without braces. @see accepts three target forms:
@see Git::Repository#log@see https://git-scm.com/docs/git-log@see "Pro Git, Chapter 2"The [Types] field in @param, @return, @raise, etc. supports:
[String], [Integer], [Git::Repository][String, nil], [String, Array<String>][Array<String>], [Hash<Symbol, String>][Array(String, Integer)], [Array(Symbol, (Integer, nil))][#read], [#to_s][Boolean] — conventional meta-type for true or false (not a real Ruby class)[void] — for @return tags on methods whose return value must not be usedArray<...> (collection) vs Array(...) (tuple)YARD treats angle brackets and parentheses as distinct type constructors, so choose the one that matches the value's shape:
Array<T> (angle brackets) — a collection: an array of T with any
number of elements, e.g. Array<String> is zero or more strings. Listing
several types inside <...> means each element is one of those types
(Array<String, Symbol> is an array whose elements are each a String or a
Symbol), not a fixed sequence.Array(A, B) (parentheses) — a tuple: an array containing exactly A
then B in that order, e.g. Array(String, Integer) is a two-element
[name, count]. Use this whenever a method returns or accepts a
fixed-position array such as [status, similarity] or [path, options].The same rule applies to nested types: Array<Array(Integer, String)> is a
collection of [index, message] tuples. Use [Array] with a prose description
only when the element types cannot be expressed concisely.
@api private vs @privateUse @api private (not @private) to mark internal classes and modules. @api private includes the object in generated docs with a private annotation; YARD's
@private tag excludes the object from docs entirely.
@api visibility (Required)Every documented class and module must declare API visibility explicitly with exactly one tag:
@api public for user-facing API@api private for internal implementation detailsDo not rely on YARD's implicit default visibility.
@api visibility is inherited by child objects. Omit redundant method-level or
constant-level @api tags when a child matches its enclosing class/module
visibility.
Add method-level or constant-level @api only when a child intentionally differs
from its enclosing class/module visibility.
@since tags are not usedDo not add @since tags. The project has no historical @since annotations, and
retroactively tagging existing APIs is impractical at v4.x. Version introduction
history is tracked through git blame and the CHANGELOG instead.
@todo tags are not usedDo not add @todo tags. Track incomplete work in GitHub Issues, not in source
comments. YARD renders @todo prominently in generated docs, and these annotations
go stale quickly.
@abstractUse @abstract on classes or methods that must be subclassed or overridden before
use. Include guidance text describing what the subclass must implement:
@abstract Subclass and implement {#run}. Do not use @abstract on concrete
classes or fully implemented methods.
Every method must have a short description that:
Returns, Resets, Finds — not "The…" or "This method…")Finds the nearest tagged ancestor not
Iterates through commits checking tagsResets HEAD to the given ref rather than
relying solely on param tagsReturns true if the branch exists, false otherwise beats Returns a BooleanMethods use these standard YARD tags:
@param for each method parameter, in signature order; omit @param entirely
on zero-argument methods@return on every method; use [void] when the return value must not be used@raise for each caller-relevant exception the method can raise as part of its
contract; omit @raise when the method has no documented exceptional path@example on non-private methodsMethods without Ruby private visibility must have one or more @examples;
Ruby-private methods may omit @example unless usage would otherwise be unclear.
Methods that yield to a block must include @yield [param_names], one
@yieldparam name [Type] per yielded parameter, and @yieldreturn [Type]; omit
all yield tags on methods that do not yield.
@overload for distinct signaturesUse @overload when a method has distinct call signatures with different
parameters or return types — each overload gets its own full set of tags.
Methods that yield only when an optional block is given should use @overload
to document the with-block and without-block signatures separately.
@overload for anonymous splatsMethods whose signature uses an anonymous *, **, or ... must document their
call shapes with named @overload blocks. Do not name the splat or expand
... into *args, **kwargs, &block to make tags bind — that conflicts with
RuboCop's Style/ArgumentsForwarding cop. See
Documenting anonymous splats with @overload.
@note for callouts (Optional)Use @note for callouts that need visual emphasis: thread-safety warnings,
significant side effects, or platform-specific behavior.
@deprecated on deprecated methodsDeprecated methods must include @deprecated explaining the migration path,
e.g. @deprecated Use {#new_method} instead.
@api on methods (Optional)Method-level @api is exception-only: when omitted, the method inherits the
containing class's @api level. Use it only when the method's intended visibility
differs from the class's level (e.g. an @api private helper inside an @api public class). For overloaded methods, place @api once at top level and never
nest it inside an @overload block.
# Lint YARD documentation against the project standards
bundle exec yard-lint lib/
# Lint only changed files (great for pre-commit / CI)
bundle exec yard-lint lib/ --diff main
# Show documentation coverage statistics
bundle exec yard-lint lib/ --stats
# Generate documentation
bundle exec yard doc
# Generate and serve locally
bundle exec yard server --reload
# Check documentation coverage
bundle exec yard stats
# List undocumented objects
bundle exec yard stats --list-undoc
# Generate docs for specific file
bundle exec yard doc lib/git/repository.rb
# Check for YARD syntax errors
bundle exec yard doc --no-output 2>&1
# View documentation for specific class
bundle exec yard ri Git::Repository© ruby-git, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .github/skills/yard-documentation of ruby-git/ruby-git.
Open the folder on GitHubat commit f3bf20f
Yard Documentation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Yard Documentation this skillruby-git/ruby-git | 1.8k | — | ~9.9k | Automated safety check: Pass | MIT | |
| Gumroad Prod Consoleantiwork/gumroad | 9.8k | — | ~2.9k | Automated safety check: Notes | MIT | |
| Fastlane Pull Request Reviewfastlane/fastlane | 42k | — | ~550 | Automated safety check: Pass | MIT | |
| Antipattern Preventiondoorkeeper-gem/doorkeeper | 5.5k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Mutantmbj/mutant | 2.2k | — | ~2k | Automated safety check: Pass | Proprietary | |
| Evaluating Pegslineofflight/frankfurter | 2k | — | ~1.6k | Automated safety check: Pass | MIT |
antiwork/gumroad
Execute read-only Ruby/Rails commands against Gumroad's production database for debugging and investigation.
fastlane/fastlane
Reviews a fastlane pull request against its linked issue and the project guides, separating blocking from non-blocking findings and handling vulnerabilities privately.
doorkeeper-gem/doorkeeper
Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.
mbj/mutant
Run mutant, read mutation reports, fix alive mutations, and verify coverage.
lineofflight/frankfurter
A skill your agent uses when adding, evaluating, or removing an entry in db/seeds/pegs/, when the user mentions a pegged or fixed currency, or when an issue suggests we should "pin" or "lock" a…
swig/swig
Reproduce a GitHub Actions Linux CI failure locally when it does not happen on your machine: a podman/docker image that mirrors the ubuntu-22.04 runner by reusing the real Tools/CI-linux-.sh install…
ruby-git/ruby-git
Addresses unresolved pull request review threads and suppressed (low-confidence) Copilot review comments on the current branch, folds each fix into the…
ruby-git/ruby-git
Assesses what an API change would break before it is made, finds every usage, documents the impact and plans a deprecation or migration path.
ruby-git/ruby-git
Diagnoses and fixes failing GitHub Actions runs by identifying the failure, fetching only the relevant logs, finding the root cause and reproducing it locally.
ruby-git/ruby-git
Scaffolds and reviews `Git::Commands::*` classes in the ruby-git library, with unit tests, integration tests and YARD docs, using the Base command architecture.
ruby-git/ruby-git
Workflow for updating gem dependencies and fixing CVEs in the ruby-git project: assess with bundle outdated and audit, edit the gemspec, test, then commit with conventional messages.
ruby-git/ruby-git
Migrates a direct command call in Ruby Git's Git::Lib to a Git::Commands class, as part of a Strangler Fig redesign, with a plan, legacy tests and a pull request.
Works with
General YARD documentation rules and workflow for all Ruby source code. Yard Documentation is an agent skill from ruby-git/ruby-git. General YARD documentation rules and workflow for all Ruby source code.
Yard Documentation fits situations like: reviewing YARD doc comments; generating missing docs; updating examples; fixing doc errors.
Run `npx skills add ruby-git/ruby-git --skill yard-documentation -a claude-code`. Or copy the skill folder (.github/skills/yard-documentation in ruby-git/ruby-git) into .claude/skills/yard-documentation in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ruby-git/ruby-git --skill yard-documentation -a codex`. Or copy the skill folder (.github/skills/yard-documentation in ruby-git/ruby-git) into .agents/skills/yard-documentation in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ruby-git/ruby-git --skill yard-documentation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/yard-documentation, .gemini/skills/yard-documentation, .github/skills/yard-documentation and .opencode/skills/yard-documentation in your project.
Going by SKILL.md and its folder, Yard Documentation needs the command-line tools its instructions call (bundle and ruby).
SKILL.md names 1 domain. In commands or code: git-scm.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Yard Documentation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 9.9k tokens (SKILL.md is roughly 39k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Yard Documentation: Gumroad Prod Console (antiwork/gumroad, 9.8k stars), Fastlane Pull Request Review (fastlane/fastlane, 42k stars), Antipattern Prevention (doorkeeper-gem/doorkeeper, 5.5k stars) and Mutant (mbj/mutant, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ruby-git (a GitHub organization) maintains it in ruby-git/ruby-git, which has 1,799 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on October 2, 2026.
Source: ruby-git/ruby-git on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.