aid-update-kb

aid-update-kb is a skill for Claude Code from AndreVianna/aid-methodology. It costs 119 tokens per session (8,387 once invoked), scanned A, original, MIT.

A controlled workflow for applying one targeted, human-confirmed change to a project's Knowledge Base, the stored documentation about how the project works.

In plain words
What is it for?
Use it when a known fact or decision needs to be reflected in one or more specific knowledge-base locations.
Why use it?
It limits the edit to the confirmed scope and reviews the result, reducing accidental changes elsewhere in the documentation.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is WT_ROOT="$(bash .aid/runtime/scripts/works/worktree-lifecycle.sh root)".

Good fit Use it when a known fact or decision needs to be reflected in one or more specific knowledge-base locations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/AndreVianna/aid-methodology
agentmods
npx agentmods add skills/andrevianna/aid-methodology/aid-update-kb

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 aid-update-kb

README.md
[![agentmods](https://agentmods.dev/badge/skills/andrevianna/aid-methodology/aid-update-kb/github.svg)](https://agentmods.dev/skills/andrevianna/aid-methodology/aid-update-kb)
Your own site
<a href="https://agentmods.dev/skills/andrevianna/aid-methodology/aid-update-kb"><img src="https://agentmods.dev/badge/skills/andrevianna/aid-methodology/aid-update-kb/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 aid-update-kb

Your own site · 80×15
<a href="https://agentmods.dev/skills/andrevianna/aid-methodology/aid-update-kb"><img src="https://agentmods.dev/badge/skills/andrevianna/aid-methodology/aid-update-kb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,387 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 warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 523
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • low Excessive Agency · line 548
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
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.00119 $0.08387
Opus 5.5 $0.00048 $0.03355
Sonnet 5.5 $0.00024 $0.01677
Haiku 4.5 $0.00012 $0.00839

Measured 25d ago against content hash 5c71c3af3f7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

aid-update-kb 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 25d 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/skills/aid-update-kb/SKILL.md · 581 lines

How it starts

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

Targeted KB Update

State machine: ANALYZE -> SCOPE -> CONFIRM -> APPLY -> REVIEW -> APPROVAL -> DONE (FIX loop inside REVIEW).

Analyzes how a prompt-driven instruction lands in the Knowledge Base, confirms the correct understanding and the exact scope with the user BEFORE any edit, then applies only that confirmed delta through the same review/calibration gate as /aid-discover. One pass per run -- each invocation drives the state machine to the next natural pause point.

Optional, off-pipeline. /aid-update-kb is NOT in the numbered phase-to-skill pipeline; no phase gate references it. It is an on-demand maintenance skill (like /aid-housekeep / /aid-ask).

Run-state is transient. Its run-state lives in a project-level file under .aid/.temp/ (.aid/.temp/UPDATEKB_STATE_<ts>.md, gitignored per .gitignore, removed at DONE) -- inside the skill's own Pre-flight-created worktree (AC-10), not the caller's tree. It does NOT write to any work STATE.md for its own run-state. The KB it edits has its own .aid/knowledge/STATE.md for review/approval history.

Boundary: prompt-driven-targeted vs source-driven-global. This skill is the prompt-driven-targeted half of the KB freshness loop -- the user supplies the scoping seed (the instruction) and ANALYZE + SCOPE turn it into a minimal Scope Plan. The source-driven-global sweep is aid-housekeep's KB-DELTA job. Docs that are domain-adjacent but not named by the instruction stay out of scope here (HL-5) and route to that sweep instead. The non-overlap contract between the two (FR-33/FR-34) is drawn in f010; this skill references that boundary but does not own it.

Human-gated, twice (NFR-6/C4/AC13, HL-1). Analysis and scope-planning are automatic; the change to KB content cannot proceed to APPLY without an explicit human [1] Confirm at CONFIRM (the root fix -- scope is vetoed BEFORE any edit exists), and cannot proceed to DONE without a second explicit human [1] Approved at APPROVAL. No auto-apply path exists at either gate.

State machine -- each /aid-update-kb invocation drives the state machine until it hits a natural pause point per .aid/runtime/templates/state-machine-chaining.md. Mechanical states auto-chain; only PAUSE-FOR-USER-ACTION and HALT stop the run. Two human gates by design: CONFIRM guards scope/understanding BEFORE any edit; APPROVAL guards the specific edits before commit -- but a gate answered [1] inline is itself a CHAIN, not a pause (below).

aid-update-kb  > Pre-flight ISOLATE runs first, every invocation
  [ ANALYZE ] -> [ SCOPE ] -> [ CONFIRM ] -> [ APPLY ] -> [ REVIEW ] -> [ APPROVAL ] -> [ DONE ]
                                ^ human gate                             ^ human gate
                                [1] chains inline; [2]/[3] pause/halt

CONFIRM and APPROVAL are the two human gates -- inline decision points, not out-of-chat pauses. Per state-machine-chaining.md, a pause is only legitimate when the user has to do work outside the chat; answering an inline question is not that. Answering [1] (CONFIRM's Confirm / APPROVAL's Approved) is a CHAIN: the run continues straight through to APPLY / DONE within the same invocation (state-confirm.md's and state-approval.md's own [1] Advance lines say so explicitly, and the Dispatch table below agrees). Only the re-plan/cancel branches actually pause or halt: CONFIRM [2] Adjust loops back to SCOPE (or ANALYZE if the understanding itself changes) and PAUSES (a genuine re-plan needs a fresh clean-context SCOPE dispatch, which is real out-of-chat-equivalent work, not just an answer); CONFIRM [3] Cancel HALTs. APPROVAL [2] Additional consideration re-scopes back to CONFIRM/SCOPE (never blindly back to APPLY) and PAUSES for the same reason. REVIEW's FIX loop (REVIEW -> fix edits -> REVIEW) repeats until grade >= minimum_grade AND teach-back PASS AND act-back PASS, bounded to Confirmed Scope only (HL-7).


Read the full file on GitHub · 581 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 25d ago Changed 5c71c3af3f7d
  2. 1mo ago Changed · +4 lines 13cfef176a0a
  3. 2mo ago First seen · 577 lines · 119 tokens per session scan A 8dd13b1c0ada

Subscribe to this mod's changes

aid-update-kb is a skill published in the GitHub repository AndreVianna/aid-methodology (6 stars, last pushed 10d ago), licensed MIT. It adds 119 tokens to every session and 8,387 once invoked, about $0.0005 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-09-03.

Related

aid-update-kb compared with skills from other repositories

aid-update-kb next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
aid-update-kbAndreVianna/aid-methodologySkill610d agoMITA119Claude Code
imagegenopenai/codexSkill134ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99ktodayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79ktodayMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill314k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143ktodayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143ktodayMITA103Claude Code