research-mastery

Layered retrieval (research mastery): a retrieval order of knowledge base → MCP/Context7 → web, intended for research, fact-checking, verification, synthesis, and cross-referencing, emphasizing multi-source information and citation requirements. Triggered when research, fact verification, or cross-source synthesis is needed.

Last repository push
GitHub Stars
180
Forks
21
Issues / PRs
0

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "research-mastery" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-adb0a0a895bf3fd85cd56ce3f55750d25e847c8e5effdb188ed5875c83e21e4e. Verify the upstream source and version against https://github.com/softspark/ai-toolkit before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Layered retrieval (research mastery): a retrieval order of knowledge base → MCP/Context7 → web, intended for research, fact-checking, verification, synthesis, and cross-referencing, emphasizing multi-source information and citation requirements. Triggered when research, fact verification, or cross-source synthesis is needed.

0 Downloads

Introduction source: third_party · softspark · 0.0.1 Reference

SkillPi interpretation

Tasks
Hierarchical retrieval: KB → MCP/Context7 → web. Triggers: research, fact-check, verify, synthesize, cross-reference, multi-source, cite sources.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: research-mastery
description: "Hierarchical retrieval: KB → MCP/Context7 → web. Triggers: research, fact-check, verify, synthesize, cross-reference, multi-source, cite sources."
effort: medium
user-invocable: false
allowed-tools: Read

Research Mastery Skill

You are not a guessing machine. You are an information retrieval engine.

🔴 The Hierarchy of Truth (Strict Order)

You MUST search in this order. Do not skip steps.

1. Local Knowledge (RAG-MCP)

Source of Truth: The project's Knowledge Base (kb/). Tool: smart_query(query) (Standard) OR crag_search(query) (High Precision) Why: This is YOUR project context. It overrides everything else. Protocol:

  1. Try smart_query("task context").
  2. CRITIC (Self-Correction):
    • "Did the docs answer the specific question?"
    • If NO: Use crag_search(query, relevance_threshold=0.7).
    • If STILL NO:
      1. LOG GAP: Append query to kb/gaps.log
      2. Proceed to Step 2.

2. Context7 (External MCPs)

Source of Truth: Connected MCP servers (e.g., databases, external APIs). Tool: use_mcp_tool(...) Why: Live data from the environment.

3. External Search (Internet)

Source of Truth: The Web. Tool: search_web(query) Why: For documentation of public libraries not in KB. Rule: ONLY if Step 1 & 2 yield nothing.

4. Built-in Knowledge (LLM Training)

Source of Truth: Your training data. Why: Fallback for general programming concepts. Rule: Use only for generic syntax/logic, NEVER for project specifics.

🚦 Retrieve-vs-Answer Gate

