Jr Rails Second Opinionのロゴ

Jr Rails Second Opinion

コミュニティ
julianrubisch
jr-rails-second-opinion

ローカルにインストールされたエージェント型CLI(claude、codex、opencode、gemini、aiderなど)に委任して、ブランチ、PR、または作業ツリーについてRailsに詳しいセカンドオピニオンを得られます。単体で動作し、MCPサーバーは不要です。

概要

公開者julianrubisch
リポジトリskills
スキル名jr-rails-second-opinion
スター
30
フォーク
2
同梱ファイル
43
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 43個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    julianrubischがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Jr Rails Second Opinion」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/julianrubisch/skills/tree/main/jr-rails-second-opinion
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/julianrubisch/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/jr-rails-second-opinion .claude/skills/jr-rails-second-opinion
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでJr Rails Second Opinionを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にJr Rails Second Opinionを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Jr Rails Second Opinionは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Rails Second Opinion (Local Agentic CLI)

Delegate review of Rails work (uncommitted diff, branch, or PR) to a locally-installed agentic CLI. Wraps the CLI in a structured Self-Review → External Review → Reconcile → Synthesize loop with H/M/L severity gating, mirroring the consult-outside-expert workflow but without MCP dependence.

Read @references/guide.md and follow it. Do not proceed without it.

Invocation

  • /jr-rails-second-opinion (review uncommitted changes; default)
  • /jr-rails-second-opinion <branch> (review <branch> diff vs main)
  • /jr-rails-second-opinion <PR#> (fetch PR with gh, review the diff)
  • /jr-rails-second-opinion --multi (run review through 2+ CLIs in parallel and reconcile)

Workflow Overview

1. CLI Discovery (Required First Step)

Probe for installed agentic CLIs. Do not trust the inherited $PATH or $SHELL — Claude Code's Bash tool spawns a non-login shell that misses fish/zsh PATH entries and most version-manager shims (asdf, mise, volta, fnm, bun, pnpm). Worse, $SHELL may report /bin/zsh even when the user actually runs fish (macOS user record defaults to zsh; fish is exec'd from .zshrc). Probe every installed user shell, merge their login PATHs, then augment with common install dirs:

bash
# Don't trust $SHELL — on macOS it often reflects the user-record default (zsh)
# even when the user actually runs fish via `exec fish` from .zshrc. Probe
# every installed user shell and merge their login PATHs.
PATHS_TO_TRY=()
for sh in fish zsh bash; do
  command -v "$sh" >/dev/null 2>&1 || continue
  case "$sh" in
    fish) p=$("$sh" -l -c 'string join : -- $PATH' 2>/dev/null) ;;
    *)    p=$("$sh" -l -c 'printf %s "$PATH"' 2>/dev/null) ;;
  esac
  [ -n "$p" ] && PATHS_TO_TRY+=("$p")
done
LOGIN_PATH=$(IFS=:; echo "${PATHS_TO_TRY[*]}")
[ -z "$LOGIN_PATH" ] && LOGIN_PATH="$PATH"

EXTRA_DIRS="$HOME/.local/bin:$HOME/.npm-global/bin:$HOME/.bun/bin:$HOME/.cargo/bin:$HOME/.deno/bin:$HOME/.asdf/shims:$HOME/.mise/shims:$HOME/Library/pnpm:/opt/homebrew/bin:/usr/local/bin"
SEARCH_PATH="$LOGIN_PATH:$EXTRA_DIRS"

for cmd in claude codex opencode gemini aider mods cursor-agent llm sgpt goose; do
  bin=$(PATH="$SEARCH_PATH" command -v "$cmd" 2>/dev/null) || continue
  echo "$cmd -> $bin"
done

Then call AskUserQuestion with the detected CLIs as options:

  • If 0 found, ask the mediator before escalating to install. They may have a CLI at a non-standard path — accept an absolute path via the "Other" answer. Only suggest installing (brew install codex, npm i -g opencode-ai) after they confirm nothing is installed.
  • If 1 found, still confirm it as the choice.
  • If 2+ found, list them as options. Add an "all of them (multi mode)" option when --multi is passed.

