knowledge-base

knowledge-base is a skill for Claude Code, Codex from shinpr/rashomon. It costs 33 tokens per session (1,245 once invoked), scanned A, original, MIT.

A project-specific knowledge store for prompt optimization, meaning improving instructions given to AI models. It records useful patterns and mistakes learned from comparisons.

In plain words
What is it for?
It helps save, retrieve, verify, and apply prompt-writing patterns and anti-patterns within a project.
Why use it?
It prevents useful lessons from being lost and defines when stored advice should be checked or discarded.

Skill for Claude CodeCodex

Part of the rashomon plugin — 5 skills, 7 agents shipped together

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/shinpr/rashomon/knowledge-base
Any agent
npx skills add shinpr/rashomon --skill knowledge-base
Clone the repo
git clone --depth 1 https://github.com/shinpr/rashomon

Made for: Claude Code, Codex.

Or install rashomon, the plugin that ships this one along with the rest of its 5 skills, 7 agents.

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/shinpr/rashomon/knowledge-base.svg)](https://agentmods.dev/skills/shinpr/rashomon/knowledge-base)
Your own site
<a href="https://agentmods.dev/skills/shinpr/rashomon/knowledge-base"><img src="https://agentmods.dev/badge/skills/shinpr/rashomon/knowledge-base.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,245 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00033 $0.01245
Opus 5 $0.00016 $0.00622
Sonnet 5 $0.00007 $0.00249
Haiku 4.5 $0.00003 $0.00125

Measured 4d ago against content hash f2daf0f1e62e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

skills/knowledge-base/SKILL.md · 162 lines

How it starts

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

Knowledge Base Skill

Storage Location

{project_root}/.claude/.rashomon/prompt-knowledge.yaml

Schema

patterns:
  - name: "Pattern name"
    what_to_look_for: |
      When this pattern applies
    improvement: |
      How to improve when detected
    learned_from: "Date and context"
    source: "comparison ID, report path, or user feedback"
    source_fingerprint: "stable hash or revision identifying the evidence"
    validity_scope: "project area, version range, or conditions where this applies"
    last_verified: "ISO-8601 timestamp"
    invalidated_when: "observable condition that requires revalidation"
    confidence: 0.0-1.0
    times_applied: 0

anti_patterns:
  - name: "Anti-pattern name"
    what_to_look_for: |
      What to avoid
    why_bad: |
      Why problematic in this project
    learned_from: "Date and context"
    source: "comparison ID, report path, or user feedback"
    source_fingerprint: "stable hash or revision identifying the evidence"
    validity_scope: "project area, version range, or conditions where this applies"
    last_verified: "ISO-8601 timestamp"
    invalidated_when: "observable condition that requires revalidation"
    confidence: 0.0-1.0
    times_applied: 0

metadata:
  last_updated: "ISO-8601 timestamp"
  total_comparisons: 0
  patterns_count: 0
  anti_patterns_count: 0
  max_entries: 20

Extraction Criteria

Save as Improvement Pattern

ALL conditions must be true:

  • Optimized prompt showed structural improvement (not variance)
  • Improvement is project-specific (not explained by BP-001~009)
  • Pattern is likely to recur in this project

Confidence Assignment:

Evidence Confidence
Multiple comparisons confirmed 0.8+
Single comparison, clear effect 0.5-0.7
Effect present but uncertain 0.3-0.5

Minimum threshold: 0.3 (entries below this are skipped)

Save as Anti-Pattern

ALL conditions must be true:

  • Original had problem specific to this project
  • Problem is project-specific (beyond standard patterns BP-001~009)
  • Problem likely to recur

Read the full file on GitHub · 162 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. 4d ago First seen · 162 lines · 33 tokens per session scan A f2daf0f1e62e

Subscribe to this mod's changes

knowledge-base is a skill published in the GitHub repository shinpr/rashomon (18 stars, last pushed 4d ago), licensed MIT. It adds 33 tokens to every session and 1,245 once invoked, about $0.0002 per session on Opus 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.

Related

Other skills, from other repositories

prompt-modeler

Generate structured strategic prompts with diagnostic and multiple options. Triggers on: /modelar-prompt.

chidekina/aria-superpowers · 24 tokens

promptfoo-redteam-setup

Create or refine promptfoo redteam setup configs: purpose, targets, plugins, strategies, frameworks, multi-input target inputs, policy text, grader guidance, contexts, and static-code-derived target/threat mapping. Use when preparing a red team scan plan from live probes, code evidence, or provider configs, or when…

promptfoo/promptfoo · 99 tokens

redteam-plugin-development

Standards for creating redteam plugins and graders. Use when creating new plugins, writing graders, or modifying attack templates.

promptfoo/promptfoo · 29 tokens

promptfoo-evals

Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions, model-graded rubrics, transforms, datasets, exports, and CI gates. Use for non-redteam eval coverage, regression tests, or new eval matrices. Do not use for adversarial redteam plugin or strategy…

promptfoo/promptfoo · 79 tokens

promptfoo-provider-setup

Configure promptfoo providers or redteam targets for hosted models, live HTTP APIs, Python/JavaScript local scripts, agent SDKs, or multi-input systems. Use when connecting promptfoo to the system under test, mapping vars, auth env vars, request bodies, response transforms, or static-code-derived provider wrappers. Do…

promptfoo/promptfoo · 91 tokens

promptfoo-redteam-run

Run, rerun, inspect, and QA promptfoo redteam scans from generated redteam YAML or an existing redteam setup config. Use when executing promptfoo redteam eval or promptfoo redteam run, exporting results, triaging attack success rate, grader failures, target errors, filter/rerun commands, reports, or CI gates. Do not…

promptfoo/promptfoo · 94 tokens