本文へ移動
cccskills
無料GitHub で公開日本語紹介

ruby

Rubyの文法やオブジェクトの仕組み、例外、並行処理、gem管理などを調べ、コードや実行環境の疑問を解決するためのスキルです。

原文原文の説明を見る

Use when working with Ruby — the dynamic, object-oriented language and its runtime (MRI/CRuby). Covers the object model, metaprogramming, core types, blocks/procs/lambdas, control flow and exceptions, I/O and encoding, the concurrency model (Threads, Fibers, Ractors, GVL), garbage collection and ObjectSpace, the RubyGems/Bundler package system, the interpreter CLI and tooling (irb, erb, rake, rdoc/ri), environment variables, and the standard library. Triggers on: "ruby", "Ruby", "MRI", "CRuby", "YARV", "Ripper", "object model", "method lookup", "eigenclass", "singleton class", "metaprogramming", "define_method", "method_missing", "class_eval", "instance_eval", "Refinements", "Binding", "Proc", "lambda", "block", "yield", "rescue", "ensure", "raise", "begin", "end", "Encoding", "String#encode", "Thread", "Fiber", "Ractor", "GVL", "GIL", "Mutex", "ObjectSpace", "GC", "WeakRef", "gem", "Gemfile", "Bundler", "gemspec", "bundle exec", "irb", "erb", "rake", "Rakefile", "rdoc", "ri", "RUBYOPT", "RUBYLIB", "GEM_HOME", "GEM_PATH", "BUNDLE_GEMFILE", "frozen string literal", "RUBY_VERSION", "RUBY_ENGINE".