Reuse the resolved $SEARCH_PATH (or the absolute path) when invoking the CLI later — the same shell-context issue applies to invocation, not just detection.

2. Scope

Determine review scope:

  • Default (no arg): uncommitted changes (git diff + untracked summary).
  • Branch: git diff <base>...<branch> where base is main (or current upstream).
  • PR#: gh pr checkout <num> then branch flow, or fetch the PR diff via gh pr diff.

3. Brief Construction

Build the brief passed to the CLI. Force the H/M/L severity rubric and the five Rails-flavored review dimensions: architecture (skinny controllers, rich models, callback design), quality (Ruby idiom, naming, anti-patterns), performance (N+1, indexes, eager loading), testing (coverage, integration/unit balance), security (strong params, mass assignment, Brakeman class issues). Include the project's hard rule: never recommend service objects as a solution, and paste the Brief block from references/standards.md verbatim so the CLI judges by the same conventions the self-review uses.

See references/guide.md for the full brief template.

4. Run Review

Invoke the chosen CLI with its review-style command. Per-CLI invocations live in references/cli-invocations.md. Capture stdout to the working log.

5. Self-Review + Reconcile + Synthesize

Implementer (you) does a parallel self-review, then reconciles with the CLI's findings. Produce a synthesis with Consensus / Disagreements / Actions / Gate Status. Wait for mediator approval before acting.

6. Act + Iterate

Address agreed actions. Open a Round 2 if needed (re-run CLI on the updated artifact, capture deltas only). Stop on convergence: no open H, all M either fixed or accepted.

7. Cleanup

Delete the working log (second-opinion.md) after final attestation. The improved artifact is the deliverable, not the log.

Hard Rules

Judge by the pack's standards, not the CLI's taste. references/standards.md lists, per dimension, what a finding is measured against and links the shared reference that explains it (reference/shared/*.md, smells.md, patterns.md, refactorings/). Its Brief block goes into every CLI brief verbatim; in Reconcile, a CLI finding that contradicts a standard is dropped with the standard cited, and a finding a standard supports is kept even when self-review missed it. The first standard is the hard one: never recommend service objects (*Service, *Manager, *Handler, *Processor, *Creator, .call PORO patterns). When extraction is needed, prefer domain models, form objects, query objects, concerns, DCI contexts, or callback extraction.

Never act on a CLI finding without mediator approval. The CLI is a signal generator, not a judge. Decisions stay with the human.

The brief must demand the findings as the final message. Reasoning models will otherwise spend a whole run thinking and return nothing — a clean exit, a full log, an empty output file. The constraint is in references/guide.md's brief template; keep it when adapting the brief, and see references/cli-invocations.md for recovering a run that failed this way rather than paying for it twice.

Do not pipe secrets to the CLI. Brief construction must scrub .env, config/credentials/*, and any file Brakeman flags as containing secrets.

File Layout

jr-rails-second-opinion/
├── SKILL.md                       # This file (entry point)
└── references/
    ├── guide.md                   # Workflow detail (load when starting a session)
    ├── cli-invocations.md             # Per-CLI invocation patterns + flags (load when picking a CLI)
    ├── standards.md                   # What findings are judged against, per dimension, linked into reference/ (load once per session)
    └── second-opinion-log-template.md # Working-log skeleton (copy when starting a session)

Load reference files only when you need them. Progressive disclosure keeps the entry point cheap.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Jr Rails Second Opinion」では何ができますか?

ローカルにインストールされたエージェント型CLI(claude、codex、opencode、gemini、aiderなど)に委任して、ブランチ、PR、または作業ツリーについてRailsに詳しいセカンドオピニオンを得られます。単体で動作し、MCPサーバーは不要です。

TypingMindでJr Rails Second Opinionを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Jr Rails Second Opinionはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにJr Rails Second Opinionをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/julianrubisch/skills/tree/main/jr-rails-second-opinionを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Jr Rails Second Opinionを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Jr Rails Second Opinionで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもJr Rails Second Opinionを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Jr Rails Second Opinion」は無料ですか?

はい。julianrubischがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