Agent skill

Resolve Before Asking

by garrytan in garrytan/gbrain

Gate on identity questions to the user. An agent skill from garrytan/gbrain.

MITAuto-check passed

Install Resolve Before Asking

skills CLI
$ npx skills add garrytan/gbrain --skill resolve-before-asking -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install garrytan/gbrain resolve-before-asking --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/garrytan/gbrain.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/resolve-before-asking .claude/skills/resolve-before-asking && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
resolve-before-asking
GitHub stars
31k
Token cost
~3.4k tokens
SKILL.md length
1,665 words
Files
2
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

Gate on identity questions to the user. An agent skill from garrytan/gbrain.

  • Works in 6 steps: think — cross-brain synthesis (solves… → search + full page read → Query each mounted source the brain… → …
  • SKILL.md covers Purpose, The Bug This Kills, When This Fires and The Lookup Chain (run in…, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Resolve Before Asking is an agent skill from garrytan/gbrain. Gate on identity questions to the user. Before any "who is X?" (or role / relationship question) reaches the user, exhaust the brain's lookup chain: think → search + page read → mounted sources → timeline/graph → web. If escalation survives the chain, ask WITH a hypothesis, never a bare unknown. Also owns the no-placeholders-at-ingest rule: pages created during bulk ingestion get their relationship/role resolved immediately.

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

The repository describes itself as: Garry's Opinionated OpenClaw/Hermes Agent Brain. The licence is MIT.

Example prompts

  • “who is X?”
  • “/resolve-before-asking”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. think — cross-brain synthesis (solves most cases)
  2. search + full page read
  3. Query each mounted source the brain actually has
  4. Timeline + graph walk
  5. Web search (external escalation, per brain-first)
  6. Escalate to the user (LAST RESORT) — ask WITH a hypothesis

What it can do on your machine

Read from SKILL.md and the folder at commit fc54831. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Resolve Before Asking loads about 3.4k tokens when it runs. Until then it costs about 113 tokens; SKILL.md has 1,665 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~113
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from garrytan/gbrain at commit fc54831, republished under its MIT licence (© garrytan). 1,665 words, ~3,387 tokens.

Download SKILL.mdSave it as .claude/skills/resolve-before-asking/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
resolve-before-asking
description
Gate on identity questions to the user. Before any "who is X?" (or role / relationship question) reaches the user, exhaust the brain's lookup chain: think → search + page read → mounted sources → timeline/graph → web. If escalation survives the chain, ask WITH a hypothesis, never a bare unknown. Also owns the no-placeholders-at-ingest rule: pages created during bulk ingestion get their relationship/role resolved immediately.
version
1.0.0
triggers
resolve before asking, before asking the user, unidentified contact, unknown relationship, should I ask who, don't know who this is, to be filled by content…
mutating
true
writes_pages
true
writes_to
people/, companies/
upstream
resolve-before-asking@fc834ee

Resolve Before Asking — Exhaust the Brain Before Bothering the User

Convention: see conventions/brain-first.md for the base lookup chain (search → query → get_page → external APIs). This skill extends that chain one hop further, to the human boundary: asking the user is the LAST resort, after the brain AND external escalation, not a shortcut around them.

Convention: see _brain-filing-rules.md — pages touched by the ingest-resolution section file by primary subject (people/, companies/).

Purpose

Never ask the user "who is X?" when the answer already exists in the brain.

The memory answers before the human is bothered — that is the product promise. This skill defines the lookup chain that runs before any entity-identification question is sent to the user, and the escalation format when asking really is justified.

The Bug This Kills

The pattern: the agent encounters an entity with a rich brain page — timeline entries, meeting history, an imported message archive — and instead of reading them, asks the user "who is X?". This is lazy escalation. It spends the user's attention on questions the system can answer itself.

Examples of the bug (anonymized):

  • alice-example — her brain page already carried a role line ("Chief of Staff at acme-example") and a long meeting history → the agent still asked.
  • charlie-example — a thick imported email thread whose subject lines all pointed at one shared project → the agent still asked.

When This Fires

This is a harness-routing convention, not a mechanical guarantee: route here whenever ANY of these are true —

  1. A reply draft contains "who is [name]?" or equivalent.
  2. A draft asks about someone's role, relationship, or identity.
  3. You are about to present an entity as "unknown" or "unidentified".
  4. A brain page has [To be filled by content analysis] or similar placeholder text.
  5. You are composing a list of people and leaving any as "unknown relationship".

The Lookup Chain (run in order; STOP at the first clear answer)

Step 1: think — cross-brain synthesis (solves most cases)
bash
gbrain think "Who is {entity}? What is their relationship to the user? What role do they play? Use all available context — meetings, timeline, imported archives, facts."

think synthesizes across ALL brain data. If the entity has a page with imported-activity stats, timeline entries, and meeting history, think will connect the dots. Over MCP, entity("{entity}") first gives a zero-LLM card (aliases, last-touched, top edges); synthesize is the heavy cross-page answer when the card isn't enough.

If this returns a clear answer → STOP. Use the answer. Do not ask the user.

Step 2: search + full page read
bash
gbrain search "{entity}" --limit 5
gbrain get {entity-slug}

What to look for:

  • relationship field in frontmatter — filled means resolved.
  • Role signals repeated in timeline entries ("advisor", "colleague at acme-example", "chief of staff").
  • Facts table — any role/relationship facts.
  • Meeting history — what did they attend? With whom?

If timeline entries repeat a consistent role → STOP. The role is obvious. Do not ask the user.

Step 3: Query each mounted source the brain actually has

Don't hardcode channels. Check what the brain holds, then query it:

bash
gbrain sources list
gbrain query "emails with {entity}" --limit 10
gbrain query "meetings with {entity}" --limit 5

Whatever is mounted — an email archive, calendar imports, chat transcripts, meeting notes — a handful of subject lines or meeting titles usually reveals the relationship:

  • Invoice / scheduling / billing subjects → professional services.
  • Recurring 1:1 titles with consistent co-attendees → colleague.
  • Dinner / weekend-plan messages → personal friend.
Step 4: Timeline + graph walk
bash
gbrain timeline {entity-slug} --limit 20
gbrain backlinks {entity-slug}
gbrain graph {entity-slug} --depth 2

Dated events, who references this entity, and what it connects to. A person who back-links from a company page and three meeting pages is not an unknown.

Step 5: Web search (external escalation, per brain-first)

Only after steps 1–4 return nothing useful. Run a generic web search on "{entity name} {company/domain hints accumulated in steps 1-4}". Fold anything found back into the brain page before using it (the brain-ops read-enrich-write cycle), so the next lookup doesn't repeat the work.

Step 6: Escalate to the user (LAST RESORT) — ask WITH a hypothesis

Only after ALL previous steps return nothing conclusive:

  • State what you searched.
  • State what you found — even partial signals.
  • Ask a SPECIFIC, confirmable question: not "who is X?" but "Is {entity} the {best guess assembled from partial signals}?"

Use ask-user for the choice-gate mechanics (2–4 options, escape hatch, stop the turn).

Confidence Thresholds

  • High confidence (don't ask): think/synthesize gives a clear answer, OR 3+ timeline entries carry a consistent role description, OR the page's relationship field is filled.
  • Low confidence (ask, leading with your best guess): contradictory signals or very sparse data. Ask — but the question opens with your hypothesis, and states the contradiction if there is one.

There is no third state. Either the brain answered (use it) or it didn't (finish the chain, then ask with a hypothesis).

No Placeholders at Ingest

When ANY ingestion pipeline (email import, calendar enrichment, chat transcripts, meeting ingestion) creates or significantly updates a person or company page, resolve the entity's identity and relationship immediately — never leave placeholder text. Pages like

  • [To be filled by content analysis]
  • > Contact from the user's personal network.
  • an empty ## Context section

are bugs, especially when the ingestion batch itself contains hundreds of signals about who the person is. Run this as a post-ingestion pass over every page the batch created or updated:

  1. Check for placeholders. Scan the touched pages for markers ([To be filled, Unknown relationship, TBD). No placeholders AND relationship filled → skip, already resolved.
  2. Run the chain (steps 1–4 above; at ingest time, step 1 alone usually suffices because the batch just wrote the signals think needs).
  3. Extract: relationship type (friend / colleague / advisor / family / founder), professional role (title + company), key context (how they know the user, what era).
  4. Update the page (put_page): fill the relationship frontmatter field, replace the placeholder description with a real one-liner, update the ## Context or intro paragraph.
  5. Batch efficiency for bulk runs (100+ pages): resolve in batches of 10–20; prioritize by captured-activity volume (more activity = more likely the user meets this name in a briefing); skip pages already substantive.
Email-domain shortcut (hypothesis generator, not proof)

Before running the chain, the sender's domain often seeds the hypothesis:

Domain shapeHypothesis
@acme-example.com — a company already in the brainLikely acme-example employee. Confirm against the company page + shared meetings, then fill.
Corporate domain NOT in the brainNew company. Run the chain; consider seeding a companies/ page.
Personal domain (gmail, etc.)No shortcut — run the full chain.
Show full SKILL.md (654 more words)Show less
Quality bar

A resolved page passes this test: if the user encounters the name in a briefing, triage, or meeting prep, the page's first line says who they are WITHOUT the user needing to ask.

  • Bad: > Contact from the user's personal network.
  • Good: > Operations lead at acme-example — handles invoicing and vendor onboarding for the user.

Contract

This skill guarantees:

  • No identity/role/relationship question reaches the user until the lookup chain (steps 1–5) has run for that entity.
  • Every escalation states what was searched, what was found, and leads with a hypothesis — never a bare "who is X?".
  • No placeholder text survives an ingestion batch on pages this skill touches; relationship/role fields are filled at write time.
  • Writes land only under the writes_to: directories, filed by primary subject per _brain-filing-rules.md.
  • Privacy contract preserved: no real names, no fork-specific filesystem path literals, no upstream-fork references in examples.

Output Format

Two possible outputs:

(a) Resolved silently — the identity is used in the current flow; if a page had a placeholder, it is filled (put_page) as a side effect. No message to the user about the lookup.

(b) Escalation with a hypothesis — formatted per the ask-user choice gate:

🔀 **Is {entity} the {best guess}?**

Searched: think, search + page read, mounted sources, timeline/graph, web.
Found: recurring invoices from @widget-co.com; two meetings alongside the
acme-example team. Nothing names their role directly.

1. **Confirm** — {entity} is {best guess}
2. **Correct me** — it's someone else (tell me who)
3. **Skip** — leave unresolved for now

After emitting the gate, stop the turn (see ask-user).

When it fails

Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:

  • Every lookup comes back empty with a degraded notice: keyword-only search can miss the entity. Say so in the confirmable question instead of asking "who is X?" cold.
  • get_page returns page_not_found for a guessed slug: try title and alias search before concluding the entity is unknown.
  • Filling a page returns revision_conflict: re-read and merge.

Anti-Patterns

  • ❌ "Who is X?" with no prior lookup.
  • ❌ "What's their relationship to you?" when the brain page has dozens of timeline entries.
  • ❌ Presenting a list of unknowns without running the chain on each one.
  • ❌ Leaving [To be filled by content analysis] on a page whose ingestion batch carried hundreds of signals.
  • ❌ Asking about someone whose email address names their employer (jane@acme-example.com).
  • ❌ Using memory_search for entity lookups — memory tools search session notes, not the brain knowledge graph; brain-first.md bans this. Use search / query / entity.
  • ❌ Treating a nonzero search hit count as chain-complete — read the page; run query for synonym phrasings before concluding "not in the brain".
  • ❌ Escalating with false confidence: partial signal is a hypothesis, not a resolution. If signals contradict, the escalation states the contradiction.

Dedup (sharp boundaries)

  • query — owns the lookup verb mechanics (3-layer search, synthesis, citations) for answering the user's questions. This skill consumes those same tools but owns a decision, not a lookup: WHETHER an identity question is allowed to reach the user at all.
  • brain-ops — owns the general read-enrich-write cycle for every brain interaction. This skill is the gate on one specific exit ramp of that cycle: the identity question to the human.
  • ask-user — owns HOW to ask (choice-gate format, option limits, stopping the turn). This skill owns WHETHER asking is justified and WHAT the question must contain (searched / found / hypothesis).
  • enrich — owns creating and updating entity pages with the tiered enrichment protocol. The "No Placeholders at Ingest" section here is the acceptance bar those writes must meet; when a placeholder needs filling, run this skill's chain, then write via the enrich/brain-ops conventions.
  • conventions/brain-first.md — owns brain-before-external-API ordering for all lookups. This skill inherits that ordering and adds the final boundary: external-before-human.
  • A dedup-before-create entity guard (phonetic/alias matching before a new page is created) is a DIFFERENT failure class — that guard prevents duplicate pages at write time; this skill prevents needless questions at ask time. Cross-reference, don't merge, if/when it ships.

The Standard

Would the user look at this person's brain page — the imported archive, the employer-revealing email domain, the timeline entries all repeating the same role — and think it was reasonable that the agent asked who this person is?

If the answer is no, the chain wasn't run. Run it.

© garrytan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/resolve-before-asking of garrytan/gbrain.

  • SKILL.md
  • routing-eval.jsonl

Open the folder on GitHubat commit fc54831

Compare with similar skills

Resolve Before Asking next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Resolve Before Asking compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Resolve Before Asking this skillgarrytan/gbrain31k—~3.4kAutomated safety check: PassMIT
Gate Testsvercel/next.js143k—~2.7kAutomated safety check: PassMIT
PR Feedback Quality Gatenexu-io/open-design100k—~572Automated safety check: PassApache-2.0
Ask Advisor RoutingYeachan-Heo/oh-my-claudecode40k—~572Automated safety check: PassMIT
Gateplugin87/ux-ui-agent-skills1.6k—~532Automated safety check: PassMIT
AskSeemSeam/claude_codex_bridge3.6k—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • Gate Tests

    vercel/next.js

    Official

    How to use the @gate / @force-gate test directives instead of it.skip or fake-green skip patterns.

    143k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • PR Feedback Quality Gate

    nexu-io/open-design

    Safely track pull request feedback, resolve review comments or merge conflicts, validate fixes, and use a read-only cross-review before committing or pushing follow-up changes.

    100k GitHub stars~572 tokensUpdated today
    DevelopmentAuto-check passed
  • Ask Advisor Routing

    Yeachan-Heo/oh-my-claudecode

    Sends a question or task to another locally installed agent CLI, such as Codex or Gemini, through omc ask and saves the answer as a file.

    40k GitHub stars~572 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Gate

    plugin87/ux-ui-agent-skills

    Run the one-command quality gate and report the real N/N result.

    1.6k GitHub stars~532 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Ask

    SeemSeam/claude_codex_bridge

    Delegate work or request information from another CCB-managed agent using ask.

    3.6k GitHub stars~1.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Ask

    SeemSeam/claude_codex_bridge

    Send a request to another CCB agent with ask. An agent skill from SeemSeam/claude_codex_bridge.

    3.6k GitHub stars~221 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from garrytan/gbrain

All 47 skills in this repo
  • Traces a factual error the user points out back to its source (a brain page, a memory file, SOUL.md or USER.md, or a hallucination) and fixes that source instead of just noting the correction.

    31k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Searches and writes a company-wide knowledge brain through the gbrain CLI, so durable decisions and facts about people, projects and history stay findable beyond one session.

    31k GitHub stars~875 tokensUpdated today
    Auto-check passed
  • Idea Ingest

    garrytan/gbrain

    Ingest links, articles, tweets, and ideas into the brain. An agent skill from garrytan/gbrain.

    31k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Sends what your notes already know about a topic to Perplexity, so the cited web search reports only what is new, such as entity updates or deal changes.

    31k GitHub stars~2k tokensUpdated today
    Auto-check: notes
  • Schema Unify

    garrytan/gbrain

    Migrate a brain from gbrain-base (or any pack) to gbrain-base-v2's 14-canonical-type taxonomy via gbrain onboard --check + the unify-types Minion handler.

    31k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Skillpack Check

    garrytan/gbrain

    Run gbrain skillpack-check to produce an agent-readable JSON health report for the gbrain install.

    31k GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Questions about Resolve Before Asking

What does Resolve Before Asking do?

Gate on identity questions to the user. An agent skill from garrytan/gbrain. Resolve Before Asking is an agent skill from garrytan/gbrain. Gate on identity questions to the user.

How do I install Resolve Before Asking in Claude Code?

Run `npx skills add garrytan/gbrain --skill resolve-before-asking -a claude-code`. Or copy the skill folder (skills/resolve-before-asking in garrytan/gbrain) into .claude/skills/resolve-before-asking in your project. Claude Code loads it when a task matches its description.

How do I install Resolve Before Asking in Codex?

Run `npx skills add garrytan/gbrain --skill resolve-before-asking -a codex`. Or copy the skill folder (skills/resolve-before-asking in garrytan/gbrain) into .agents/skills/resolve-before-asking in your project. Codex loads it when a task matches its description.

Can I use Resolve Before Asking in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add garrytan/gbrain --skill resolve-before-asking -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/resolve-before-asking, .gemini/skills/resolve-before-asking, .github/skills/resolve-before-asking and .opencode/skills/resolve-before-asking in your project.

What does Resolve Before Asking need to run?

SKILL.md names no scripts, command-line tools or credentials: Resolve Before Asking is instructions for the agent only.

Does Resolve Before Asking access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Resolve Before Asking safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Resolve Before Asking use?

Resolve Before Asking is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Resolve Before Asking use?

About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Resolve Before Asking?

Skills that share tags, products or a category with Resolve Before Asking: Gate Tests (vercel/next.js, 143k stars), PR Feedback Quality Gate (nexu-io/open-design, 100k stars), Ask Advisor Routing (Yeachan-Heo/oh-my-claudecode, 40k stars) and Gate (plugin87/ux-ui-agent-skills, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Resolve Before Asking?

garrytan (a GitHub user) maintains it in garrytan/gbrain, which has 30,701 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on October 9, 2026.

Source: garrytan/gbrain on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.