init-ruby-project

init-ruby-project is a skill for Claude Code from tk0miya/skills. It costs 20 tokens per session (6,923 once invoked), scanned B, original, Apache-2.0.

A setup guide for starting a Ruby project in the current directory. It checks the existing files and development tools, then continues only after unresolved choices are confirmed.

In plain words
What is it for?
Checking Bundler and GitHub CLI access, identifying whether the project is a Ruby gem, and preparing the repository for development.
Why use it?
It avoids overwriting work or making incorrect setup decisions when the directory is partly configured or when required tools are outdated.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Checking Bundler and GitHub CLI access, identifying whether the project is a Ruby gem, and preparing the repository for development.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tk0miya/skills/init-ruby-project
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tk0miya/skills --skill init-ruby-project
Clone the repo
git clone --depth 1 https://github.com/tk0miya/skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for init-ruby-project

README.md
[![agentmods](https://agentmods.dev/badge/skills/tk0miya/skills/init-ruby-project/github.svg)](https://agentmods.dev/skills/tk0miya/skills/init-ruby-project)
Your own site
<a href="https://agentmods.dev/skills/tk0miya/skills/init-ruby-project"><img src="https://agentmods.dev/badge/skills/tk0miya/skills/init-ruby-project/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for init-ruby-project

Your own site · 80×15
<a href="https://agentmods.dev/skills/tk0miya/skills/init-ruby-project"><img src="https://agentmods.dev/badge/skills/tk0miya/skills/init-ruby-project.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,923 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.06923
Opus 5.5 $0.00008 $0.02769
Sonnet 5.5 $0.00004 $0.01385
Haiku 4.5 $0.00002 $0.00692

Measured 5d ago against content hash db522604897a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

init-ruby-project scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (add-required-checks.sh, hooks/claude-code-web-session-start.sh, hooks/pre-commit-check.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

/.claude/settings.local.json
skills/init-ruby-project/SKILL.md · 430 lines

How it starts

The opening of the file, as written. The whole thing — 430 lines — stays where its author put it; the contents beside it link to each section on GitHub.

init-ruby-project

Ruby プロジェクトの初期セットアップを自動化するスキルです。

事前チェック(自動実行)

実行環境

以下を実行し、gh が認証済みか、gh actions-lock 拡張があるか、Bundler が 4.0.13 以降かをチェックする。

gh auth status
gh actions-lock --version
bundle --version

gh actions-lock は Phase 3 のコミット前に actions.lock を生成するのに使う。 無ければ gh extension install github/gh-actions-lock を案内して中断する(Phase 1・2 でファイルを 生成し終えてから止まらないよう、ここで確かめる)。

4.0.13 未満の Bundler は Phase 1 で付与する cooldown(公開直後の gem を一定期間使わない 供給チェーン対策)を黙って無視するため、cooldown の効かないプロジェクトができあがる。 その場合は gem install bundler で更新してから再実行するようユーザーに伝えて中断する (ユーザーの環境を断りなく書き換えない)。

カレントディレクトリの状況

このスキルはカレントディレクトリをプロジェクトディレクトリとして扱う。ディレクトリの作成も bundle gem による雛形生成も行わない(gem を作るなら、先にユーザーが bundle gem を実行して そのディレクトリでこのスキルを呼ぶ)。初期セットアップの一部が済んでいることがあるので、 カレントディレクトリを調べてどこまで済んでいるかを判定する。

ls -1d .git Gemfile *.gemspec 2>/dev/null
[[ -e .git ]] && git remote get-url origin 2>/dev/null
[[ -e .git ]] && git rev-parse --verify -q HEAD && git status --porcelain
判定 条件 影響
gem のプロジェクト *.gemspec がある 以降の各フェーズで gem 用の分岐を選ぶ
リポジトリ作成済み カレントディレクトリに .git があり、origin がある Phase 3 の gh repo create をスキップする

origin を見る前にカレントディレクトリの .git を確認するのは、別のリポジトリの配下に作った ディレクトリで実行したときに、親リポジトリの origin を拾って「作成済み」と誤判定しないため (worktree や submodule では .git がファイルなので、ディレクトリかどうかでは判定しない)。

コミットが 1 つ以上あるリポジトリで git status --porcelain に未コミットの変更があれば、Phase 3 の コミットにユーザーの作業を巻き込むことになるので、この時点でユーザーに伝えて、先に片付けるか承知の うえで進めるかを確認する。履歴がまだ無い場合(手動で bundle gem を実行した直後など)は、雛形が まるごと未コミットなのが当たり前なので確認しない。

想定している典型シナリオは次の 4 つ。

  • 手動で bundle gem を実行し、そのディレクトリでこのスキルを実行する(gem・履歴なし・ リポジトリ未作成)
  • GitHub で作ったリポジトリを clone したディレクトリでこのスキルを実行する(gem ではない・ 履歴あり・リポジトリ作成済み)
  • 作ったばかりの空のディレクトリでこのスキルを実行する(gem ではない・履歴なし・ リポジトリ未作成)
  • ドキュメントだけ、あるいは他言語で書かれた既存プロジェクトに Ruby を足す(gem ではない・ 履歴あり・リポジトリ作成済み。Ruby 以外のファイルが既にある)

プロジェクト名は *.gemspec のベース名 → origin のリポジトリ名 → カレントディレクトリ名の順で 決める。判定はディレクトリの中身から決まるもので、名前もカレントディレクトリがプロジェクト ディレクトリである以上そこから決まるので、確認は求めない。判定結果と決定したプロジェクト名は Phase 0 の質問と一緒に伝える(何をスキップして何の名前で進むかが分かるように)。

Read the full file on GitHub · 430 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · +15 lines db522604897a
  2. 1mo ago Changed · +1 lines c6529590a087
  3. 2mo ago First seen · 414 lines · 20 tokens per session scan B 2730b0428541

Subscribe to this mod's changes

init-ruby-project is a skill published in the GitHub repository tk0miya/skills (2 stars, last pushed 4d ago), licensed Apache-2.0. It adds 20 tokens to every session and 6,923 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens

rspec-conventions

Rootstrap RSpec conventions. Use when writing, reviewing, or editing RSpec test files (spec//spec.rb, spec/railshelper.rb, spec/spechelper.rb, spec/support//.rb) or factories. Covers describe/context structure, let/subject, matchers, factories, mocking/stubbing, shared examples, and spec types (model, request…

rootstrap/rails_api_base · 82 tokens

dhh-rails-style

This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style. It applies when writing Ruby code, Rails applications, creating models, controllers, or any Ruby file. Triggers on Ruby/Rails code generation, refactoring requests, code review, or when the user mentions DHH, 37signals…

davekilleen/Dex · 115 tokens

ruby-patterns

Ruby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami. Triggers: Ruby, Rails, ActiveRecord, Sidekiq, RSpec, Gemfile, bundler, Hanami, Sorbet.

softspark/ai-toolkit · 60 tokens

ruby-idioms

Modern Ruby (3.x) idioms: pattern matching, keyword arguments, immutable data structures, error hierarchies, and RSpec testing. Use when writing, modifying, or reviewing Ruby scripts, gems, or business logic. Pair with rails-idioms for Rails applications.

irahardianto/awesome-agv · 61 tokens

ruby-rules

Ruby coding rules: style, patterns, security, testing. Triggers: .rb, Gemfile, .gemspec, Rails, ActiveRecord, Sidekiq, RSpec, Sorbet, rubocop.

softspark/ai-toolkit · 48 tokens