kg-reason
Reason over the knowledge graph using LLM agents — natural language Q&A and tool-calling iterative reasoning with bidirectional LLM↔KG validation.
Skill by UynajGI
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/uynajgi-kg-reason
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ml, research
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/kg-reason
What's inside
- Skill name
kg-reason- Description
- Reason over the knowledge graph using LLM agents — natural language Q&A and tool-calling iterative reasoning with bidirectional LLM↔KG validation. Use this skill whenever the user asks a research question that requires synthesizing information across multiple papers, wants to "reason about", "what does the literature say about", "compare approaches", "find the relationship between", or needs evidence-backed answers from their library. Also use when the user wants to validate hypotheses against the graph structure, explore contradicting findings, or needs an AI research assistant that can query concepts, traverse the graph, and read paper sections. Trigger proactively when the user asks complex questions that go beyond simple keyword search.
- License
- MIT
- Instructions
- 92 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# KG Reasoning
Query the knowledge graph with natural language questions. Two modes: `ask` for quick KGQA
(retrieve → answer), and `reason` for deep LLM agent reasoning with tool-calling (iterative
graph exploration, section reading, hypothesis validation).
## Prerequisites
The knowledge graph must be built (`kg-build` skill). Best results with embeddings and closure:
```bash
drbrain index build && drbrain graph closure --mode hybrid
```
## Operations
### ask — Quick KGQA
Natural language question against the knowledge graph. Retrieves top-k relevant concepts and
edges, then generates an answer grounded in the graph:
```bash
drbrain ask "Is attention better than CNN for NLP?"
drbrain ask "what are the main approaches to knowledge distillation" --top 10
drbrain ask "how does BERT handle long sequences" --json
```
Options: `--top` / `-k` (concepts to retrieve, default 5), `--json`.
The answer includes provenance — concepts and edges used as evidence.
### reason — LLM Agent Reasoning
LLM agent with tool access to the knowledge graph. The agent can query concepts, traverse edges,
read paper sections (via PageIndex tree), and iteratively refine its answer:
```bash
drbrain reason "compare the efficiency of sparse vs dense attention mechanisms"
drbrain reason "what open problems remain in graph neural network explainability?"
```
**Bidirectional mode** (`-b`): The agent proposes hypotheses, validates them against graph
constraints (TBox/RBox), and revises. Useful for questions where contradictions or constraints
matter:
```bash
drbrain reason -b "does method A actually solve problem B, or just claim to?"
drbrain reason -b -r 5 "map the causal chain from X to Y across these papers"
```
Options: `-b` / `--bidirectional` (LLM↔KG validation loop), `-r N` / `--max-rounds` (default 3).
## When to use ask vs reason
| Situation | Use |
|-----------|-----|
| Factual lookup ("what is X?") | `ask` |
| Concept comparison ("A vs B") | `ask` (simple) / `reason` (complex) |
| Multi-paper synthesis | `reason` |
| Causal chain tracing | `reason -b` |
| Hypothesis validation | `reason -b` |
| Contradiction resolution | `reason -b` |
## Examples
**Quick concept lookup:**
```bash
drbrain ask "what loss functions are used for contrastive learning?"
```
**Deep multi-paper reasoning:**
```bash
drbrain reason "how do different papers address the over-smoothing problem in GNNs, and which approach is most promising?"
```
**Hypothesis validation with bidirectional loop:**
```bash
drbrain reason -b -r 5 "does the proposed method actually solve the cold-start problem, or does it just shift the burden to feature engineering?"
```
## CLI Reference
| Command | What it does |
|---------|--------------|
| `drbrain ask "<question>"` | KGQA: retrieve → answer |
| `drbrain ask "<q>" --top 10` | More concepts in context |
| `drbrain ask "<q>" --json` | JSON output with provenance |
| `drbrain reason "<question>"` | LLM agent with tool-calling |
| `drbrain reason -b "<q>"` | Bidirectional LLM↔KG validation |
| `drbrain reason -b -r 5 "<q>"` | More hypothesis-revision rounds |From UynajGI/drbrain, MIT.
More from UynajGI/drbrain
- 0.529score
neat-freak
UynajGI
End-of-session knowledge cleanup with OCD-level rigor — reconciles project docs (CLAUDE.md, README.md, docs/) and agent memory against the code so nothing rots.
SkillBFreshness: BClaude Code +9 - 0.524score
kg-build
UynajGI
Build the knowledge graph from ingested papers — 5-stage LLM extraction, TransE graph embeddings, and rule-based closure inference.
SkillBFreshness: BClaude Code +9 - 0.524score
audit
UynajGI
Scan the entire library for data quality issues across 15 severity-graded rules.
SkillBFreshness: BClaude Code +9 - 0.524score
fsearch
UynajGI
Search local evidence and external sources (arXiv) in one command, with ingested annotation.
SkillBFreshness: BClaude Code +9 - 0.524score
graph
UynajGI
Direct knowledge graph operations — traverse neighbors, find shortest paths, and analyze shared concepts across papers.
SkillBFreshness: BClaude Code +9 - 0.524score
index
UynajGI
Prepare, inspect and verify the searchable index.
SkillBFreshness: BClaude Code +9 - 0.524score
ingest-link
UynajGI
Ingest web URLs and online PDFs by extracting rendered content via an external qt-web-extractor service.
SkillBFreshness: BClaude Code +9 - 0.474score
backup
UynajGI
Create and manage backups of DrBrain data — local tar.gz archives and rsync remote sync.
SkillCFreshness: CClaude Code +9 - 0.474score
citation-tracking
UynajGI
Track and analyze citation relationships between papers.
SkillCFreshness: CClaude Code +9 - 0.474score
document
UynajGI
Inspect Office documents (DOCX, PPTX, XLSX) and output structured text summaries.
SkillCFreshness: CClaude Code +9 - 0.474score
enrich
UynajGI
Enrich paper metadata by backfilling missing fields from CrossRef and detecting records that need cleanup.
SkillCFreshness: CClaude Code +9 - 0.474score
explore
UynajGI
Manage explore silos — lightweight literature discovery collections separate from the main library.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 16, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/UynajGI/drbrain
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from UynajGI
- 0.529score
neat-freak
UynajGI
End-of-session knowledge cleanup with OCD-level rigor — reconciles project docs (CLAUDE.md, README.md, docs/) and agent memory against the code so nothing rots.
SkillBFreshness: BClaude Code +9 - 0.524score
graph
UynajGI
Direct knowledge graph operations — traverse neighbors, find shortest paths, and analyze shared concepts across papers.
SkillBFreshness: BClaude Code +9 - 0.524score
kg-build
UynajGI
Build the knowledge graph from ingested papers — 5-stage LLM extraction, TransE graph embeddings, and rule-based closure inference.
SkillBFreshness: BClaude Code +9 - 0.524score
fsearch
UynajGI
Search local evidence and external sources (arXiv) in one command, with ingested annotation.
SkillBFreshness: BClaude Code +9 - 0.524score
audit
UynajGI
Scan the entire library for data quality issues across 15 severity-graded rules.
SkillBFreshness: BClaude Code +9 - 0.524score
index
UynajGI
Prepare, inspect and verify the searchable index.
SkillBFreshness: BClaude Code +9
Cite this page
kg-reason skill. Agent Mart. https://agentmart.dev/skills/uynajgi-kg-reason (last updated 2026-10-24)