Logo: Jr Rails Second Opinion

Jr Rails Second Opinion

Communautéit
julianrubisch
jr-rails-second-opinion

Kritt eng zweet Meenung zu engem Branch, PR oder Working Tree am Rails-Stil, andeems Dir d'Aufgab un eng lokal installéiert agentesch CLI delegéiert (claude, codex, opencode, gemini, aider, etc.). Alles dobäi: kee MCP-Server néideg.

Iwwersiicht

Editeurjulianrubisch
Repositoryskills
Skill-Nummjr-rails-second-opinion
Stären
30
Forks
2
Matgeliwwert Dateien
43
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 43 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    julianrubisch huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Jr Rails Second Opinion an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/julianrubisch/skills/tree/main/jr-rails-second-opinion
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Jr Rails Second Opinion an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Jr Rails Second Opinion automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Jr Rails Second Opinion net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Jr Rails Second Opinion?

Kritt eng zweet Meenung zu engem Branch, PR oder Working Tree am Rails-Stil, andeems Dir d'Aufgab un eng lokal installéiert agentesch CLI delegéiert (claude, codex, opencode, gemini, aider, etc.). Alles dobäi: kee MCP-Server néideg.

Firwat Jr Rails Second Opinion op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Jr Rails Second Opinion besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Jr Rails Second Opinion an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/julianrubisch/skills/tree/main/jr-rails-second-opinion an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Jr Rails Second Opinion benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Jr Rails Second Opinion benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Jr Rails Second Opinion domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Jr Rails Second Opinion gratis?

Jo. julianrubisch huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