/fabrik:second-opinionfrom fabrik
Queries OpenAI models via codex CLI or Google Gemini via agy CLI for an independent take on design decisions, bugs, or code reviews. Use only on explicit user request.
Ships in fabrik. 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.
None: SKILL.md is the whole skill.
Consult another model -- OpenAI's through the codex CLI, or Google's Gemini through the agy (Antigravity) CLI -- and relay what it says. The value of a second opinion is independence: let the other model reach its own conclusion, verify what it claims, then report it faithfully -- especially where it disagrees with you.
The sections on writing the prompt, verifying, and relaying apply to both CLIs.
Use a working directory in the session scratchpad, and write the prompt to a file. A file avoids shell-quoting pain and keeps a record of what was asked:
DIR=<your scratchpad>/second-opinion
mkdir -p "$DIR"
# write $DIR/prompt.md
$DIR is the session scratchpad, never the repository or worktree under review. Prompt, answer, and log are tooling artifacts, not project files, and a 50-300 KB log dropped into the worktree pollutes the very diff you're asking the other model to read. Sub-agent definitions that forbid writing outside the workspace -- the builder's scope boundary, say -- aren't aimed at your own scratch files.
Expect minutes, not seconds for both CLIs -- several minutes at default effort, longer at high effort on big questions. Run the call as a background Bash task, then wait on the output file itself (e.g. a bounded until [ -s "$DIR/answer.md" ]; do sleep 15; done loop, backgrounded or via Monitor; for agy, wait on $DIR/agy.json). Don't poll with pgrep -- other agents may be running the same CLI.
Check auth once per session: codex login status should print Logged in using ChatGPT (or the API-key equivalent). Anything else: stop and ask the user to authenticate -- suggest they type ! codex login (ChatGPT account, usage billed to their plan) or use codex login --api-key <key>.
codex exec -C <repo root> -s read-only -o "$DIR/answer.md" - < "$DIR/prompt.md" > "$DIR/codex.log" 2>&1
codex exec is non-interactive mode; - reads the prompt from stdin.-C <dir> pins codex's working root. Pass it always: your own working directory resets between Bash calls, so "run it from the repo root" is not something to rely on. Add --skip-git-repo-check if the target isn't a git repository.-s read-only lets codex read the workspace and run read-only commands to explore on its own, but never write. It also blocks network access -- so paste into the prompt anything codex cannot discover locally: gh output, release data, error logs, conversation context, external docs.-o writes only the model's final answer to answer.md. Read that file for the opinion.codex.log gets the event stream: a header (model, effort, session id), every command codex ran, and the full text of every file it read -- often 50-300 KB. Never cat it into context; head -15 for the header, tail -3 for the token count, and leave the rest on disk.-i <file> if the question is visual.Omit model and effort flags by default so Codex uses the user's configuration or its built-in defaults. The header in codex.log confirms which model and effort ran.
To dial down for a quick, cheap opinion:
codex exec -m gpt-6.2-sol -c model_reasoning_effort="medium" ...
gpt-6.2-astra when a difficult question needs deeper reasoning. For a quicker run, choose gpt-6.2-sol, gpt-6.1-terra, or gpt-6-luna.low, medium, high, xhigh, plus max (deeper single-track reasoning) and ultra (parallel internal subagents) for genuinely gnarly problems -- both slow and allowance-hungry, and not available on Luna.The session id is printed in the codex.log header. Continue the conversation with:
codex exec resume <session-id> "follow-up question"
This keeps the model's context, so use it when the user reacts to the opinion ("ask it about X too", "tell it we can't do that because Y"). Add --ephemeral to the original command only for one-shots you will never resume; it prevents the session from being saved.
For "second opinion on this diff/branch/commit", prefer codex exec review over a hand-rolled prompt. It is a dedicated review mode with a strict reviewer prompt -- only definite bugs introduced by the change, pre-existing problems excluded, "prefer no findings" over speculation -- and it is read-only by construction.
codex exec review --base main -o "$DIR/review.md" </dev/null > "$DIR/review.log" 2>&1
--uncommitted (staged + unstaged + untracked), --base <branch>, --commit <sha>, or a custom prompt. A custom prompt cannot be combined with a git scope -- for a focused review ("check only the error paths"), capture the diff to a file yourself and use plain codex exec.-C), so cd as part of the same command.--json if you want the structured findings events instead of prose.agy has no login-status command. Check auth once per session with agy models: a signed-in CLI prints the model list. A sign-in error: stop and ask the user to authenticate -- suggest they type ! agy and sign in interactively.
cd <repo root> && agy --output-format json --print-timeout 1200s --sandbox \
--settings '{"agentMode":"","toolPermission":"proceed-in-sandbox","permissions":{"allow":[],"deny":["write_file(.)","read_file('"$HOME"'/.gemini/config/plugins)"]}}' \
-p "$(cat "$DIR/prompt.md")" > "$DIR/agy.json" 2> "$DIR/agy.log"
agy has no read-only mode, and by default it can edit files headless. The --sandbox and --settings flags make the workspace read-only for this one run, without touching the saved settings in ~/.gemini/antigravity-cli/settings.json. Don't change that file, and don't drop any part of the configuration:
--sandbox turns on agy's terminal sandbox."agentMode":"" selects Default mode, which --mode can't. Don't use --mode plan: the model then writes an implementation plan and asks for approval instead of answering."toolPermission":"proceed-in-sandbox" auto-approves commands that run inside the sandbox. Without it, Default mode denies even cat.deny write_file(.) denies the write and edit tools in the workspace, added directories included. It also makes the sandbox deny shell writes there, so echo >, rm, touch, and mkdir fail with Operation not permitted. Shell writes outside the workspace aren't covered, and outside your home directory they succeed: in a worktree whose main checkout lives there, git add and git commit succeed, because they write to the main checkout's .git.deny read_file(<plugins dir>) stops agy reading the skills its plugins install, so it can't follow one that starts agents of its own. Skills installed elsewhere stay visible, so the prompt should still tell it to do the work itself. --disable-slash-commands does not stop skills loading. The shell expands $HOME in the path; agy doesn't expand ~ in rules, and a rule naming another user's home matches nothing."allow":[] drops the saved allow rules for this run. Each key under permissions replaces its saved value, and keys left out keep theirs, so the deny list here also replaces any saved deny rules for the run: add those to it if you keep any. --settings rejects unknown keys, and also takes a file path instead of inline JSON.Reads, grep, git log, and git diff work, and so does the file-reading tool inside the workspace and added directories. A denied shell command, or a file-tool call matching a deny rule, goes back to the model as an error and it carries on; sub-agents it starts inherit the same limits. Two cases end the run early, with exit code 0, status SUCCESS, an empty response, and jetski: no output produced in agy.log:
BypassSandbox on a command. No setting turns the bypass off.So tell the model in the prompt to read only inside its workspace, never to set BypassSandbox, and to report a failing command and carry on instead.
--print-timeout 1200s ends a run that hasn't finished in 20 minutes, rather than letting it hang.-p (print mode) is the non-interactive mode. It takes the prompt as its value and does not read stdin (-p - sends a literal -), so pass the file contents with "$(cat ...)". Keep -p last: if another flag follows -p directly, agy takes that flag as the prompt and exits with an error.-C: agy's workspace is the process working directory, so cd as part of the same command. Add --add-dir <dir> for more directories..git, outside the workspace, and the sandbox blocks reads under your home directory outside the workspace, so git commands fail with fatal: not a git repository: (null). Don't add that .git with --add-dir or an allow rule to get around it: give agy what it needs as files instead, such as the diff, and tell it in the prompt that git history may be unavailable.--output-format json prints one object: conversation_id, status, response (the final answer), and usage. Extract the opinion with jq -r '.response // empty' "$DIR/agy.json" > "$DIR/answer.md"; plain .response writes null for a missing answer. If response is empty, check denied_actions in the JSON to see what was blocked, and agy.log for jetski: no output produced.--output-format stream-json if you need to see what it did: every tool call and command, one JSON event per line. Like the codex log it is large -- grep it, don't cat it.search_web, read_url_content) and can look things up itself. Paste local-only context (gh output, logs, conversation context) into the prompt all the same.$DIR/input/changes.diff, add --add-dir "$DIR/input" so agy can read it without seeing other answers in $DIR, point the prompt at it, and borrow codex's reviewer stance: only definite bugs introduced by the change, no pre-existing issues, no findings is better than speculation.Omit --model and --effort by default; the user's configuration picks the model. Model ids carry the effort as a suffix (e.g. gemini-4-carbon-high), and agy models lists them all. The json output does not name the model. Neither does stream-json: its init event carries the working directory and tool list, not the model. To attribute it, read the model key in ~/.gemini/antigravity-cli/settings.json.
low/medium/high. Neon and Hydrogen also have xhigh.--model gemini-4-hydrogen-medium.Continue the conversation with the conversation_id from agy.json: run the core command again from the same working directory, with -r <conversation-id> before -p, the follow-up question as the prompt, and fresh output files (agy-2.json, agy-2.log). Keep every other flag, including any --add-dir: --settings lasts for one run only, so a follow-up without it runs with the saved, writable configuration.
State the question, the constraints that matter, and what shape of answer you want (a verdict with reasoning, alternatives considered, risks). Point the model at file paths and let it read them itself -- that is what read-only workspace access buys you, and its own digging through the code and git history is where the best findings come from. Ask it to verify stated premises against the repo rather than accept them; your framing may itself be wrong, and a good second opinion catches that.
Pick one of two modes, depending on what the second opinion is for:
In both modes, do not lead the witness. "We think X is right -- do you agree?" produces agreement, not an opinion.
A second opinion arrives with the same confidence whether it is right or wrong, and both directions occur in practice: the other model may correct a premise you fed it (and be right), or fabricate a supporting fact (a plausible misreading of git history, an invented API behavior) inside an otherwise sound argument. Faithfully relaying a false claim is still a false claim.
So before relaying, check the load-bearing factual claims -- the empirical assertions the opinion stands on: git-history claims (git log, git tag, git diff them), tool and API mechanics (check the docs), numbers and measurements (recompute them). Skip claims that are pure judgment; verify the ones the judgment rests on. Report what you checked and what held -- a verified disagreement is worth far more than an unverified one.
Then weigh each issue by its real-world impact. Other models sometimes raise problems that are more theoretical than practical: a race that needs timing no real workload produces, an input the code never receives, a failure mode that takes several unlikely events in a row. A claim can be factually true and still not matter. Ask how likely the issue is in practice and what happens if it does occur. Issues that never happen in practice or are extremely unlikely can usually be set aside -- say so when relaying, rather than passing them on with the same weight as real problems.
Judgment call, not a rule:
Report what the model actually said. Attribute it (CLI, model, and effort), quote the key passages, note what you verified, and put disagreements with your own view front and center -- an inconvenient second opinion is the whole point of asking. When you asked both CLIs, report where they agree and where they split; don't average them. Do not blend views into consensus mush; where you still disagree after reading it, say so and say why.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub maragudk/fabrik --plugin fabrik28 skills in this plugin
/ableton-liveGuide for making music in Ableton Live 12 on macOS. Use this skill whenever the user asks how to do something in Ableton Live or "in Live", wants help with a Live Set, project, or session, asks which stock Live device or instrument to use for a sound (Operator, Wavetable, Drift, Meld, Simpler, Sampler, Roar, Echo, Hybrid Reverb, Auto Filter, Drum Rack, Racks, Macros...), needs warping, Session vs Arrangement, clip launching, Follow Actions, MIDI editing, MIDI Tools, scale awareness, grooves, automation, clip envelopes, routing, sidechain, resampling, comping, stem separation, bouncing, freezing, exporting, Push 1/2, Link, MIDI sync, CPU or latency troubleshooting, or keyboard shortcuts. Trigger even when the user doesn't say "Ableton" -- words like "Live Set", ".als", "clip slot", "scene", "Drum Rack", "Simpler", "warp marker", "Session View", "Arrangement View", "Max for Live", or "Push" are enough. Also use it when the user is producing electronic music and asks for a workflow or sound-design recipe that will be executed in Live./accomplishmentsExtract accomplishments from new implementation diary entries into docs/accomplishments.md, written as one-line reflections that blend self-appraisal with Markus's appreciation. Use only when the user invokes /accomplishments or explicitly asks to extract, update, or refresh accomplishments from the diary. Do not run proactively.Other plugins' skills for the same job