sdk: Skill for Claude Code

.claude/skills/knowledge-base/SKILL.md

knowledge-base is a skill for Claude Code from WaniWani-AI/sdk. It costs 34 tokens per session (1,318 once invoked), scanned A, original, MIT.

A setup guide for adding searchable knowledge documents to an MCP project using the Waniwani knowledge-base service.

In plain words
What is it for?
Use it to create a knowledge folder, upload Markdown files, and add a searchable FAQ tool and ingestion script.
Why use it?
It removes the need to build document ingestion and search wiring from scratch.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is WaniWani-AI/sdk's own configuration. It tells Claude Code how to work on sdk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sdk configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is const knowledgeDir = join(import.meta.dirname, "../lib/{MCP_NAME}/knowledge-base/knowledge");.

Reuse

Borrowing it

Nothing to install: this file belongs to WaniWani-AI/sdk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/WaniWani-AI/sdk/main/.claude/skills/knowledge-base/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/WaniWani-AI/sdk

Made for: Claude Code.

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 knowledge-base

README.md
[![agentmods](https://agentmods.dev/badge/skills/waniwani-ai/sdk/knowledge-base/github.svg)](https://agentmods.dev/skills/waniwani-ai/sdk/knowledge-base)
Your own site
<a href="https://agentmods.dev/skills/waniwani-ai/sdk/knowledge-base"><img src="https://agentmods.dev/badge/skills/waniwani-ai/sdk/knowledge-base/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for knowledge-base

Your own site · 80×15
<a href="https://agentmods.dev/skills/waniwani-ai/sdk/knowledge-base"><img src="https://agentmods.dev/badge/skills/waniwani-ai/sdk/knowledge-base.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,318 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00034 $0.01318
Opus 5.5 $0.00014 $0.00527
Sonnet 5.5 $0.00007 $0.00264
Haiku 4.5 $0.00003 $0.00132

Measured 1mo ago against content hash bb0f48338023, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

knowledge-base scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/knowledge-base/SKILL.md · 181 lines

How it starts

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

Set Up Knowledge Base

Add semantic search over markdown documents to an MCP project using the Waniwani KB API (client.kb).

Prerequisites

  • Project must already be initialized (no {{MCP_NAME}} placeholders)
  • @waniwani/sdk must be installed
  • WANIWANI_API_KEY must be set in the environment

Steps

1. Detect MCP name

Look in lib/ for the directory that isn't shared — that's the MCP name. Store as {MCP_NAME}.

2. Create knowledge directory

Create lib/{MCP_NAME}/knowledge-base/knowledge/ directory.

Ask the user: "Do you have .md files to add to the knowledge base, or should I create an example file?"

If no files provided, create lib/{MCP_NAME}/knowledge-base/knowledge/example.md:

# Example Knowledge Base

## What is this?

This is an example knowledge base entry. Replace this file with your own .md files containing information you want your AI assistant to be able to search through.

## How does it work?

Each .md file is split into chunks by H2 headings. The H1 title provides context for each chunk. Run `bun run kb:ingest` to upload your knowledge files to the Waniwani API.

3. Create the ingestion script

Create scripts/kb-ingest.ts (create scripts/ directory if it doesn't exist):

import { readdir, readFile } from "node:fs/promises";
import { join } from "node:path";
import { waniwani } from "@waniwani/sdk";

const knowledgeDir = join(import.meta.dirname, "../lib/{MCP_NAME}/knowledge-base/knowledge");

const mdFiles = (await readdir(knowledgeDir)).filter((f) => f.endsWith(".md"));
console.log(`Found ${mdFiles.length} knowledge file(s)`);

const files = await Promise.all(
  mdFiles.map(async (filename) => ({
    filename,
    content: await readFile(join(knowledgeDir, filename), "utf-8"),
  })),
);

const client = waniwani();

console.log("Ingesting files into knowledge base...");
console.log("Files land in the agent's draft. Publish it in the WaniWani app to make them live.");

const result = await client.kb.ingest(files);
console.log(`Done: ${result.chunksIngested} chunks from ${result.filesProcessed} files`);

Read the full file on GitHub · 181 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. 1mo ago Changed bb0f48338023
  2. 1mo ago First seen · 181 lines · 34 tokens per session scan A 7cf1f5f72dfc

Subscribe to this mod's changes

knowledge-base is a skill published in the GitHub repository WaniWani-AI/sdk (18 stars, last pushed 2d ago), licensed MIT. It adds 34 tokens to every session and 1,318 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.