brain-first-lookup

Enforces querying the gbrain knowledge base before any external API call.

1|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/tapway/shogun-os --skill brain-first-lookup-tapway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: brain-first-lookup
Source: https://github.com/tapway/shogun-os/tree/main/skills/gbrain/brain-first-lookup
Command: npx skills add https://github.com/tapway/shogun-os --skill brain-first-lookup-tapway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Agents often waste API credits and time by searching the web, Slack, or email for information that already exists in the internal gbrain knowledge base of ~16,000 pages. This Skill enforces a mandatory lookup order so internal knowledge is always checked first. ## Core Features & Use Cases - Mandatory Lookup Chain: Defines a strict escalation order from keyword search (mcp_gbrain_search) through hybrid semantic search (mcp_gbrain_query) to multi-hop synthesis (mcp_gbrain_think) before any external API is allowed. - Quality Rules: Sets score thresholds (use results above 0.3), requires source slug citations, and mandates flagging knowledge gaps instead of hallucinating. - Sub-agent Propagation: Provides a standard instruction line to embed in delegated task prompts so sub-agents follow the same brain-first protocol. - Use Case: When asked "Tell me about Eddie Goh", the agent searches gbrain first, retrieves the person page with citations, and only reaches for web search if the brain returns nothing useful. ## Quick Start Ask the agent to look up any person, company, or fact and it will query gbrain before touching any external API.

Frequently Asked Questions about brain-first-lookup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an AI agent check an internal knowledge base before web search?

Define a mandatory lookup chain that runs keyword search first, then hybrid semantic search, then multi-hop synthesis, and only permits external APIs after those steps return nothing. This Skill encodes that order using the mcp_gbrain_search, mcp_gbrain_query, and mcp_gbrain_think tools.

What is the difference between gbrain search, query, and think tools?

mcp_gbrain_search is fast keyword search with zero API cost, mcp_gbrain_query is hybrid semantic plus keyword search for better quality, and mcp_gbrain_think performs multi-hop synthesis with citations and gap analysis for complex questions.

Can I use gbrain lookup without the MCP server connected?

Yes. If the MCP tools are unavailable, use the gbrain CLI directly via terminal commands such as gbrain search, gbrain query, gbrain think, and gbrain get with the target slug.

When should the brain-first lookup protocol not be used?

Skip it for pure operational tasks like file operations, docker, cron, and server management, when the user explicitly asks to search the web, or when the answer is already present in the current conversation context.

What search score is good enough to skip external APIs?

A search score above 0.3 means the brain result should be used and external APIs should not be called. Results below that threshold trigger escalation to semantic query and then synthesis before any external lookup.