# Generate Ruby RBS Signatures

Ruby projects often lack complete RBS signatures, which limits static type checking. This skill guides Claude, Codex, or Claude Code through generating and validating pure RBS files from Ruby source.

## Install

```bash
npx skillstore add dmitrypogrebnoy/generating-rbs
```

## Metadata

- Status: approved
- Slug: dmitrypogrebnoy-generating-rbs
- Skillstore revision: r1
- Version status: missing
- Tree hash: a1b6e0906fb03316755530e0610b27ab9560c481d297368ddd26adca5ccd9bea
- Author: DmitryPogrebnoy
- GitHub username: DmitryPogrebnoy
- License: MIT
- Repository: https://github.com/DmitryPogrebnoy/ruby-agent-skills/tree/main/source/plugins/ruby-type-signature-skills/skills/generating-rbs
- Ref: b959ebfd1043a07c0c4378ab94ca4342cb0259f5
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: scripts, external\_commands, network, filesystem, env\_access
- Quality score: 76
- Public page: https://skillstore.pages.dev/skills/dmitrypogrebnoy-generating-rbs
- Manifest: https://skillstore.pages.dev/api/skills/dmitrypogrebnoy-generating-rbs/manifest

## Capabilities

- Analyzes Ruby classes, modules, methods, constants, inheritance, and visibility.
- Creates new pure RBS signature files under a mirrored sig directory structure.
- Uses bundled RBS syntax and Ruby core or standard library examples as references.
- Reduces avoidable untyped annotations by inferring types from source and tests.
- Validates generated signatures with rbs validate when command execution is approved.
- Runs steep check only when the project includes Steep configuration.

## Use Cases

- Add types to a Ruby library: Generate initial RBS files for library classes before introducing static type checks.
- Prepare an application for Steep: Create signatures that can be validated before adding type checking to a Ruby application.
- Document public Ruby interfaces: Produce readable RBS signatures that describe methods, constants, and object shapes.

## Prompt Templates

### Generate a first RBS file

```
Generate pure RBS signatures for this Ruby file and place them in the matching sig path. Avoid untyped unless no type can be inferred.
```

### Type a small module

```
Analyze these Ruby files as one module and generate coherent RBS signatures for their public and private APIs.
```

### Refine generated signatures

```
Review these generated RBS signatures against the Ruby source and tests. Replace avoidable untyped entries with inferred concrete types.
```

### Validate and repair RBS

```
Generate RBS signatures, run rbs validate, fix all reported issues, and run steep check only if this project has Steep configured.
```

## Limitations

- Does not update existing RBS signatures or handle RBS-inline annotations.
- May leave untyped when source and tests do not provide enough type evidence.
- Requires manual review for metaprogramming-heavy Ruby code.
- Validation commands depend on local Ruby tools and project configuration.

## Best Practices

- Provide source files, tests, and expected public API boundaries together.
- Review generated signatures before relying on type checker results.
- Run validation after each meaningful signature change.

## Anti Patterns

- Do not ask the skill to execute application Ruby code to infer behavior.
- Do not accept broad untyped signatures when source evidence supports stronger types.
- Do not use this skill for RBS-inline migration or existing signature maintenance.

## Security Audit

- Audited at: 2026-07-21T05:48:31.412\+00:00
- Summary: All 400 representative static findings are false positives caused by RBS reference signatures, documentation syntax, and bundled Zeitwerk example source. The skill instructions generate and validate type signatures; no evidence shows secret collection, network transfer, shell execution, identity changes, or prompt-injection intent. Static review was capped at 400/1166 representative findings; omitted static matches are unconfirmed, so automatic publishing stays disabled until manual review.

## Stats

- Views: 906
- Downloads: 9
- Favorites: 0
- Popularity score: 0
