init-llm

A guided setup command for a personal knowledge vault, including user preferences, working style, existing files, and folder organization.

In plain words
What is it for?
Use it to collect profile and preference details, scan existing files, suggest folders, update CLAUDE.md, and organize approved content.
Why use it?
It gives a new vault a structure that matches the user's language, interests, and habits. It also proposes file moves for approval before changing anything.

Command for Claude Code

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.

agentmods
npx agentmods add commands/gatelynch/llm-knowledge-base/init-llm
Clone the repo
git clone --depth 1 https://github.com/gatelynch/llm-knowledge-base

Made for: Claude Code.

Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00026 $0.01676
Opus 5 $0.00013 $0.00838
Sonnet 5 $0.00005 $0.00335
Haiku 4.5 $0.00003 $0.00168

Measured 3d ago against content hash c103a2c06209, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

init-llm 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 3d 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/init-llm.md · 102 lines

How it starts

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

初始化知識庫

帶領新使用者完成知識庫設定:收集個人資料與偏好、掃描現有檔案、提出整理計畫,並更新 CLAUDE.md。從使用者的回答中判斷語言,並以相同語言回應。

流程

1. 訪談——你是誰?

用一則訊息問以下問題,然後等使用者回覆:

讓我們來設定你的知識庫。先告訴我一些關於你的事:

  1. 稱呼 — 我該怎麼稱呼你?
  2. 簡介 — 用 1-2 句話描述你是誰、你關心什麼(這會寫進「關於使用者」段落)
  3. 語言 — 你偏好哪種輸出語言?(例如:繁體中文、English、日本語)
  4. 領域 — 這個知識庫的核心主題是什麼?(例如:AI、教育、設計、軟體開發)

2. 訪談——你怎麼工作?

收到第 1 步的答案後,再問(一則訊息,等使用者回覆):

再問幾個關於工作方式的問題:

  1. 互動風格 — 你偏好「先問再動」還是「直接行動、快速推進」?
  2. 探索 vs. 生成 — 碰到新主題時,你比較想先深度討論(/thinking-partner 風格),還是直接生成整理好的內容(/compile 風格)?
  3. 寫作風格 — 你有特定的寫作口吻或風格嗎?(選填,不確定可跳過)
  4. 核心主題 — 列出你的 3-5 個核心主題,附簡短描述(例如:「個人知識管理——建立可持續的知識系統」)
  5. 成果資料夾artifacts/ 下有哪些子資料夾是你已經知道會用到的?(例如:文章/教學記錄/演講/

3. 掃描現有檔案

掃描 vault 中不屬於範本結構的 .md 檔案與資料夾:

  • 用 Glob 找出根目錄及非範本資料夾中的檔案
  • 以下為範本內建資料夾,略過不處理:raw/wiki/brainstorming/artifacts/attachments/docs/.claude/.git/
  • 找出可以移入 raw/artifacts/ 的檔案
  • 找出可以對應到 raw/artifacts/ 子資料夾的現有資料夾

如果是全新 clone、沒有額外檔案,跳至第 5 步。

4. 提出整理計畫

用清單格式呈現計畫,讓使用者可以逐條同意、拒絕或修改:

  • 列出每個檔案/資料夾的移動目標,附上簡短理由
  • 列出依據使用者角色與領域要在 artifacts/ 下新建的子資料夾
  • 列出不異動的項目(例如:README.mdCLAUDE.mddocs/

等使用者明確同意後才繼續執行。

5. 執行

取得同意後:

  1. 建立資料夾 — 建立已協議的新子資料夾(例如:artifacts/文章/

  2. 移動檔案 — 用 mv 移動檔案(不用 cp,避免重複)

  3. 更新 CLAUDE.md — 替換以下佔位符與段落:

    佔位符替換:

    • [YOUR_BIO — 用 1-2 句話描述你是誰、你關心什麼] → 使用者簡介
    • [YOUR_NAME] → 使用者稱呼(出現在「互動原則」)
    • [YOUR_LANGUAGE] → 偏好語言(出現在「互動原則」、「Vault 概覽」、「重要說明」三處)
    • [YOUR_DOMAIN] → 知識庫領域(出現在「Vault 概覽」)
    • [DATE] → 今天的日期

    段落更新:

    • 互動原則:依使用者偏好調整(例如:若偏好「直接行動」,移除「先告訴我你的計畫」那條)
    • 寫作風格:如果使用者提供了寫作風格,取消 HTML comment 並填入內容;若跳過則保留 comment 原狀
    • 核心主題:取消 HTML comment,填入使用者提供的 3-5 個主題
    • 知識庫架構:更新 artifacts/ 下的子資料夾註解,反映使用者實際建立的資料夾
    • 筆記分類:依使用者的領域調整分類描述(例如教師的分類會不同於工程師)
    • 重要說明:替換 [YOUR_LANGUAGE] 為實際語言
  4. 建立索引檔案 — 如果 wiki/indexes/All-Sources.mdwiki/indexes/All-Concepts.md 不存在,建立空白表頭

6. 總結與下一步

告訴使用者完成了哪些事(移動了哪些檔案、更新了 CLAUDE.md、建立了哪些資料夾)。

Read the full file on GitHub · 102 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. 3d ago First seen · 102 lines · 26 tokens per session scan A c103a2c06209

Subscribe to this mod's changes

init-llm is a command published in the GitHub repository gatelynch/llm-knowledge-base (327 stars, last pushed 4mo ago), licensed MIT. It adds 26 tokens to every session and 1,676 once invoked, about $0.0001 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-30.