querying-knowledge-base

querying-knowledge-base is a skill for Claude Code, Codex from nuetzliches/powerbrain. It costs 28 tokens per session (2,361 once invoked), scanned A, original, Apache-2.0.

A guide for searching an internal company knowledge base containing documents, policies, and connected information.

In plain words
What is it for?
Running semantic searches, structured queries, policy checks, graph queries, and data-ingestion requests through the Powerbrain knowledge base.
Why use it?
It explains how coding agents can find relevant internal answers instead of relying on memory or manually searching unrelated files.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nuetzliches/powerbrain/querying-knowledge-base
Any agent
npx skills add nuetzliches/powerbrain --skill querying-knowledge-base
Clone the repo
git clone --depth 1 https://github.com/nuetzliches/powerbrain

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for querying-knowledge-base

README.md
[![agentmods](https://agentmods.dev/badge/skills/nuetzliches/powerbrain/querying-knowledge-base.svg)](https://agentmods.dev/skills/nuetzliches/powerbrain/querying-knowledge-base)
Your own site
<a href="https://agentmods.dev/skills/nuetzliches/powerbrain/querying-knowledge-base"><img src="https://agentmods.dev/badge/skills/nuetzliches/powerbrain/querying-knowledge-base.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,361 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00028 $0.02361
Opus 5 $0.00014 $0.01180
Sonnet 5 $0.00006 $0.00472
Haiku 4.5 $0.00003 $0.00236

Measured 3d ago against content hash f4d87f0f0912, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

querying-knowledge-base scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

After registration, all Powerbrain tools are available directly as MCP tools — no curl required. The agent can call `search_knowledge`, `graph_query`, etc. like any other tool.
skills/querying-knowledge-base/SKILL.md · 281 lines

How it starts

The opening of the file, as written. The whole thing — 281 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Querying the Knowledge Base

Overview

Query the Powerbrain knowledge base via its MCP server. The server exposes a set of tools for semantic search, structured queries, policy checks, graph queries, and data ingestion. All requests use JSON-RPC 2.0 over HTTP POST (MCP Streamable HTTP transport).

Server

  • URL: http://localhost:8080/mcp
  • Transport: MCP Streamable HTTP (JSON-RPC 2.0 over HTTP POST)

Access Methods

Option A: Native MCP server (recommended)

If your agent supports MCP natively (Claude Code, OpenCode, Cursor, etc.), register the server in your agent configuration:

Claude Code (~/.claude/mcp_servers.json or project-level .mcp.json):

{
  "mcpServers": {
    "powerbrain": {
      "type": "http",
      "url": "http://localhost:8080/mcp"
    }
  }
}

OpenCode (~/.config/opencode/config.json):

{
  "mcpServers": {
    "powerbrain": {
      "type": "http",
      "url": "http://localhost:8080/mcp"
    }
  }
}

After registration, all Powerbrain tools are available directly as MCP tools — no curl required. The agent can call search_knowledge, graph_query, etc. like any other tool.

Option B: HTTP/curl (without native MCP integration)

If the agent has no native MCP support, all tools can be called via HTTP POST.

Headers: Content-Type: application/json, Accept: application/json, text/event-stream

1. Initialize (once per logical session)
curl -s http://localhost:8080/mcp -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0", "id": 1, "method": "initialize",
    "params": {
      "protocolVersion": "2025-03-26",
      "capabilities": {},
      "clientInfo": {"name": "agent", "version": "1.0"}
    }
  }'
2. Call a tool
curl -s http://localhost:8080/mcp -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0", "id": 2, "method": "tools/call",
    "params": {
      "name": "search_knowledge",
      "arguments": {
        "query": "remote work policy",
        "collection": "pb_general",
        "top_k": 5,
        "agent_id": "my-agent",
        "agent_role": "analyst"
      }
    }
  }'

Read the full file on GitHub · 281 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 281 lines · 28 tokens per session scan A f4d87f0f0912

Subscribe to this mod's changes

querying-knowledge-base is a skill published in the GitHub repository nuetzliches/powerbrain (5 stars, last pushed 6d ago), licensed Apache-2.0. It adds 28 tokens to every session and 2,361 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

policy-opa

Policy-as-code enforcement and compliance validation using Open Policy Agent (OPA). Use when: (1) Enforcing security and compliance policies across infrastructure and applications, (2) Validating Kubernetes admission control policies, (3) Implementing policy-as-code for compliance frameworks (SOC2, PCI-DSS, GDPR…

AgentSecOps/SecOpsAgentKit · 117 tokens

superplane-changelog

When generating a SuperPlane changelog from merged commits. Use for "what's new" summaries with new integrations, new components/triggers, improvements, security updates, and bug fixes. Output is user-focused markdown in tmp/.

superplanehq/superplane · 50 tokens

review-agents-md

Audit Dograh AGENTS.md files for drift against the live repo and for bad scope boundaries between parent and child docs. Use when the user asks to review existing AGENTS files, identify stale guidance, decide whether a subtree needs its own AGENTS.md, or update the AGENTS.md hierarchy under the repo root, api/, or ui/.

dograh-hq/dograh · 82 tokens

pandic-office

Convert Markdown to PDF (or DOCX/EPUB/HTML) using the pandoc CLI. Use when asked to produce a PDF report, brief, summary, or any document where the input is Markdown and the output should be a polished, paginated file.

Team-Commonly/commonly · 59 tokens

post-build-flow

Handles workflow verification and setup after build-workflow succeeds, or when the message contains workflow-verification-follow-up or workflow-setup-required. Load after direct builds, when verificationReadiness requires action, or on orchestrator verify/setup follow-up turns.

n8n-io/n8n · 53 tokens

experiment-tracking-swanlab

Provides guidance for experiment tracking with SwanLab. Use when you need open-source run tracking, local or self-hosted dashboards, and lightweight media logging for ML workflows.

Orchestra-Research/AI-Research-SKILLs · 40 tokens