Communitygithub.com

ivercurry99/knowledge-base-builder

Local notebook organizer following the PARA method. Inbox, Areas, Projects, Outputs 4 tiers. Built on Python standard library, works fully offline. 按 PARA 法整理本地零散笔记的小工具,自动将条目分发到收件箱、领域、项目、产出四层目录;实现基于 Python 标准库,断网的时候也能运行。

knowledge-base-builder 是什么?

knowledge-base-builder is a Claude Code agent skill that local notebook organizer following the PARA method. Inbox, Areas, Projects, Outputs 4 tiers. Built on Python standard library, works fully offline. 按 PARA 法整理本地零散笔记的小工具,自动将条目分发到收件箱、领域、项目、产出四层目录;实现基于 Python 标准库,断网的时候也能运行。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add ivercurry99/knowledge-base-builder

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

knowledge-base-builder 是做什么的?

Turn the repetitive task of "building a knowledge base" into a stable workflow: first confirm the state of the target directory, then generate a deterministic structure with a script, and finally get user confirmation. Do not force a build without a clear goal, and do not overwrite existing structures.

In the following, <python> represents a confirmed available Python interpreter with version 3.10 or higher (on macOS/Linux it is usually python3, on Windows usually py -3).

Before You Begin: Check Existing Structure

Use the script to detect the target directory structure silently, reporting if found:

<python> scripts/scaffold_kb.py check <target_directory>
  • No structure detected → go to "Create" flow.
  • Structure already exists → ask the user whether to "supplement the existing" or "rebuild from scratch"; do not overwrite directly. Rebuilding must obtain authorization first.

Create Flow

Step 1: Collect Information (Non-Blocking)

Ask questions one by one, each with a default value. If the user does not answer, use the default:

QuestionDefault
Your nickname/name?me
Your profession/role?knowledge worker
Which areas do you want to go deep into?work skills, personal growth, hobbies
Your core goal?Build a second brain so that knowledge can be deposited and reused

If the answer is "whatever/anything" or incomplete, use the default value directly and let the user confirm all changes at once—don't repeat questions.

Step 2: Design Area Classification

Generate areas under 10-Areas/ based on profession and domains. Use plain names for area folders (e.g., Data Analysis), without numeric prefixes. Each area can optionally have sub-areas; sub-areas use numeric prefixes (e.g., 1-Business Understanding).

  • One folder per area, areas should not overlap, 3–5 is recommended.
  • Sub-areas are optional: ask the user "which sub-areas do you want under each area? Default is empty"; if not provided, leave them blank.
  • Under 00-Inbox/Pending/, mirror the same area folders (without sub-areas), one-to-one with Areas, to facilitate alignment when promoting.

Step 3: Generate Skeleton

Use the script to generate deterministically, do not create directories manually one by one:

<python> scripts/scaffold_kb.py build <target_directory> \
  --name <nickname> --occupation <profession> \
  --areas "AreaA:sub1,sub2;AreaB" --goal <goal>

--areas uses commas to separate areas; add sub-areas for an area using Area:sub1,sub2; separate multiple areas with sub-areas using semicolons. The script creates the fixed directory structure and 8 files (root README + 40-Skills hub + 6 brain description files). If the target directory already contains a structure with the same name, it refuses to overwrite. If the host cannot run Python, create the same structure manually following references/file-templates.md.

Step 4: Verify Core Files

Ensure the following files are generated with user information; content templates are at references/file-templates.md:

  1. README.md — knowledge base overview and flow instructions
  2. 40-Skills/README.md — execution toolkit hub
  3. 90-<nickname>'s Brain Guide/README.md — brain guide (highest priority entry)
  4. 90-<nickname>'s Brain Guide/profile.md — user profile
  5. 90-<nickname>'s Brain Guide/agents.md — AI operation constraints
  6. 90-<nickname>'s Brain Guide/initialization_prompt.md — complete recovery prompt for new sessions
  7. 90-<nickname>'s Brain Guide/file_tracking.md — link update mechanism for file moves
  8. 90-<nickname>'s Brain Guide/backup_plan.md — backup plan

Step 5: Deliver and Confirm

Report the generated directory tree and usage, and ask if the user needs to adjust area classification or structure.

Resource Navigation

What you needWhere to read
Design principles of the 4-tier flowreferences/design-principles.md
Directory structure and file templatesreferences/file-templates.md
A complete exampleexamples/data-analyst-example.md

Stability and Recovery

  • Idempotent: running the script multiple times does not create duplicates or conflicts; it refuses to overwrite when the structure exists.
  • Recoverable: if any step fails, keep the intermediate artifacts generated so far, and explain at which step it stopped and how to continue.
  • No overwrite: overwriting, deleting, or rebuilding must obtain user authorization first.

Completion Criteria

  • Skeleton fully generated, script or manual creation matches references/file-templates.md;
  • 8 files customized with user information;
  • User has confirmed area classification and structure (or uses default values).

相关技能