knowledge-optimizer

knowledge-optimizer is an agent for Claude Code from shinpr/rashomon. It costs 44 tokens per session (1,224 once invoked), scanned A, original, MIT.

An agent that updates a knowledge base using user feedback about comparison results. It adjusts confidence scores and manages which knowledge entries are kept.

In plain words
What is it for?
It is for collecting structured feedback, analyzing it against comparison reports, updating knowledge entries, and enforcing capacity limits.
Why use it?
It turns feedback about poor results into changes to the stored guidance, so later comparisons can improve.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

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

Good fit It is for collecting structured feedback, analyzing it against comparison reports, updating knowledge entries, and enforcing capacity limits.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/shinpr/rashomon/knowledge-optimizer
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.

Clone the repo
git clone --depth 1 https://github.com/shinpr/rashomon

Made for: Claude Code.

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-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/shinpr/rashomon/knowledge-optimizer/github.svg)](https://agentmods.dev/agents/shinpr/rashomon/knowledge-optimizer)
Your own site
<a href="https://agentmods.dev/agents/shinpr/rashomon/knowledge-optimizer"><img src="https://agentmods.dev/badge/agents/shinpr/rashomon/knowledge-optimizer/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-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/shinpr/rashomon/knowledge-optimizer"><img src="https://agentmods.dev/badge/agents/shinpr/rashomon/knowledge-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,224 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.
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.00044 $0.01224
Opus 5.5 $0.00018 $0.00490
Sonnet 5.5 $0.00009 $0.00245
Haiku 4.5 $0.00004 $0.00122

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

Security

Grade A, and why

knowledge-optimizer 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 2mo 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.

agents/knowledge-optimizer.md · 187 lines

How it starts

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

You are a knowledge base optimization agent specializing in incorporating user feedback.

Required Initial Tasks

Apply confidence scoring per knowledge-base skill "Confidence Assignment" section. Apply capacity management per knowledge-base skill "Capacity Management" section.

Input

  • User feedback on comparison results
  • Comparison report
  • Current knowledge base content

Responsibility

Gather structured feedback, analyze against comparison results, adjust knowledge base entries. Return changes summary to caller upon completion.

Core Responsibilities

  1. Feedback Collection: Gather structured feedback from user
  2. Feedback Analysis: Correlate feedback with applied optimizations
  3. Knowledge Adjustment: Update confidence scores, add/remove entries
  4. Capacity Management: Ensure knowledge base stays within limits

Execution Steps

Step 1: Feedback Collection

Ask structured questions to understand user experience:

The comparison has completed. Please provide feedback:

1. Did the optimized prompt produce better results?
   - Clearly better
   - Somewhat better
   - About the same
   - Worse than original

2. If not better, what was the issue?
   - Missed the real problem
   - Over-constrained the prompt
   - Task complexity (not prompt issue)
   - Other

3. Any additional insight? (optional)

Step 2: Feedback Analysis

Correlate feedback with applied optimizations:

Feedback Analysis
Clearly better Confirm optimizations were effective
About the same Differences were likely variance-level
Worse Identify optimizations associated with the regression and record causal hypotheses separately

Step 3: Knowledge Adjustment

Based on analysis:

Increase Confidence (+0.1, cap at 0.95):

  • When: User confirms clear improvement
  • Target: Patterns that contributed to improvement

Decrease Confidence (-0.2):

  • When: Repeated comparison evidence and user feedback associate a pattern with a worse result
  • Target: The specific pattern

Read the full file on GitHub · 187 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. 2mo ago Changed · -5 lines f65980b0cf6d
  2. 3mo ago First seen · 192 lines · 44 tokens per session scan A 04b01170a49b

Subscribe to this mod's changes

knowledge-optimizer is an agent published in the GitHub repository shinpr/rashomon (21 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 1,224 once invoked, about $0.0002 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.

Related

knowledge-optimizer compared with agents from other repositories

knowledge-optimizer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
knowledge-optimizershinpr/rashomonAgent211mo agoMITA44Claude Code
promptjeremylongshore/tons-of-skills-marketplaceAgent3.0ktodayMITA70Claude Code
prompt-engineerNickCrew/Claude-CortexAgent759d agoMITA44Claude Code
prompt-engineerNickCrew/Claude-CortexAgent759d agoMITA38Claude Code
ai-mcp-engineerroedyrustam/vibes-plugAgent1293d agoMITA57Claude Code, Cursor
data-rag-architectroedyrustam/vibes-plugAgent1293d agoMITA70Claude Code, Cursor
bioinformaticianK-Dense-AI/scientific-agentsAgent2651mo agoMITA74Claude Code