Skip to content

feat(genesis-tools): add gt:research skill with MCP-availability protocol - #153

Merged
genesiscz merged 3 commits into
masterfrom
feat/claude-research
Apr 28, 2026
Merged

genesiscz merged 3 commits into
masterfrom
feat/claude-research

Conversation

@genesiscz

@genesiscz genesiscz commented Apr 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • New gt:research skill ported from a personal dispatcher into the public genesis-tools plugin so anyone installing the marketplace can use it
  • Built to be tolerant of missing MCPs: detects which of jina, brave-search, reddit-mcp-server, gh_grep, context7-mcp are live, drops missing ones from the agent allowlist, substitutes per a fallback table, and surfaces the gap in Confidence & Gaps
  • One-time, opt-in install offer when a missing MCP would materially improve a run — AskUserQuestion with three options (Install now / Skip / Don't ask again this run); on Install now the skill prints bun add --global <pkg> and the exact mcpServers JSON snippet from references/mcps.md for the user to paste into their Claude config. The skill never runs install commands itself; user can refuse with no penalty
  • No personal paths or API keys: hardcoded Obsidian vault path replaced with conditional $OBSIDIAN_VAULT_PATH, default save path is project-scoped .claude/work/research/
  • Marketplace + plugin version bumped to 1.0.21

Files added

  • plugins/genesis-tools/skills/research/SKILL.md — main dispatcher (classify → check MCPs → optional install offer → dispatch → stitch)
  • plugins/genesis-tools/skills/research/references/mcps.md — install commands and mcpServers snippets per optional MCP, loaded by the skill only when the user opts in to install

Test plan

  • In a fresh Claude Code session, ask "research what's the current stable version of Bun" — confirm the skill triggers (factual category, single Haiku, ≥3 sources, inline only)
  • Confirm the inline summary surfaces MCPs used / MCPs unavailable lines
  • Disable a preferred MCP via tools mcp-manager disable brave-search, then re-run a comparison query — confirm the skill detects the gap, optionally offers install (or proceeds via WebSearch fallback) and notes it in Confidence & Gaps. Re-enable after
  • Confirm --quick / "temporary" / "just tell me" triggers correctly skip both the install offer and the file write
  • Confirm gt:explore / gt:github references fall back to general-purpose when those sister skills aren't installed

Summary by CodeRabbit

Release Notes

  • New Features

    • Added research skill for categorized internet research queries with MCP tool integration and standardized result reporting.
  • Improvements

    • Enhanced bash prompt detection pattern matching.
    • Improved JSON output serialization for profile commands.
    • Adjusted UI spacing in profile display.

@coderabbitai

coderabbitai Bot commented Apr 27, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This pull request adds comprehensive research skill documentation and performs widespread refactoring across the cmux and doctor modules. Changes include two new skill specification files, systematic conversion of JSON operations to SafeJSON for safer serialization, conversion of value imports to type-only imports, and consistent import reordering and formatting adjustments across numerous files.

Changes

Cohort / File(s) Summary
Research Skill Documentation
plugins/genesis-tools/skills/research/SKILL.md, plugins/genesis-tools/skills/research/references/mcps.md
Added comprehensive specification for gt:research skill with query classification, MCP tool availability detection, installation workflows, per-category agent/tool presets, and standardized report template. Defined fallback behavior and user-install offer guidance.
SafeJSON Migration in cmux
src/cmux/commands/profiles/list.ts, src/cmux/commands/profiles/view.ts, src/cmux/lib/socket.ts
Replaced native JSON.stringify/JSON.parse with SafeJSON.stringify/SafeJSON.parse for safer JSON serialization in profile output and RPC payload handling.
Type-Only Import Conversion in cmux
src/cmux/index.ts, src/cmux/commands/profiles/index.ts, src/cmux/commands/profiles/path.ts
Converted Command import from commander to type-only imports to reduce runtime dependencies.
cmux Formatting & Logic Fixes
src/cmux/lib/format.ts, src/cmux/lib/shell-probe.ts, src/cmux/lib/restore.ts, src/cmux/lib/snapshot.ts, src/cmux/lib/focus-guard.ts
Fixed colored template literal expressions in format.ts, updated bash prompt detection regex to properly match user/host with . and - characters, removed trailing commas, and reformatted parameter declarations.
Option Description Maintenance
src/cmux/commands/profiles/save.ts
Reinstated option descriptions for --no-screen and --no-history flags.
Test File Import Reordering
src/cmux/lib/__tests__/restore-tree.test.ts, src/cmux/lib/__tests__/shell-probe.test.ts, src/cmux/lib/__tests__/store.test.ts, src/doctor/__tests__/integration.test.ts, src/doctor/ui/tui/views/__tests__/*
Consistently reordered imports, moving type-only imports after runtime imports from bun:test, and repositioned setDefaultTimeout in integration test imports.
Doctor UI & Store Formatting
src/doctor/ui/tui/ErrorBoundary.tsx, src/doctor/ui/tui/TrashTray.tsx, src/doctor/ui/tui/stores/engine-store.ts, src/doctor/ui/tui/views/shared.ts
Simplified JSX return statements, adjusted leading whitespace in TrashTray item rendering, reformatted function signatures, and collapsed multi-line parameters to single lines.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a new gt:research skill with MCP-availability protocol support. It is concise, specific, and clearly conveys the primary contribution.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/claude-research

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the genesis-tools plugin to version 1.0.21 and introduces a new gt:research skill. This skill facilitates internet research by categorizing queries and dispatching subagents to utilize available MCP servers, featuring robust handling for missing tools and a comprehensive installation guide for optional dependencies. I have no feedback to provide.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/genesis-tools/skills/research/references/mcps.md`:
- Around line 54-57: Add blank lines before and after each fenced code block
labels such as "Install:" and "Config snippet:" so the markdown complies with
MD031; locate occurrences in the mcps.md file (e.g., the "Install:" block with
```bash and the "Config snippet:" blocks with ```json) and insert a blank line
between the label and the opening fence and another blank line after the closing
fence for all reported occurrences (including the other blocks referenced near
the same sections).
- Line 76: Update the tool list to use fully-qualified MCP tool names: replace
unqualified `get_post_comments` and `get_top_posts` with
`mcp__reddit-mcp-server__get_post_comments` and
`mcp__reddit-mcp-server__get_top_posts` respectively so the Tools used by this
skill line consistently follows the mcp__<server>__<tool> protocol; edit the
`Tools used by this skill:` entry in `mcps.md` to list
`mcp__reddit-mcp-server__search_reddit`,
`mcp__reddit-mcp-server__get_post_comments`, and
`mcp__reddit-mcp-server__get_top_posts`.

In `@plugins/genesis-tools/skills/research/SKILL.md`:
- Line 83: Add a blank line immediately after each category heading in SKILL.md
(for example after the "### factual" heading and the other category headings
flagged) to satisfy markdownlint MD022; locate the headings (the lines that
start with "### " followed by the category name) and insert a single empty line
directly beneath each one so every category heading is followed by a blank line.
- Around line 126-127: The sentiment preset lists Reddit tools without the
required prefix causing invalid tool references; update the entries so
`get_post_comments` and `get_top_posts` are qualified with the
`mcp__reddit-mcp-server__` prefix (i.e., use
`mcp__reddit-mcp-server__get_post_comments` and
`mcp__reddit-mcp-server__get_top_posts`) to match the existing
`mcp__reddit-mcp-server__search_reddit` naming in the SKILL.md sentiment preset.
- Line 202: The fenced code block that begins with the line containing ROLE: in
SKILL.md is missing a language identifier (MD040); update that fenced template
block to declare a language (for example add "text" or "markdown") immediately
after the opening triple backticks so the block reads like ```text followed by
the ROLE: line to satisfy markdownlint and make the block explicit.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ee55298b-2df0-4e7c-b843-6dc1c9b08d4a

📥 Commits

Reviewing files that changed from the base of the PR and between 37efa34 and 981ea7d.

📒 Files selected for processing (4)
  • .claude-plugin/marketplace.json
  • plugins/genesis-tools/.claude-plugin/plugin.json
  • plugins/genesis-tools/skills/research/SKILL.md
  • plugins/genesis-tools/skills/research/references/mcps.md
📜 Review details
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-03-09T13:39:43.059Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 82
File: src/claude/lib/usage/dashboard-config.ts:24-25
Timestamp: 2026-03-09T13:39:43.059Z
Learning: GenesisTools (genesiscz/GenesisTools) is a personal CLI tool, not a multi-tenant service. Do not suggest data migration paths or backward-compatibility shims for simple default value changes in configuration files (e.g., dashboard-config.ts). The TUI provides interactive controls (e.g., the `i` key to cycle poll intervals at runtime), so users can adjust settings without needing automated migrations. Avoid overengineering suggestions in this context.

Applied to files:

  • plugins/genesis-tools/.claude-plugin/plugin.json
  • .claude-plugin/marketplace.json
📚 Learning: 2026-02-25T23:00:07.620Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 56
File: plugins/genesis-tools/commands/github-pr.md:131-131
Timestamp: 2026-02-25T23:00:07.620Z
Learning: Adopt the style: use lowercase 'markdown' (not 'Markdown') in the GenesisTools documentation. Apply this consistently across all Markdown files in the repository (any .md file), including generated docs and READMEs.

Applied to files:

  • plugins/genesis-tools/skills/research/references/mcps.md
  • plugins/genesis-tools/skills/research/SKILL.md
🪛 LanguageTool
plugins/genesis-tools/skills/research/SKILL.md

[uncategorized] ~102-~102: The official name of this software platform is spelled with a capital “H”.
Context: ...purpose, GitHub issues/discussions via gt:github` skill if available, sorted by reaction...

(GITHUB)


[style] ~117-~117: To elevate your writing, try using an alternative expression here.
Context: ...le general-purpose, Sonnet (precision matters for code) - Tools: `mcp__gh_grep__s...

(MATTERS_RELEVANT)


[uncategorized] ~118-~118: The official name of this software platform is spelled with a capital “H”.
Context: ...mcp__gh_grep__searchGitHub (primary), gt:github skill for issues/PRs if available, `mc...

(GITHUB)


[uncategorized] ~127-~127: The official name of this software platform is spelled with a capital “H”.
Context: ...issing - B — GitHub issue threads via gt:github skill (sorted by reactions); fall back...

(GITHUB)


[uncategorized] ~127-~127: The official name of this software platform is spelled with a capital “H”.
Context: ...eactions); fall back to WebSearch for site:github.com issues if missing - **Min sources:...

(GITHUB)

🪛 markdownlint-cli2 (0.22.1)
plugins/genesis-tools/skills/research/references/mcps.md

[warning] 55-55: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 60-60: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 81-81: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 86-86: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 124-124: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 129-129: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

plugins/genesis-tools/skills/research/SKILL.md

[warning] 83-83: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 90-90: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 97-97: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 106-106: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 115-115: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 123-123: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 202-202: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (2)
plugins/genesis-tools/.claude-plugin/plugin.json (1)

3-3: Version bump is correct and release-aligned.

The manifest version update to 1.0.21 is appropriate for the new skill release and is internally consistent in this file.

.claude-plugin/marketplace.json (1)

4-4: Marketplace and plugin versions are properly synchronized.

Both version fields are consistently bumped to 1.0.21, which matches the plugin manifest and avoids metadata drift.

Also applies to: 14-14

Comment thread plugins/genesis-tools/skills/research/references/mcps.md
Comment thread plugins/genesis-tools/skills/research/references/mcps.md Outdated
Comment thread plugins/genesis-tools/skills/research/SKILL.md
Comment thread plugins/genesis-tools/skills/research/SKILL.md Outdated
Comment thread plugins/genesis-tools/skills/research/SKILL.md Outdated
…ocol

Ports the personal research dispatcher into the public genesis-tools
plugin. Skill detects which MCPs (jina, brave-search, reddit-mcp-server,
gh_grep, context7-mcp) are live, degrades gracefully when missing, and
offers a one-time install prompt with bun add + config snippet from
references/mcps.md. Removes hardcoded Obsidian vault path and personal
API keys; save behavior defaults to project-scoped .claude/work/research/
with optional Obsidian copy when OBSIDIAN_VAULT_PATH is set.

Bumps marketplace + plugin version to 1.0.21.
- src/cmux: organize imports, useImportType, format, swap JSON for SafeJSON, drop unused TREE_GAP, fix useless regex escape
- src/doctor: organize imports, format
@genesiscz
genesiscz force-pushed the feat/claude-research branch from 981ea7d to f038a7c Compare April 28, 2026 17:51
- mcps.md: blank lines around fenced code blocks (MD031)
- mcps.md: qualify Reddit tool names with mcp__reddit-mcp-server__ prefix
- SKILL.md: blank lines after category headings (MD022)
- SKILL.md: qualify Reddit tool names in sentiment preset
- SKILL.md: add 'text' language tag to template fenced block (MD040)
@genesiscz
genesiscz merged commit 8e60ec2 into master Apr 28, 2026
3 of 4 checks passed
@genesiscz
genesiscz deleted the feat/claude-research branch April 28, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant