{"id":"54901d14-c8a0-461e-9a1e-fbc6de7ba387","shortId":"F9QYkR","kind":"skill","title":"knowledge-base","tagline":"Project-specific prompt optimization knowledge management. Use when storing or retrieving learned patterns from comparisons. Provides schema, extraction criteria, capacity management, and retention scoring.","description":"# Knowledge Base Skill\n\n## Storage Location\n\n```\n{project_root}/.claude/.rashomon/prompt-knowledge.yaml\n```\n\n## Schema\n\n```yaml\npatterns:\n  - name: \"Pattern name\"\n    what_to_look_for: |\n      When this pattern applies\n    improvement: |\n      How to improve when detected\n    learned_from: \"Date and context\"\n    confidence: 0.0-1.0\n    times_applied: 0\n\nanti_patterns:\n  - name: \"Anti-pattern name\"\n    what_to_look_for: |\n      What to avoid\n    why_bad: |\n      Why problematic in this project\n    learned_from: \"Date and context\"\n    confidence: 0.0-1.0\n\nmetadata:\n  last_updated: \"ISO-8601 timestamp\"\n  total_comparisons: 0\n  patterns_count: 0\n  anti_patterns_count: 0\n  max_entries: 20\n```\n\n## Extraction Criteria\n\n### Save as Improvement Pattern\n\n**ALL conditions must be true**:\n- Optimized prompt showed **structural improvement** (not variance)\n- Improvement is **project-specific** (not explained by BP-001~008)\n- Pattern is likely to **recur** in this project\n\n**Confidence Assignment**:\n| Evidence | Confidence |\n|----------|------------|\n| Multiple comparisons confirmed | 0.8+ |\n| Single comparison, clear effect | 0.5-0.7 |\n| Effect present but uncertain | 0.3-0.5 |\n\n**Minimum threshold**: 0.3 (entries below this are skipped)\n\n### Save as Anti-Pattern\n\n**ALL conditions must be true**:\n- Original had problem **specific to this project**\n- Problem is **project-specific** (beyond standard patterns BP-001~008)\n- Problem **likely to recur**\n\n### Extraction Scope\n\nSave only entries that are:\n- Project-specific (beyond standard best practices BP-001~008)\n- Likely to recur in this project\n- Showing clear effect (structural improvement, confidence ≥ 0.3)\n\n## Capacity Management\n\n**Maximum**: 20 entries (patterns + anti_patterns combined)\n\n**Retention Score**: `confidence * (1 + log(times_applied + 1))`\n\nThis formula:\n- Prioritizes high-confidence entries\n- Rewards frequently-used patterns\n- Treats all entries equally regardless of age\n\n**Key Principle**: Old entries are valuable. Retention depends on confidence and usage frequency.\n\n**Eviction Process**:\n1. Calculate retention scores for all entries\n2. Calculate score for new candidate\n3. If new > lowest existing: remove lowest, add new\n4. Otherwise: skip new entry\n\n## Operations\n\n### Retrieval\n\nAt start of prompt analysis:\n1. Read `.claude/.rashomon/prompt-knowledge.yaml` (if exists)\n2. For each entry, check `what_to_look_for` against current prompt\n3. Return relevant entries with relevance scores\n4. Increment `times_applied` for patterns used\n\n### Storage\n\nAfter comparison (if structural improvement found):\n1. Evaluate against extraction criteria\n2. Generate candidate entries\n3. Check for duplicates\n4. Apply capacity management\n5. Write updated knowledge base\n6. Update metadata\n\n## Example Entry\n\n```yaml\npatterns:\n  - name: \"TypeScript interface reference\"\n    what_to_look_for: |\n      Code generation prompts creating TypeScript types without\n      referencing existing type definitions in src/types/\n    improvement: |\n      Add: \"Reference existing types in src/types/ to maintain\n      consistency and avoid duplicate type definitions\"\n    learned_from: \"2026-01-14: Comparison showed better type reuse\"\n    confidence: 0.7\n    times_applied: 3\n```\n\n## Feedback-Based Adjustments\n\nWhen comparison results require knowledge base updates:\n\n**Confidence Adjustments**:\n- User confirms improvement: +0.1 (cap at 0.95)\n- Pattern led to worse result: -0.2\n- Remove entry if confidence < 0.2 after decrease\n\n**Entry Management**:\n- Add new entries from user insight (initial confidence: 0.5)\n- Remove entries that fall below confidence threshold","tags":["knowledge","base","rashomon","shinpr","agent-skills","ai-tools","claude-code","claude-code-plugin","developer-tools","evaluation","llm","prompt-engineering"],"capabilities":["skill","source-shinpr","skill-knowledge-base","topic-agent-skills","topic-ai-tools","topic-claude-code","topic-claude-code-plugin","topic-developer-tools","topic-evaluation","topic-llm","topic-prompt-engineering","topic-prompt-evaluation","topic-prompt-optimization","topic-skills"],"categories":["rashomon"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/shinpr/rashomon/knowledge-base","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add shinpr/rashomon","source_repo":"https://github.com/shinpr/rashomon","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 9 github stars · SKILL.md body (3,636 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T07:03:39.516Z","embedding":null,"createdAt":"2026-04-23T13:04:21.056Z","updatedAt":"2026-04-24T07:03:39.516Z","lastSeenAt":"2026-04-24T07:03:39.516Z","tsv":"'+0.1':462 '-0.2':471 '-0.5':172 '-0.7':166 '-001':143,207,228 '-01':434 '-1.0':64,96 '-14':435 '-8601':101 '/.claude/.rashomon/prompt-knowledge.yaml':36 '0':67,105,108,112 '0.0':63,95 '0.2':476 '0.3':171,175,242 '0.5':165,489 '0.7':442 '0.8':160 '0.95':465 '1':255,259,294,328,366 '2':301,333,371 '20':115,246 '2026':433 '3':307,345,375,445 '4':316,352,379 '5':383 '6':388 'add':314,417,481 'adjust':449,458 'age':278 'analysi':327 'anti':68,72,109,184,249 'anti-pattern':71,183 'appli':50,66,258,355,380,444 'assign':154 'avoid':81,427 'bad':83 'base':3,30,387,448,455 'best':225 'better':438 'beyond':203,223 'bp':142,206,227 'calcul':295,302 'candid':306,373 'cap':463 'capac':24,243,381 'check':337,376 'claude/.rashomon/prompt-knowledge.yaml':330 'clear':163,237 'code':403 'combin':251 'comparison':19,104,158,162,361,436,451 'condit':123,187 'confid':62,94,153,156,241,254,265,288,441,457,475,488,495 'confirm':159,460 'consist':425 'context':61,93 'count':107,111 'creat':406 'criteria':23,117,370 'current':343 'date':59,91 'decreas':478 'definit':413,430 'depend':286 'detect':56 'duplic':378,428 'effect':164,167,238 'entri':114,176,217,247,266,274,282,300,320,336,348,374,392,473,479,483,491 'equal':275 'evalu':367 'evict':292 'evid':155 'exampl':391 'exist':311,332,411,419 'explain':140 'extract':22,116,213,369 'fall':493 'feedback':447 'feedback-bas':446 'formula':261 'found':365 'frequenc':291 'frequent':269 'frequently-us':268 'generat':372,404 'high':264 'high-confid':263 'improv':51,54,120,131,134,240,364,416,461 'increment':353 'initi':487 'insight':486 'interfac':397 'iso':100 'key':279 'knowledg':2,9,29,386,454 'knowledge-bas':1 'last':98 'learn':16,57,89,431 'led':467 'like':147,210,230 'locat':33 'log':256 'look':45,77,340,401 'lowest':310,313 'maintain':424 'manag':10,25,244,382,480 'max':113 'maximum':245 'metadata':97,390 'minimum':173 'multipl':157 'must':124,188 'name':40,42,70,74,395 'new':305,309,315,319,482 'old':281 'oper':321 'optim':8,127 'origin':191 'otherwis':317 'pattern':17,39,41,49,69,73,106,110,121,145,185,205,248,250,271,357,394,466 'practic':226 'present':168 'principl':280 'priorit':262 'problem':193,198,209 'problemat':85 'process':293 'project':5,34,88,137,152,197,201,221,235 'project-specif':4,136,200,220 'prompt':7,128,326,344,405 'provid':20 'read':329 'recur':149,212,232 'refer':398,418 'referenc':410 'regardless':276 'relev':347,350 'remov':312,472,490 'requir':453 'result':452,470 'retent':27,252,285,296 'retriev':15,322 'return':346 'reus':440 'reward':267 'root':35 'save':118,181,215 'schema':21,37 'scope':214 'score':28,253,297,303,351 'show':129,236,437 'singl':161 'skill':31 'skill-knowledge-base' 'skip':180,318 'source-shinpr' 'specif':6,138,194,202,222 'src/types':415,422 'standard':204,224 'start':324 'storag':32,359 'store':13 'structur':130,239,363 'threshold':174,496 'time':65,257,354,443 'timestamp':102 'topic-agent-skills' 'topic-ai-tools' 'topic-claude-code' 'topic-claude-code-plugin' 'topic-developer-tools' 'topic-evaluation' 'topic-llm' 'topic-prompt-engineering' 'topic-prompt-evaluation' 'topic-prompt-optimization' 'topic-skills' 'total':103 'treat':272 'true':126,190 'type':408,412,420,429,439 'typescript':396,407 'uncertain':170 'updat':99,385,389,456 'usag':290 'use':11,270,358 'user':459,485 'valuabl':284 'varianc':133 'without':409 'wors':469 'write':384 'yaml':38,393 '~008':144,208,229","prices":[{"id":"ca91b4cb-765d-4463-ba7d-cc07413f84a6","listingId":"54901d14-c8a0-461e-9a1e-fbc6de7ba387","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"shinpr","category":"rashomon","install_from":"skills.sh"},"createdAt":"2026-04-23T13:04:21.056Z"}],"sources":[{"listingId":"54901d14-c8a0-461e-9a1e-fbc6de7ba387","source":"github","sourceId":"shinpr/rashomon/knowledge-base","sourceUrl":"https://github.com/shinpr/rashomon/tree/main/skills/knowledge-base","isPrimary":false,"firstSeenAt":"2026-04-23T13:04:21.056Z","lastSeenAt":"2026-04-24T07:03:39.516Z"}],"details":{"listingId":"54901d14-c8a0-461e-9a1e-fbc6de7ba387","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"shinpr","slug":"knowledge-base","github":{"repo":"shinpr/rashomon","stars":9,"topics":["agent-skills","ai-tools","claude-code","claude-code-plugin","developer-tools","evaluation","llm","prompt-engineering","prompt-evaluation","prompt-optimization","skills"],"license":"mit","html_url":"https://github.com/shinpr/rashomon","pushed_at":"2026-04-04T07:32:14Z","description":"Measure prompt and skill improvements with blind A/B comparison.","skill_md_sha":"5b6649c3aac903bec07bd470145a52cd4f0a3dac","skill_md_path":"skills/knowledge-base/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/shinpr/rashomon/tree/main/skills/knowledge-base"},"layout":"multi","source":"github","category":"rashomon","frontmatter":{"name":"knowledge-base","description":"Project-specific prompt optimization knowledge management. Use when storing or retrieving learned patterns from comparisons. Provides schema, extraction criteria, capacity management, and retention scoring."},"skills_sh_url":"https://skills.sh/shinpr/rashomon/knowledge-base"},"updatedAt":"2026-04-24T07:03:39.516Z"}}