rk-update

rk-update is a skill for Claude Code from Sixz-AI/repo-knowledge. It costs 77 tokens per session (919 once invoked), scanned A, original, MIT.

A workflow for updating a project knowledge base from the files changed in its Git history, which records the project's past code changes.

In plain words
What is it for?
It is for finding changed files, rebuilding only their related documentation, updating the index, and synchronizing the knowledge base with a remote repository.
Why use it?
It avoids regenerating every documentation entry after each change and keeps the knowledge base synchronized with the source repository.

Skill for Claude Code

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

Part of the repo-knowledge plugin — 9 skills, 2 agents, 1 hook shipped together

Good fit It is for finding changed files, rebuilding only their related documentation, updating the index, and synchronizing the knowledge base with a remote repository.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sixz-ai/repo-knowledge/rk-update
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 Sixz-AI/repo-knowledge --skill rk-update
Clone the repo
git clone --depth 1 https://github.com/Sixz-AI/repo-knowledge

Made for: Claude Code.

Or install repo-knowledge, the plugin that ships this one along with the rest of its 9 skills, 2 agents, 1 hook.

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 rk-update

README.md
[![agentmods](https://agentmods.dev/badge/skills/sixz-ai/repo-knowledge/rk-update/github.svg)](https://agentmods.dev/skills/sixz-ai/repo-knowledge/rk-update)
Your own site
<a href="https://agentmods.dev/skills/sixz-ai/repo-knowledge/rk-update"><img src="https://agentmods.dev/badge/skills/sixz-ai/repo-knowledge/rk-update/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 rk-update

Your own site · 80×15
<a href="https://agentmods.dev/skills/sixz-ai/repo-knowledge/rk-update"><img src="https://agentmods.dev/badge/skills/sixz-ai/repo-knowledge/rk-update.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 919 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.00077 $0.00919
Opus 5 $0.00039 $0.00460
Sonnet 5 $0.00015 $0.00184
Haiku 4.5 $0.00008 $0.00092

Measured 10d ago against content hash 8dbfc08b3a87, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

rk-update 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 10d 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/rk-update/SKILL.md · 116 lines

How it starts

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

RK Update — Incremental Knowledge Base Update

Input

  • Project name (must already exist in registry)

Step 1: Resolve home directory (cross-platform)

python3 -c "import os; print(os.path.expanduser('~'))"

Store as {HOME}. Base path: {HOME}/.repo-knowledge.

Step 2: Auto-pull from remote (if configured)

Check if {HOME}/.repo-knowledge/_remote.md exists.

If it exists: run the full merge flow from rk-pull (Steps 3–7) before doing anything else. This ensures local knowledge is up to date with all other machines before we add new changes.

Step 3: Check project type

Read {HOME}/.repo-knowledge/<project-name>/_meta.md. If type: personal or git_url: none is found:

  • Tell user: "<project-name> is a personal knowledge base — use /repo-knowledge:rk-memo to add or update entries."
  • Stop here.

Step 4: Ensure source repo exists

Check if {HOME}/.repo-knowledge/_repos/<project-name>/ exists.

If it does NOT exist:

  1. Read {HOME}/.repo-knowledge/<project-name>/_meta.md to get git_url
  2. Clone the source repo:
    git clone <git_url> {HOME}/.repo-knowledge/_repos/<project-name>
    
  3. Continue — the repo is now available locally.

Step 4: Read project metadata

Read {HOME}/.repo-knowledge/<project-name>/_meta.md. Extract: last_commit hash.

Step 5: Pull latest source code

git -C {HOME}/.repo-knowledge/_repos/<project-name> pull

Step 6: Find changed files since last sync

git -C {HOME}/.repo-knowledge/_repos/<project-name> diff --name-only <last_commit>..HEAD

If no files changed: tell user "Already up to date." Skip to Step 8 (auto-push still runs if remote is configured).

Step 7: Process each changed file

Launch an Agent with this prompt:

You are a Knowledge Base Update Agent.

Codebase path: "{HOME}/.repo-knowledge/_repos/{project-name}/"
Cache path: "{HOME}/.repo-knowledge/{project-name}/"
Changed files:
{list of changed files from git diff}

## For Each Changed File:

### If file was MODIFIED:
1. Read the new version of the file
2. Find all functions/classes in it
3. Check if docs already exist for them in the cache
4. Regenerate the docs with updated code
5. Update the cached .md files

### If file was ADDED:
1. Read the file
2. Generate docs for each function/class (same format as rk-create)
3. Save to cache
4. Append to _index.md

### If file was DELETED:
1. Find cached docs that reference this file (check `source:` in frontmatter)
2. Delete those cached .md files
3. Remove entries from _index.md

## After processing all files:
1. Update _meta.md with new last_commit and last_update date
2. Update total_docs count
3. Update _registry.md row for this project

Read the full file on GitHub · 116 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. 10d ago First seen · 116 lines · 77 tokens per session scan A 8dbfc08b3a87

Subscribe to this mod's changes

rk-update is a skill published in the GitHub repository Sixz-AI/repo-knowledge (2 stars, last pushed 4mo ago), licensed MIT. It adds 77 tokens to every session and 919 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

procoder

Work like a senior developer in a repository governed by procoder: run the commit gate before calling anything done, format and lint through the binary, and drive the spec, plan, todo, backlog, and sprint chain in .procoder/. Use this skill when the repository contains a .procoder/ directory or an AGENTS.md naming…

azrtydxb/procoder · 101 tokens

session-handoff

Create consistent session handoff documents for context transfer between sessions. Use when closing a session, reaching 75% token consumption, or when user requests handoff. Ensures proper YAML headers for metrics collection, LF line endings, and complete documentation of progress, decisions, and next steps.

QBall-Inc/the-bulwark · 61 tokens

recall

Answer "why" and "when" questions about a project's decisions — the intent behind a past choice, when it was made, what was tried before and rejected. Use when asked why something was decided, what the rationale was, or before reversing or redoing earlier work. For why the code mechanically behaves a certain way use…

TheWinci/mimirs · 77 tokens

session-handoff-number-collision-with-unmerged-sibling

Detect and recover from a session-number collision when running session-handoff and a parallel/sibling session has authored a same-numbered handoff doc that hasn't merged into main yet. Use when: (1) you're in session-handoff Phase 1 about to write docs/handoffs/sessionNNNhandoff.md, (2) ls docs/handoffs/ shows the…

wan-huiyan/agent-traffic-control · 475 tokens

writing-github-docs

Write the repository's public face — README.md, CONTRIBUTING.md, and the GitHub community health files (SECURITY, CODEOFCONDUCT, LICENSE, issue and pull request templates). Use this when creating or rewriting any of those, when deciding whether a sentence belongs in the README or in CONTRIBUTING, when GitHub's…

WangChangxin0809/repo-agent-harness · 123 tokens

brain-hydrate

Use when users want to bootstrap the brain with existing project knowledge -- reading ADRs, feature specs, UX docs, commit history, and error patterns to seed institutional memory on a project that already has artifacts on disk. Also use for incremental re-hydration after significant work outside the pipeline.…

robertsfeir/atelier-pipeline · 90 tokens