/rubypowers:consulting-an-oraclefrom rubypowers
Packages a failed debugging investigation into a self-contained markdown prompt for a stronger one-shot model (GPT-5 Pro, Opus, Gemini Pro). Includes project briefing, error, what-was-tried, constraints, and attached files.
Ships in rubypowers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
When in-session debugging has stalled, package the failed investigation into a single self-contained markdown file that a stronger one-shot model can answer cold. The oracle has zero project knowledge and no memory of prior runs — the prompt must stand alone.
Core principle: Just-enough context beats whole-repo dumps. A focused 1500-line prompt outperforms a 30k-line dump every time.
This skill produces a file. It does not call any model. Print the path and suggested invocation; let the user run it. This separation is deliberate: keeping prompt-construction decoupled from model-orchestration keeps the skill model-agnostic (works with any oracle the user picks — Codex, Claude, Gemini, paste-into-chat), keeps the artifact re-runnable later, and avoids coupling the skill to credentials, CLI availability, or cost decisions that belong to the user.
Announce at start: "I'm using the consulting-an-oracle skill to package this investigation."
Don't use when:
rubypowers:systematic-debuggingrubypowers:compoundrubypowers:handoffLocation: tmp/oracle/<YYYY-MM-DD>-<slug>.md (Rails projects gitignore tmp/ already).
Fallback: /tmp/oracle-<slug>.md if tmp/ isn't writable or this isn't a Rails project.
Slug: short kebab-case description of the failing symptom — zeitwerk-constant-loop, n-plus-one-after-cache-add, turbo-stream-double-render. Not the branch name, not the ticket ID.
After writing, print:
Oracle prompt: tmp/oracle/2026-05-06-<slug>.md
Suggested invocation:
codex --model gpt-5-pro --file tmp/oracle/2026-05-06-<slug>.md
# or paste into chat.openai.com / claude.ai / gemini.google.com
Run these in parallel and capture output:
cat .ruby-version 2>/dev/null || cat .tool-versions 2>/dev/null
ruby --version
bundle --version 2>/dev/null
grep -E "^\s*(rails|sinatra|hanami|roda|rspec|minitest|sidekiq|good_job|solid_queue|sorbet|rbs|standard|rubocop)" Gemfile 2>/dev/null
test -f Gemfile.lock && grep -E "^\s+(rails|rack|puma|pg|mysql2|sqlite3|redis) \(" Gemfile.lock | head
test -f config/application.rb && grep -E "config\.(autoload|eager_load|cache_classes|active_job|active_record)" config/application.rb
ls config/initializers/ 2>/dev/null
test -f bin/rails && echo "rails app"
test -d app/javascript && ls app/javascript 2>/dev/null
test -f config/importmap.rb && echo "importmap"
test -f Procfile.dev && cat Procfile.dev
Extract: Ruby version, Rails (or other framework) version, DB adapter, test framework, background jobs, asset pipeline, type tooling, linter, Hotwire stack.
From recent session context (read recent tool results, do not re-run failing commands unless they're cheap):
Walk recent session history (your own tool calls and edits in this conversation). Produce 3–7 entries, each:
- Hypothesis: <one line>
Action: <what you changed or ran>
Outcome: <what happened, including partial successes>
Include partial successes — "this fixed one of the failing tests but the other still fails" is high-signal for the oracle. Don't pad: if there were only 2 attempts, write 2.
Start from the failing file and walk one hop:
require, constant references, method calls on collaborators)config/initializers/ that touches this areadb/schema.rb excerpt (only the relevant tables) if ActiveRecord-relatedHard cap: ≤8 files, ≤2000 total lines. If you'd exceed it, prefer fewer files with surrounding context over many files with no context.
This step must run before Step 6, not after. Redacting an already-written file is leak recovery, not prevention — once secrets are on disk, they may be in editor swap files, OS-level backups (Time Machine, Dropbox, iCloud, tmp autosync), shell history, or the user's clipboard before you get a chance to scrub them. Redaction operates on the in-memory prompt body and file contents before the Write tool persists anything.
Scan the prompt body and every attached file for:
.env*, master.key, credentials.yml.enc, *.pem, *.key → never include, even if asked(?i)(api[_-]?key|secret|token|password|bearer|authorization)\s*[:=]\s*['"][^'"]+['"]postgres://user:pass@...)Replace with [REDACTED:<reason>] and keep enough surrounding context for the oracle to understand the structure. Note redactions in the safety footer.
Use the structure in template.md. Section order matters — role and desired output go first because oracles weight the opening of long prompts most heavily.
Print the file path, line count, and suggested invocation. Do not call any model. Do not open the file in an editor.
Always include this section in the oracle prompt — these are the implicit-context items that bite Ruby projects and that an oracle cannot infer:
app/, lib/, or an engine? Is lib/ in autoload paths? Eager-load mode in this environment?Thread.current usage in the call stackgit log -p Gemfile.lock for recently bumped gems on the failing pathconfig/initializers/, lib/core_ext/, or app/lib/ that reopens the failing class?present?/blank?/try collisions, delegate chains, with_options blocksconfig/environments/*.rb differences on the relevant flag?db/schema.rb?Include only the items that might be relevant. Don't pad.
.env "with secrets redacted by hand" — use the redaction step, never trust manual redaction of entire filesOracles are one-shot — the model has no memory of prior runs. Write the prompt so that re-running it later (with the same --file argument) reproduces the same context. That means:
| Step | Action |
|---|---|
| 1 | Detect Ruby/Rails project shape |
| 2 | Pull verbatim failure (command, stack trace, expected vs actual) |
| 3 | Reconstruct hypothesis → action → outcome from session |
| 4 | Pick ≤8 files / ≤2000 lines, one hop from failing file |
| 5 | Redact secrets aggressively |
| 6 | Write tmp/oracle/<date>-<slug>.md using template.md |
| 7 | Print path + suggested invocation; do not call any model |
See template.md for the exact section layout.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lucianghinda/rubypowers --plugin rubypowers35 skills in this plugin
/37signals-styleRails coding patterns derived from analysis of 37signals' Fizzy codebase. Use when writing Rails code in 37signals/Basecamp style or when asked to follow 37signals patterns. Covers controllers, models, views, Hotwire, testing, database, security, and team philosophy./brainstormingUse when starting any creative work — creating features, building components, adding functionality, or modifying behavior — before writing any implementation code./brakemanStatic analysis security vulnerability scanner for Ruby on Rails applications. Use when analyzing Rails code for security issues, running security audits, reviewing code for vulnerabilities, setting up security scanning in CI/CD, managing security warnings, or investigating specific vulnerability types (SQL injection, XSS, command injection, etc.). Also use when configuring Brakeman, reducing false positives, or integrating with automated workflows./compoundUse when a problem has just been solved and verified working — the fix is fresh, the investigation is in recent history, and the solution is non-trivial enough to capture for future reference/compound-refreshUse when docs/solutions/ learnings may be stale — after refactors, migrations, or dependency upgrades, when a retrieved learning feels outdated or contradicts a recently solved problem, when pattern docs no longer reflect current code, or when reviewing docs/solutions/ for accuracy./dispatching-parallel-agentsUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesOther plugins' skills for the same job