carapace-sh/carapace-binスター 2,000(GitHub 2,000 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • Rubyのコードの動きを理解したいとき
  • ブロックとlambdaの違いを調べたいとき
  • 例外や文字コードの扱いを確認したいとき
  • Bundlerでgemを管理したいとき
  • Rubyの実行環境を調べたいとき

日本語での紹介

できること

Ruby言語とMRI/CRubyランタイムの仕組みを調べられます。クラスやモジュール、メソッド探索、オブジェクトの型、ブロック・Proc・lambdaの違い、動的にメソッドを定義するメタプログラミングを扱います。制御構文や例外処理、ファイル入出力、文字エンコーディングについても参照できます。Thread、Fiber、Ractorなどの並行処理、GVL、ガベージコレクションやObjectSpaceの説明も含まれます。RubyGemsとBundlerによる依存パッケージ管理、Rubyインタープリターのコマンドライン、irb、rake、rdoc、環境変数、標準ライブラリについても調べられるため、言語の挙動から開発時のツール利用まで確認できます。

こんなときに便利

Rubyのコードを読み解きたいときや、ブロックとlambdaの使い分け、例外処理、文字コードの扱いを確認したいときに向いています。gemの依存関係や実行環境の設定を調べる場合にも役立ちます。

使い方の例

  • 「RubyのProcとlambdaの違いを例付きで説明して」
  • 「Bundlerでgemを追加する方法を教えて」
  • 「Rubyでファイルを読み、文字コードを扱う方法を説明して」

注意点

対象はRuby言語とMRI/CRubyのランタイムです。C拡張API自体は対象外です。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(13)

  • SKILL.md10.4 KB
  • references/blocks-procs-lambdas.md6.5 KB
  • references/cli.md8.4 KB
  • references/concurrency.md9.0 KB
  • references/control-flow.md7.2 KB
  • references/environment.md6.1 KB
  • references/gc-memory.md8.5 KB
  • references/gems-bundler.md9.4 KB
  • references/io-encoding.md7.5 KB
  • references/metaprogramming.md6.9 KB
  • references/object-model.md6.6 KB
  • references/stdlib.md8.5 KB
  • references/types.md7.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Ruby In-Depth Reference

Comprehensive reference for the Ruby programming language and its reference implementation (MRI/CRuby) — covering the object model, metaprogramming, core types, control flow, I/O and encoding, concurrency, garbage collection, the RubyGems/Bundler package system, the interpreter CLI and tooling, environment variables, and the standard library.

Data Flow

Source file (.rb)
  → Ripper (parse to AST)
    → YARV compiler (compile AST to bytecode instructions)
      → YARV VM (per-instruction dispatch)
        → runtime services (ObjectSpace, GC, Thread scheduler, load path)
          → I/O, exit

Sub-Resources

Load the reference that matches your task. When in doubt, load multiple references.

KeywordsReference
object model, class, module, BasicObject, Object, Kernel, ancestor, method lookup, eigenclass, singleton class, superclass, super, included, prepended, inherited, ancestors, const_get, constants, autoload, refine, using, Module vs Class, instance variable, class variable, @@, constant resolution, toplevel, ::, ObjectSpace.each_object, method_missingreferences/object-model.md
metaprogramming, define_method, class_eval, instance_eval, module_eval, eval, Binding, send, send, public_send, respond_to?, method, method_missing, method_added, Refinements, refine, using, Module.new, Class.new, remove_method, undef_method, alias_method, attr_accessor, attr_reader, attr_writer, define_singleton_method, const_set, trace_point, TracePoint, set_trace_func, caller, caller_locationsreferences/metaprogramming.md
String, Symbol, Integer, Float, Numeric, Rational, Complex, BigDecimal, Array, Hash, Range, Regexp, MatchData, Proc, Method, nil, NilClass, true, false, TrueClass, FalseClass, Boolean, truthiness, eql?, equal?, ==, ===, <=>, Comparable, freeze, frozen?, immutability, dup, clone, deep_copy, hash, inspect, to_s, to_str, coercereferences/types.md
block, yield, proc, lambda, Proc, Method, method(:foo), to_proc, &block, ampersand, &, proc call, lambda call, return in block, return in lambda, argument strictness, arity, curry, splat, double splat, **, block_given?, &method(:foo), proc vs lambdareferences/blocks-procs-lambdas.md
if, unless, case, when, while, until, for, loop, break, next, redo, retry, throw, catch, raise, begin, rescue, ensure, else, Exception, StandardError, RuntimeError, custom exception, rescue modifier, rescue chain, $!, $@, $ERROR_INFO, retry, else clause, failreferences/control-flow.md
IO, File, StringIO, File::open, File.open, IO.foreach, IO.read, IO.write, Encoding, String#encode, Encoding.default_external, Encoding.default_internal, magic comment, # encoding, # coding, # frozen_string_literal, external encoding, internal encoding, transcoding, binary mode, text mode, STDIN, STDOUT, STDERR, ARGF, ARGV, open, File.read, File.write, flock, IO.select, pipe, IO.pipe, io/nonblockreferences/io-encoding.md
Thread, Fiber, Ractor, GVL, GIL, Mutex, ConditionVariable, Queue, SizedQueue, Thread::SizedQueue, Thread::Mutex, Thread::Queue, Thread.group, Thread.list, Thread.current, Thread.main, Thread.pass, Fiber.new, Fiber.resume, Fiber.yield, Fiber.schedule, scheduler, non-blocking, concurrent-ruby, async, Async, actor, Ractor.new, Ractor.receive, Ractor.send, Ractor.yield, Thread.pool, Thread.abort_on_exception, thread variable, Thread.current[:name], GVL releasereferences/concurrency.md
ObjectSpace, ObjectSpace.each_object, ObjectSpace.define_finalizer, ObjectSpace._id2ref, GC, GC.start, GC.stat, GC.disable, GC.enable, GC.stress, generational GC, RGENGC, write barrier, weak reference, WeakRef, WeakMap, ObjectSpace::WeakMap, finalizer, _id2ref, VALUE, immediate value, tagged pointer, RVALUE, RSTRING, memory layout, object shape, shape pool, frozen heap, malloc/freereferences/gc-memory.md
RubyGems, gem, gem install, gem list, gem uninstall, gem update, gem env, gem which, gemspec, Gem::Specification, Gemfile, Gemfile.lock, Bundler, bundle, bundle install, bundle update, bundle exec, bundle config, bundle add, bundle outdated, bundle lock, bundle check, bundle clean, bundle open, bundle binstubs, groups, :development, :test, :production, source, rubygems.org, git source, path source, BUNDLE_GEMFILE, Gemfile.lock, vendor/cache, Gem::Version, Gem::Requirementreferences/gems-bundler.md
ruby, ruby interpreter, ruby flag, -e, -I, -r, -n, -p, -a, -F, -l, -0, -K, -E, -w, -W, -d, --enable-gems, --disable-gems, --enable-frozen-string-literal, --disable-frozen-string-literal, irb, .irbrc, binding.irb, erb, ERB, Rake, Rakefile, rake task, rake file task, rake namespace, rake multitask, rake rule, rdoc, ri, RDoc, RDoc::Markup, ripper, ruby-prof, stackprof, memory_profiler, debug, debug.rb, byebug, rdbg, rbs, typeprof, rubocop, standard, ruby version manager, rvm, rbenv, chruby, asdfreferences/cli.md
environment variable, RUBYOPT, RUBYLIB, RUBY_ENGINE, RUBY_VERSION, RUBY_PLATFORM, RUBY_PATCHLEVEL, RUBY_RELEASE_DATE, RUBY_DESCRIPTION, GEM_HOME, GEM_PATH, GEM_ROOT, GEM_RC, BUNDLE_GEMFILE, BUNDLE_PATH, BUNDLE_FROZEN, BUNDLE_JOBS, BUNDLE_WITHOUT, BUNDLE_BIN, BUNDLE_IGNORE_CONFIG, RUBY_CONFIGURE_OPTS, BUNDLER_VERSION, BUNDLE_CACHE_PATH, PATH modifications, rubyopt parsing, frozen-string-literal defaultreferences/environment.md
standard library, stdlib, set, monitor, singleton, forwardable, delegate, observer, logger, optparse, fileutils, pathname, tempfile, tmpdir, json, yaml, psych, csv, erb, digest, securerandom, time, date, matrix, tsort, pp, prettyprint, benchmark, debug_inspector, objspace, io/console, io/nonblock, socket, openssl, net/http, net/smtp, net/pop, net/imap, uri, cgireferences/stdlib.md

Quick Guide

Cross-Project References

  • For Rails CLI development (commands, generators, database tasks), use the rails skill (in this repo).
  • For carapace library development (Action API, traverse engine, shell formatters), use the carapace-dev skill (in this repo).
  • For carapace user-facing integration (specs, macros, setup), use the carapace skill (in this repo).
  • For the official Ruby language reference and C-API, see https://ruby-doc.org/ — this skill covers the language and runtime model, not the C extension API.
  • For the RubySpec (executable spec suite that defines conformance), see https://github.com/ruby/spec.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

brew

無料概要あり

macOSやLinuxのHomebrewについて、brewコマンドでの導入・更新から、FormulaやCask、Brewfile、サービス管理、開発者向け操作まで調べられるスキルです。

  • Homebrewでソフトを導入・更新したいとき
  • Brewfileで環境を管理したいとき
  • FormulaやCaskを作成・更新したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

bubbletea

無料概要あり

Go製TUIフレームワークBubble Teaの画面構成、入力・非同期処理、テスト、部品の組み合わせ方を調べ、端末アプリの実装や設計に活用できます。

  • Bubble Teaで端末画面を作りたいとき
  • キーやマウス入力を処理したいとき
  • 非同期処理を画面に組み込みたいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

bun

無料概要あり

BunのCLI、パッケージ管理、テスト、バンドル、実行時APIやシェルの使い方を調べ、JavaScript・TypeScriptの開発作業に活用できます。

  • Bunで依存パッケージを管理したいとき
  • テストやコードのバンドルを実行したいとき
  • Bunでサーバーやファイル処理を実装したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

but

無料概要あり

GitButler CLIで仮想ブランチや積み重ねたブランチを管理し、変更の割り当て、コミット編集、競合解決、PR作成までのGit作業を進められます。

  • 作業を仮想ブランチに分けたいとき
  • コミットを修正・統合したいとき
  • 操作履歴を見て変更を取り消したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

carapace

無料概要あり

carapaceをCLIに組み込み、シェル補完のYAML仕様や独自アクションを作成し、シェル設定やMCP連携、補完値の説明まで扱うスキルです。

  • CLIにシェル補完を追加したいとき
  • YAMLの補完仕様を作成したいとき
  • 独自の補完アクションを実装したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

cargo

無料概要あり

Rustプロジェクトのビルドやテストから、依存関係、ワークスペース、公開設定まで、`cargo`の使い方と設定を調べられるスキルです。

  • Rustプロジェクトの依存関係を設定したいとき
  • featureやworkspaceの仕組みを確認したいとき
  • ビルドやテストのコマンドを調べたいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

carapace-sh のスキルをすべて見る

このスキルの問題を報告する