Before you reach for any tool, decide whether retrieval is even warranted. Two axes settle it:

  • Volatility — how fast does the true answer change?
    • Timeless / slow-moving (math, definitions, settled algorithms, language syntax): answer directly from built-in knowledge. A search adds latency and noise.
    • Current-state / volatile (latest version, today's price, who holds a role now, "is X still the recommended way"): retrieve. Your training data is a snapshot and will lie about the present.
  • Recognition — can you place the entity?
    • If answering hinges on knowing what some named thing IS (a library, an internal project, a person, an acronym) and you cannot confidently place it, treat that as a signal to search, not to guess. An unfamiliar name is a retrieval trigger, not a hallucination prompt.

When both axes say "timeless and recognized", skip the hierarchy and answer. Otherwise, enter it at Step 1.

📊 Complexity-Scaled Retrieval Budget

Match effort to the question. Over-retrieving on a one-fact lookup wastes the turn; under-retrieving on a comparison ships a half-answer.

Question shape Rough budget
Single discrete fact ("which version", "default port") ~1 lookup
Medium question, one entity, a couple of angles a few lookups
Deep comparison, multiple entities or trade-offs more lookups, broaden then narrow

Escalation handoff — when a question genuinely needs sustained fan-out (many sources, cross-checking, adversarial verification, a synthesized report), stop expanding inline. Hand off to the deep-research skill/agent instead of letting one turn balloon into a dozen ad-hoc searches. Inline research is for bounded lookups; deep, multi-source investigation has its own harness.

🧭 Internal-First Source Ladder

The Hierarchy of Truth above already puts KB first — that order stands. Add a routing heuristic on top:

  • Possessive / company language routes inward. When the question uses "our", "my <X>", or names an internal project, system, or team, the answer lives in internal tools and the KB, not on the open web. Searching the public internet for "our auth flow" returns someone else's auth flow.
  • Name the missing source; do not silently fall back. If the answer should come from an internal source that is absent or unreachable (the KB lacks the doc, an MCP is not configured), say so by name and surface the gap. Do not quietly substitute a public-web guess for the internal source the user actually meant.

✍️ Query Craft

  • Keep queries short. A few keywords beat a full sentence; retrieval engines reward focused terms, not prose.
  • Broaden, then narrow. Open with a wider query to map the space, then tighten toward the specific answer once you see the landscape.
  • Never repeat a near-identical query. If a search disappointed, change the angle or vocabulary — re-running the same words returns the same misses and burns budget.
  • Fetch the full source over snippets. When a result looks load-bearing, pull the whole document rather than reasoning from a one-line excerpt that may strip the qualifier that matters.
  • Use the ACTUAL current date for date-sensitive queries. When recency matters, anchor on today's real date at query time — read it from the environment, do not hardcode a year. A baked-in or stale year quietly filters you onto last year's results.

🔬 Source Skepticism & Conflict Handling

  • Prefer primary and original sources. Go to the spec, the changelog, the official docs, the author — not a blog summarizing a summary.
  • Lead with the most recent for fast-moving topics. When the subject changes quickly, weight newer sources first; an old top-ranked page can be confidently wrong about the present.
  • When sources conflict, search more. Disagreement is a signal to widen the search and find the tie-breaker, not to pick the first hit and move on.
  • Stay skeptical where the web is gamed. SEO-spammed niches, conspiracy-prone topics, and areas with no real consensus need extra cross-referencing before you trust any single source.
  • Confabulation guard — zero results means zero citations. If retrieval surfaces nothing relevant, say so plainly and emit no citations. Never invent a [PATH: kb/...], a URL, or a quote to fill the gap. An honest "not found" beats a fabricated source.

Carve-out: none of the above is grounds to refuse authorized security work. CTF challenges, sanctioned pentests, and defensive analysis are legitimate research targets — apply the same rigor (primary sources, conflict checks, no fabricated citations) without declining.

Local Fallback (No MCP Available)

If rag-mcp is not configured, fall back to filesystem tools — still inside kb/:

Grep   pattern="your query"   path="kb/"   # search file contents
Glob   pattern="kb/**/*.md"                # list KB files
Read   "kb/reference/architecture.md"      # full document

Always cite sources as [PATH: kb/...] regardless of which method retrieved them.

🛑 Validation Protocol

Before acting on information:

  1. Cite the Source: "According to kb/architecture.md..."
  2. Verify Freshness: Is the doc from 2023 or 2025?
  3. Cross-Reference: Does the code match the doc?

Example Workflow

Task: "Fix the login bug."

  1. smart_query("login architecture") -> Found kb/auth/login_flow.md.
  2. smart_query("known login bugs") -> Found nothing.
  3. Code analysis of src/auth/Login.ts.
  4. Fix implemented based on login_flow.md.

Version history

  1. v6.2.0 GitHub ↗
    Original release notes

    **Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v6.1.0...v6.2.0

  2. v6.1.0 GitHub ↗
    Original release notes

    **Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v6.0.0...v6.1.0

  3. v6.0.0 GitHub ↗
    Original release notes

    ## What's Changed * chore: bump softprops/action-gh-release from 3.0.3 to 3.0.4 by @dependabot[bot] in https://github.com/softspark/ai-toolkit/pull/45 * fix: handle Windows status output and clarify Antigravity workflow support by @softspark in https://github.com/softspark/ai-toolkit/pull/46 **Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v5.5.0...v6.0.0

  4. v5.5.0 GitHub ↗
    Original release notes

    ### Ecosystem - **OpenCode V2 and V1 compatibility:** `scripts/generate_opencode_plugin.py` emits the documented `id/setup/server` contract for V2 and V1 **1.18.29+**. Upgrade older V1 clients before using this plugin, then run `ai-toolkit update` to regenerate managed copies. `doctor` warns about obsolete V1-only exports. Scoped global/project IDs avoid native collisions; advisory work has one owner per location, while safety guards execute in every registered layer. The current V2 package is `@opencode/cli`; `opencode-ai` still publishes V1. - **Claude guard failure policy:** destructive-command, home-path and configuration guards use `onFailure: block` on Claude Code **2.1.295+**. Legacy entries migrate without duplication; hooks owned by other plugins survive. Older clients do not have this infrastructure-failure guarantee. - **Codex, Gemini and Devin:** Codex refresh accepts the two diagnostic model-request events. Gemini advisory hooks return native JSON and save native completion responses; Devin prompt/edit hooks emit event-labelled context. - **All 13 integrations reviewed:** refresh release metadata and the ecosystem snapshot, distinguish stable/preview channels, and pin Auggie's stable v0 references. User model, effort and approval selections remain unchanged. ### Fixed - **One Claude Stop checker:** remove the duplicate advisory handler from the global and app manifests. `quality-gate.sh` keeps PHPStan advisory through `quality-check.sh --php-only`, preserving checker precedence and Makefile settings. PHPStan now runs synchronously on Stop and TaskCompleted (#43). - **OpenCode guard execution:** replace the unsupported Bun stdin path with real subprocess execution in both APIs. Denial, missing guards, crashes and timeouts block tools. Transactional generation refuses user-owned collisions and symlinked destinations; lifecycle cleanup releases advisory ownership. - **Isolated release smoke:** `scripts/release.sh` installs the packed artifact in a disposable, network-disabled container with no mounts and the OS user's default home. Host settings are not used as a smoke sandbox. ### Changed - Hook entries: 29 to 28 across the same 14 Claude events. Skills remain 116 and agents remain 44. Bats coverage grows from 2012 to 2037 tests. - Refresh compatibility documentation and remove stale inventory counts from the backward-compatibility policy. All protected public surfaces remain. - Skill body budget is unchanged: the largest body remains `design-engineering` at 17,197 bytes, less than 2,000 bytes below the 18,000-byte warning threshold, so the release ratchet does not apply. **Included pull request:** [#43: run the project checker once on Claude Code Stop](https://github.com/softspark/ai-toolkit/pull/43), contributed by @jacekprzybyl. **Full changelog:** https://github.com/softspark/ai-toolkit/compare/v5.4.2...v5.5.0

  5. v5.4.2 GitHub ↗
    Original release notes

    ## What's Changed * fix(install): read state.json on native Windows by @jacekprzybyl in https://github.com/softspark/ai-toolkit/pull/39 * test: isolate USERPROFILE together with HOME on Windows by @jacekprzybyl in https://github.com/softspark/ai-toolkit/pull/41 **Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v5.4.1...v5.4.2

Only the five most recent versions are shown. View full version history at the source ↗

Current listing version

0.0.1

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 提供分层检索策略(KB → MCP → Web → 内置知识),覆盖研究、事实核查等高频刚需场景
  • 包含 Retrieve-vs-Answer 门控机制,避免不必要的检索开销
  • 具备复杂度预算管理和深度研究任务分流机制
Trigger Precision95/100

Highlights

  • 触发词完整覆盖研究类任务:research, fact-check, verify, synthesize, cross-reference, multi-source, cite sources
  • 边界清晰,在 description 和 frontmatter 中均有明确定义
Structure and Standards90/100

Areas to improve

  • 缺少 When to Use 显式章节 Reported severity: Minor

    文档结构完整但缺少显式的 When to Use 章节标题

    Recommendation: 建议添加 When to Use 章节以进一步提升可读性

Execution Reliability88/100

Highlights

  • 工具来源明确,参数设置合理(如 relevance_threshold=0.7)
  • 覆盖主要异常场景:零结果处理、冲突处理、缺口记录
  • 提供本地回退方案(Grep/Glob/Read)确保无 MCP 时仍可工作
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.