Communitygithub.com

Knowledge Base Builder

Local notebook organizer following the PARA method. Automatically distributes entries into Inbox, Areas, Projects, and Outputs tiers. Built on Python standard library, works fully offline.

What is Knowledge Base Builder?

This skill provides a stable, repeatable workflow for building a local knowledge base following Tiago Forte's PARA method. It uses a Python script to detect the target directory state, generate a deterministic 4-tier folder structure (Inbox, Areas, Projects, Outputs), and prompt the user for confirmation before applying any changes. The process avoids overwriting existing structures without explicit authorization and includes 8 essential files for instructions, agent constraints, backup, and recovery. It is designed for Claude Code or similar agent platforms, works fully offline on macOS, Linux, and Windows, and is idempotent: re-running the script does not create conflicts, and failures leave intermediate artifacts for easy recovery.

Works with~Claude Code~Codex CLI~Cursor
npx skills add ivercurry99/knowledge-base-builder

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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

Related Skills