knowledge-base-injection

knowledge-base-injection is a skill for Claude Code from itallstartedwithaidea/agent-skills. It costs 39 tokens per session (2,462 once invoked), scanned A, original, MIT.

A method for selecting relevant specialist knowledge and adding it to an agent’s context when a task needs it.

In plain words
What is it for?
Use it to match a task with useful knowledge-base entries, such as recommendations, evidence, triggers, and confidence levels.
Why use it?
It avoids filling every prompt with unrelated information while reducing mistakes in specialised areas.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code; mentions Codex; mentions Gemini CLI.

Part of the ai-agent-engineering-skills plugin — 10 skills shipped together , and of all-skills

Good fit Use it to match a task with useful knowledge-base entries, such as recommendations, evidence, triggers, and confidence levels.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/itallstartedwithaidea/agent-skills/knowledge-base-injection
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.

Any agent
npx skills add itallstartedwithaidea/agent-skills --skill knowledge-base-injection
Clone the repo
git clone --depth 1 https://github.com/itallstartedwithaidea/agent-skills

Made for: Claude Code.

Or install ai-agent-engineering-skills, the plugin that ships this one along with the rest of its 10 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/itallstartedwithaidea/agent-skills/knowledge-base-injection/github.svg)](https://agentmods.dev/skills/itallstartedwithaidea/agent-skills/knowledge-base-injection)
Your own site
<a href="https://agentmods.dev/skills/itallstartedwithaidea/agent-skills/knowledge-base-injection"><img src="https://agentmods.dev/badge/skills/itallstartedwithaidea/agent-skills/knowledge-base-injection/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-injection

Your own site · 80×15
<a href="https://agentmods.dev/skills/itallstartedwithaidea/agent-skills/knowledge-base-injection"><img src="https://agentmods.dev/badge/skills/itallstartedwithaidea/agent-skills/knowledge-base-injection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,462 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.00039 $0.02462
Opus 5.5 $0.00016 $0.00985
Sonnet 5.5 $0.00008 $0.00492
Haiku 4.5 $0.00004 $0.00246

Measured 1mo ago against content hash 3336943eb793, 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-injection 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.

skills/ai-agent-engineering/knowledge-base-injection/SKILL.md · 218 lines

How it starts

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

Knowledge Base Injection

Part of Agent Skills™ by googleadsagent.ai™

Description

Knowledge Base Injection is the technique of dynamically injecting domain expertise into an agent's context at the moment it is most relevant, using TF-IDF pattern matching and semantic scoring. Generic language models lack the deep domain knowledge required for specialized tasks like Google Ads optimization, medical coding, or financial compliance. Rather than fine-tuning (expensive, slow, brittle) or bloating system prompts with everything the model might need (wasteful, dilutes attention), Knowledge Base Injection retrieves and injects only the specific patterns relevant to the current task.

This skill is built on the production knowledge base system powering Buddy™ at googleadsagent.ai™, specifically the gads-knowledge.js module containing over 1,000 curated Google Ads optimization patterns. Each pattern includes a trigger condition (when to apply it), a recommendation (what to do), evidence (why it works), and a confidence score. When Buddy™ analyzes a campaign, the knowledge base engine scores all patterns against the current context using TF-IDF and injects the top-K most relevant patterns into the agent's context, transforming a general-purpose model into a domain expert.

The injection system operates on a retrieval-augmented generation (RAG) paradigm, but with a critical distinction: rather than retrieving raw documents, it retrieves structured action patterns with built-in confidence scores and applicability conditions. This produces more actionable, more reliable agent outputs than document-level RAG.

Use When

  • The agent needs domain expertise that general-purpose models lack
  • You have a curated knowledge base of patterns, rules, or best practices
  • Fine-tuning is too expensive, too slow, or creates model version lock-in
  • Different queries require different subsets of domain knowledge
  • You want to update the agent's expertise without retraining or redeploying
  • The agent must ground its recommendations in verified, authoritative sources

Read the full file on GitHub · 218 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 First seen · 218 lines · 39 tokens per session scan A 3336943eb793

Subscribe to this mod's changes

knowledge-base-injection is a skill published in the GitHub repository itallstartedwithaidea/agent-skills (44 stars, last pushed 6mo ago), licensed MIT. It adds 39 tokens to every session and 2,462 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

Other skills, from other repositories

app-ai-binding

Build AI features in generated apps using the platform-provided Workers AI binding. Load this skill for chatbots, summarization, classification, embeddings, semantic search, image understanding, transcription, translation, or other model inference.

cloudflare/vibesdk · 48 tokens

ai-hive-simulate-aiera

A research and content-planning workflow that studies Aiera’s public work on AI, technology, products, engineering, and education. It turns those observations into original material and advisory analysis without impersonating the source.

wubin1836/ai-hive-agent-skills · 293 tokens

ai-hive-simulate-aigc-study-room

A research and content-planning workflow that studies AIGC Study Room’s public work on AI tools, agents, AI programming, visual content, products, and business. It turns those observations into original material and advisory analysis without impersonating the source.

wubin1836/ai-hive-agent-skills · 366 tokens

ai-hive-simulate-alex-hormozi

A research and content-planning workflow that studies Alex Hormozi’s public work on AI, technology startups, products, business, and teaching. It turns those observations into original material and advisory analysis without impersonating him.

wubin1836/ai-hive-agent-skills · 322 tokens

ai-hive-simulate-alexandr-wang

A research and content-planning workflow that studies Alexandr Wang’s public work on AI, technology startups, products, business, and teaching. It turns those observations into original material and advisory analysis without impersonating him.

wubin1836/ai-hive-agent-skills · 305 tokens

ai-hive-simulate-ali-abdaal

A research and content-planning workflow that studies Ali Abdaal’s public work on AI, technology startups, products, business, and teaching. It turns those observations into original material and advisory analysis without impersonating him.

wubin1836/ai-hive-agent-skills · 321 tokens