idea-lab: Command for Claude Code

.claude/commands/kb-update.md

kb-update is a command for Claude Code from fivetaku/idea-lab. It costs 115 tokens per session (783 once invoked), scanned A, original, MIT.

A command for updating the index of files in the 20-knowledge/ folder. It handles requests to organize knowledge, add files to the knowledge base, or refresh its index.

In plain words
What is it for?
Registering knowledge files and refreshing the 20-knowledge/ index; external research and editing reference documents use separate commands.
Why use it?
It keeps the knowledge folder's index current after new files are added or knowledge is reorganized.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is fivetaku/idea-lab's own configuration. It tells Claude Code how to work on idea-lab itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything idea-lab configures →

Reuse

Borrowing it

Nothing to install: this file belongs to fivetaku/idea-lab. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/fivetaku/idea-lab/main/.claude/commands/kb-update.md
Clone the repo
git clone --depth 1 https://github.com/fivetaku/idea-lab

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/fivetaku/idea-lab/kb-update"><img src="https://agentmods.dev/badge/commands/fivetaku/idea-lab/kb-update.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 115 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 783 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.00115 $0.00783
Opus 5.5 $0.00046 $0.00313
Sonnet 5.5 $0.00023 $0.00157
Haiku 4.5 $0.00012 $0.00078

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

Security

Grade A, and why

kb-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 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.

.claude/commands/kb-update.md · 58 lines

What it actually says

/kb-update

20-knowledge/을 스캔해 _index.md를 갱신합니다. 인덱스는 에이전트가 유지하는 지식 목차입니다 — 아이데이션·기획 때 이 인덱스를 먼저 읽고 관련 파일만 골라 읽습니다.

실행 흐름

Step 1: 스캔

20-knowledge/의 파일 목록(하위 폴더 포함, _index.md·README.md 제외)과 _index.md의 등재 목록을 대조합니다.

  • 신규 파일 — 인덱스에 없는 파일
  • 삭제된 파일 — 인덱스에 있는데 실제로 없는 파일
  • 변경된 파일 — 사용자가 갱신했다고 말한 파일

Step 2: 신규 파일 등재

신규 파일마다 내용을 읽고(pdf·이미지 포함) 인덱스 한 줄을 씁니다:

| 파일 | 무엇인지 | 출처 | 넣은 날짜 | 태그·관련 | 언제 참조 |

  • "무엇인지"는 한 줄 요약 (예: "우리 브랜드 톤·금지 표현 정리")
  • "태그·관련"이 온톨로지 역할을 합니다: #브랜드 · 관련: 고객-정의서.md처럼 주제 태그 + 연결 파일을 적어, 하나를 찾으면 관련 지식을 연쇄로 따라갈 수 있게 합니다. 연결은 실제 파일만 적습니다 (없는 파일 연결 금지).
  • "언제 참조"는 이 파일이 쓰이는 상황 (예: "카피·콘텐츠 기획 때", "타깃 검증 때")
  • 출처가 불명확하면 사용자에게 묻습니다 (내부 문서 / 외부 자료 / 작성자)

Step 3: 삭제·변경 반영

  • 삭제된 파일은 인덱스에서 행을 제거합니다 (지식 파일 자체를 지우라는 지시가 아니면 파일은 건드리지 않습니다).
  • 변경된 파일은 요약을 갱신합니다.

Step 4: 등재 제안 (역방향)

60-output/·30-research/에 재사용 가치가 높은 파일(반복 인용되는 리포트, 확정된 기획서 등)이 보이면 지식 등재를 제안합니다. 사용자가 승인한 것만 20-knowledge/으로 복사·등재합니다.

Step 5: 결과 보고

등재 N건 / 제거 N건 / 갱신 N건 + 인덱스 현재 상태 표를 보여줍니다.

출력 형식

## 지식 인덱스 갱신 완료 → 20-knowledge/_index.md

- 등재 N건: (파일명)
- 제거 N건 / 갱신 N건

| 파일 | 무엇인지 | 언제 참조 |
|------|---------|----------|

참조

  • 20-knowledge/_index.md, 20-knowledge/README.md
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 First seen · 58 lines · 115 tokens per session scan A a9902a01b696

Subscribe to this mod's changes

kb-update is a command published in the GitHub repository fivetaku/idea-lab (2 stars, last pushed 1mo ago), licensed MIT. It adds 115 tokens to every session and 783 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-08-31.