brain-ingest-gate
Pre-write quality gate for content entering the brain. No raw copies: a bare cp/mv into the brain repo is a bug. Before any new page lands, resolve named…
Quality gate via second model. Spawn a different AI model to review work before committing. Includes refusal routing: if one model refuses, switch silently to the next. Extended in v0.25.1 with structured review-mode gating (when to invoke vs not) and a Codex code-review handoff
$ npx -y skills add garrytan/gbrain --skill cross-modal-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cross-modal-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Quality gate via second model. Spawn a different AI model to review work before committing. Includes refusal routing: if one model refuses, switch silently to the next. Extended in v0.25.1 with structured review-mode gating (when to invoke vs not) and a Codex code-review handoff
name: cross-modal-review version: 1.1.0 description: | Quality gate via second model. Spawn a different AI model to review work before committing. Includes refusal routing: if one model refuses, switch silently to the next. Extended in v0.25.1 with structured review-mode gating (when to invoke vs not) and a Codex code-review handoff for the diff-review case. triggers: - "second opinion" - "cross-modal review" - "double check this" - "get another perspective" - "challenge this code" - "adversarial review" tools: - search - query - get_page mutating: false
> **Convention:** see [conventions/cross-modal.yaml](../conventions/cross-modal.yaml) > for the review pairs and refusal routing chain.
> **Relationship to `gbrain eval cross-modal`:** This skill is the manual > mid-flow gate (one model reviews work product before commit, with refusal > routing). The `gbrain eval cross-modal` command (v0.27.x) is a sibling > surface: 3 different-provider frontier models score-and-iterate on a > documented dimension list *before* tests cement behavior. Use this skill > for ad-hoc second opinions; use `gbrain eval cross-modal` for the > skillify Phase 3 quality gate. The two are complementary, not redundant.
This skill guarantees:
(what was promised), not vibes.
Invoke this skill when:
lines. Architecture decisions, refactors, API changes.
webhook transforms, cross-skill data passing.
progress.
or bulk writes (see [conventions/test-before-bulk.md](../conventions/test-before-bulk.md)).
affect operational behavior.
against the originating skill's Contract.
Do NOT invoke for:
1. **Capture the work product.** The brain page, analysis, code diff, or decision to be reviewed. 2. **Load the Contract.** Read the originating skill's Contract section (what was promised). 3. **Spawn review model.** Send the work + Contract to a different model. Use [conventions/model-routing.md](../conventions/model-routing.md) for model selection. 4. **Grade.** Model evaluates: did the output follow the Contract? Pass / fail with specific citations. 5. **Report.** Present agreement / disagreement to the user. Never auto-apply the reviewer's suggestions.
For diff review specifically, gstack ships a `/codex` skill that wraps the OpenAI Codex CLI. Two modes:
Independent diff review from a different AI system. The user invokes `/codex review` (gstack-shipped); cross-modal-review's job is to RECOGNIZE when this is the right tool and recommend it explicitly.
**When to recommend `/codex review`:**
**Output framing (when cross-modal-review surfaces Codex output):**
CODEX REVIEW (independent second opinion): ══════════════════════════════════════════ <full codex output, verbatim> ══════════════════════════════════════════ CROSS-MODEL ANALYSIS: Both found: [overlapping findings] Only Codex: [findings unique to Codex] Only Claude: [findings unique to my analysis] Agreement: X% (N/M findings overlap)
User decides what to act on. Cross-model agreement is signal, not permission.
Same shape, different prompt. Used on security-sensitive changes: the reviewer is asked to find injection vectors, race conditions, auth bypasses, data leaks, privilege escalation paths.
Output adds an exploitability rating (CRITICAL / HIGH / MEDIUM / LOW) and recommended mitigations.
If the primary review model refuses:
1. Switch silently to the next model in the chain (see `conventions/cross-modal.yaml`). 2. Don't show the refusal to the user. 3. Don't announce the switch. 4. If ALL models in the chain refuse, escalate to the user.
Cross-Modal Review
==================
Reviewer: {model name}
Contract: {originating skill}
Verdict: PASS | ISSUES FOUND
Findings:
- {finding with evidence}
Agreement with primary: {X}%Cross-Modal Review (code)
==========================
Mode: Codex Review | Adversarial Challenge
Files changed: N
Lines changed: +N / -N
{mode-specific output above}Reviewer findings are INFORMATIONAL until the user explicitly approves each one. Do NOT incorporate reviewer recommendations into the work product without presenting each finding and getting explicit approval. This applies even when the reviewer is correct. Cross-model consensus is a strong signal — present it as such — but the user makes the decision.
Give the agent you already use a memory you control. GBrain stores explicit facts with their sources, supports corrections and withdrawal, and makes the same memory available across your agents.
Repo: garrytan/gbrain
Pre-write quality gate for content entering the brain. No raw copies: a bare cp/mv into the brain repo is a bug. Before any new page lands, resolve named…
When you report a brain page to the user — created, edited, committed, or relayed from a subagent — a working link is part of the deliverable, in the SAME…
Brain knowledge base operations. The core read/write cycle: brain-first lookup, read-enrich-write loop, source attribution, ambient enrichment, back-linking.…
Deduplicate and synthesize raw concept stubs into a tiered intellectual map (T1 Canon to T4 Riff), tracing idea evolution across sources over time. Transforms…
Token-hygiene audit of the always-loaded context stack — CLAUDE.md, AGENTS.md, auto-memory MEMORY.md, and the bootstrap-rendered identity files (SOUL.md,…
When the user corrects a factual error, root-cause it immediately. Don't just note the correction — trace the error to its source, fix the source, and prevent…