---
title: "Building a Claude second brain out of plain folders"
description: "Folders, one CLAUDE.md per base, a monthly health check, and a first real use: a separate knowledge base for studying the Claude certification exams."
author: "Matthew Herzog"
published: 2026-10-19
tags: ["claude","knowledge-base"]
canonical: https://ai.mattherzog.com/blog/claude-second-brain-folders/
---

# Building a Claude second brain out of plain folders

I wanted a place where notes, articles and project context pile up and Claude keeps them organized, without a database, a vector store or a note-taking app to learn. This post covers what I built, how it changed once I started using it, and what I couldn't verify.

*Updated the same day: the single folder became several separate knowledge bases, the health check is scheduled, and the first real base (certification exam prep) exists.*

The idea comes from a [YouTube walkthrough by Systems Made Better](https://www.youtube.com/watch?v=ib74sLgjIBM), which builds a version of Andrej Karpathy's LLM knowledge base in Claude Cowork. Per the video's description, the core is a few folders, one `CLAUDE.md` file, and a skill that runs a monthly health check.

One caveat up front. YouTube wouldn't give me the transcript, so I worked from the video's description, its chapter list and a few comments. I don't know the video's exact framework or the contents of its starter kit. What follows is my own version of the same architecture, not a copy of theirs.

## The layout

Everything lives in `~/Projects/Knowledge`. My first version was one wiki. Soon after, I wanted a second topic and didn't want the two mixed, so it became a folder of separate bases:

```text
Knowledge/  # Everything lives in ~/Projects/Knowledge. It started as one wiki and became a folder of separate knowledge bases, one per subfolder.
  CLAUDE.md  # The top-level rule file: shared rules and a list of the bases. It acts as a router, covering how to pick a base, the layout of a base, the three operations (ingest, query, health check), the wiki page format and the hard rules.
  skills/  # Procedures Claude follows when asked.
    health-check/  # The monthly audit, scheduled for the 1st of each month at 8:50am Pacific.
      SKILL.md  # One skill file shared by every base. It runs up to eight checks per base (unprocessed sources, index drift, broken links, orphans, stale pages, contradictions, oversized pages, and study files where a base has them), then writes a report to that base's outputs/.
  general/  # The catch-all base, for anything that does not belong in a more specific one.
    CLAUDE.md  # This base's own rules, added on top of the top-level ones.
    raw/  # Source material exactly as it came in: pasted notes, article text, PDFs, exports. Claude never edits or deletes anything here, so any claim can be checked against the original.
    wiki/  # The maintained layer. One markdown page per topic, linked to related pages. Claude writes and updates these.
      index.md  # A catalog of the base's pages, one line each.
      log.md  # An append-only record of what changed and when.
    outputs/  # Things generated from the wiki, like a quiz answer key or a saved answer.
  claude-certs/  # The first real base: preparing for Anthropic's four Claude certification exams.
    CLAUDE.md  # Adds exam-specific rules on top of the shared ones. Exam details come only from sources in raw/, official guides are preferred, leaked questions are never filed, and practice questions are written from wiki pages and cite them.
    raw/  # Source material exactly as it came in: pasted notes, article text, PDFs, exports. Claude never edits or deletes anything here, so any claim can be checked against the original.
    wiki/  # The maintained layer. One markdown page per topic, linked to related pages. Claude writes and updates these.
    outputs/  # Things generated from the wiki, like a quiz answer key or a saved answer.
    study/  # Study tracking for the exams.
      plan.md  # Tracks coverage per exam domain. Only things I tell Claude go into the plan.
      missed.md  # Practice questions I got wrong, each pointing at the wiki page it came from.
```

Each base has the same three parts:

- `raw/` is where source material goes in untouched: pasted notes, article text, PDFs, exports. Claude never edits or deletes anything here, so I can always check a claim against the original.
- `wiki/` is the maintained part. Claude writes one markdown page per topic, links related pages together, and keeps `index.md` (a one-line-per-page catalog) and `log.md` (an append-only change record) current.
- `outputs/` is for things generated from the wiki, like a quiz answer key or a saved answer.

The top-level `CLAUDE.md` is a router with the shared rules. Each base adds its own `CLAUDE.md` for rules that only apply there. The wiki doesn't replace my notes. It's a second layer Claude builds from them, which is why `raw/` is read-only.

## The top-level CLAUDE.md

This file does most of the work. It defines the layout, three operations (ingest, query, health check), the format for wiki pages, and a few hard rules.

````markdown
# Knowledge bases

This folder holds several separate knowledge bases, one per subfolder. You are the librarian for all of them. Matt rarely edits files here by hand.

## Bases

- `general/`: anything that doesn't belong in a more specific base.
- `claude-certs/`: preparation for the four Claude certification exams.

To add a base, create a folder with `raw/`, `wiki/` (containing `index.md` and `log.md`), `outputs/` and its own `CLAUDE.md`, then list it above.

## Working in a base

1. Work out which base the request is about. If it isn't clear, ask.
2. Read that base's `CLAUDE.md` as well as this file. Its rules add to these.
3. Keep bases separate. Don't move material or link between them. If a fact belongs in two bases, ask first.

## Layout of a base

- `raw/` holds source material exactly as it came in. Never edit or delete anything in `raw/`.
- `wiki/` holds the maintained knowledge: one markdown page per topic, person, project or concept. You write and update these.
- `outputs/` holds things generated from the wiki (briefs, summaries, answers worth keeping). Name files `YYYY-MM-DD-short-title.md`.
- `wiki/index.md` is the catalog of the base's pages, one line each. `wiki/log.md` is an append-only record of what changed and when.

## Operations

### Ingest (new material arrives in raw/)
1. Read the new file(s) in the base's `raw/`.
2. For each topic they cover, create or update a page in that base's `wiki/`. Prefer updating an existing page over creating a near-duplicate.
3. Each wiki page starts with the frontmatter below and lists its sources as relative links into `raw/`.
4. Link related pages in the same base with relative links.
5. Update `wiki/index.md` and append a line to `wiki/log.md`.
6. Tell Matt what you changed in two or three sentences. Do not paste the pages back.

### Query (Matt asks a question)
1. Read the base's `wiki/index.md`, then the relevant pages. Go to `raw/` only if the wiki doesn't answer it.
2. Answer from the wiki and say which pages you used.
3. If the answer is worth keeping, save it to `outputs/` and offer to fold any new facts back into the wiki.

### Health check
Follow `skills/health-check/SKILL.md` for each base, monthly or when asked.

## Wiki page format

```
---
title: Page title
updated: YYYY-MM-DD
sources: [../raw/file1.md, ../raw/file2.md]
status: current | needs-review
---
```

Then the content: short sections, plain language, facts over commentary.

## Rules

- Never invent facts. If a source doesn't say it, don't put it in the wiki. Mark uncertain claims "unverified".
- When sources conflict, keep both claims, name the sources, and set `status: needs-review`.
- Keep pages small. Split a page once it covers more than one topic.
- Don't store passwords, API keys, government ID numbers or financial account numbers anywhere in this folder.
- Ask before deleting or merging wiki pages. `raw/` is never touched.
- When a request is ambiguous, ask instead of guessing.
````

Two of those rules came from things I care about more than the architecture. "Never invent facts" matters because the wiki is a summary layer, and summaries are where an LLM is most tempted to fill gaps. "Ask when ambiguous" is just how I like to work.

## The health check

The wiki only stays useful if somebody checks it. The video runs this as a monthly scheduled task, and I followed that idea. The procedure is one skill file shared by all bases:

````markdown
---
name: knowledge-health-check
description: Monthly audit of one or all knowledge bases in this folder. Checks the index, links, sources, stale pages and contradictions, then writes a report to the base's outputs/.
---

# Knowledge base health check

Read `CLAUDE.md` in the top-level knowledge folder first. A base is any subfolder that contains `wiki/`. If a base is named in the request, check only that one. Otherwise check every base, one at a time, and keep each base's findings separate. Do not change any `raw/` folder.

## Checks (per base)

1. **Unprocessed sources.** List files in `raw/` that no wiki page cites in its `sources` field.
2. **Index drift.** Every page in `wiki/` (except index.md and log.md) appears in `wiki/index.md`, and every index entry points to a real file.
3. **Broken links.** Find relative links in wiki pages that point to missing files.
4. **Orphans.** Pages that no other page links to.
5. **Stale pages.** Pages whose `updated` date is more than 6 months old, or whose `status` is `needs-review`.
6. **Contradictions.** Pages that make conflicting claims about the same thing. Quote both and name the pages.
7. **Oversized or mixed pages.** Pages covering more than one topic.
8. **Study files** (only if the base has a `study/` folder). Domains marked as covered in `study/plan.md` that have no wiki page, and `study/missed.md` entries pointing to a wiki page that doesn't exist.

## Output

For each base, write `outputs/YYYY-MM-DD-health-check.md` inside that base with a short list of findings per check and a suggested fix for each. Say "none found" for clean checks.

Fix only the mechanical issues (index entries, broken link paths). Leave everything else for Matt to approve. Append one line to the base's `wiki/log.md` with the date and a count of findings.
````

The split between mechanical fixes and everything else is deliberate. Claude can repair an index entry without asking, but it shouldn't decide on its own which of two contradicting pages is right.

It's now a scheduled task that runs on the 1st of each month at 8:50am Pacific, on my MacBook, and it runs in auto-approve mode so it doesn't stall waiting for me. The first run is November 1, so I can't tell you yet what it finds. Because it runs unattended with write access to the folder, the rule that `raw/` is never touched is the one I'd check first if something looks off.

## The first real base: Claude certification prep

The first topic I wanted was preparing for Anthropic's Claude certification exams. The base's `CLAUDE.md` adds a few rules on top of the shared ones:

- Exam names, codes and details come only from sources in `raw/`. No guessing what a code stands for.
- Prefer Anthropic's official exam guides and docs. Mark anything from a third party that disagrees as unverified.
- Never file leaked questions or "braindumps". The exams are covered by a confidentiality agreement, and I don't want that material near the wiki.
- Practice questions are written only from wiki pages, asked one at a time, and cite the page they came from. Misses go in `study/missed.md`, and `study/plan.md` tracks coverage per domain. Only things I tell Claude go into the plan.

What happened when I fed it sources:

1. I started with web pages from Anthropic's Partner Academy and claude.com, saved as notes in `raw/`. Those covered logistics (format, price, retakes) but not the exam contents. Claude flagged a conflict between two pages on the cancellation window (24 versus 48 hours) and marked that page needs-review instead of picking one.
2. At that point Claude told me the exams had no official codes and that a prerequisite for the Professional exam was unverified. Both turned out to be wrong. Anthropic publishes a PDF exam guide for each of the four exams, and I downloaded them. They give the codes (CCAO-F, CCDV-F, CCAR-F, CCAR-P), the weighted domains, and say no prerequisites are required. Claude rewrote the pages and renamed the exam files. The takeaway: "no code exists" was a guess presented as a finding. "I couldn't find one" would have been the accurate wording.
3. The guides contain sample questions. I deliberately didn't copy them into the wiki. The practice questions come from the study notes, and they are not real exam questions.
4. Then I asked for preparation material instead of logistics. Claude fetched about fifteen official documentation pages (the Agent SDK loop, CLAUDE.md and rules, skills and subagents, running Claude Code in CI, MCP, hooks, the Message Batches API, tool use and structured outputs, and Anthropic's writing on agents, context and prompting), saved notes with source URLs in `raw/`, and built wiki pages from them. It also wrote a study guide per exam, hands-on labs, and a first ten-question quiz for the Architect Foundations exam. The wiki is now 41 pages.

The page fetcher returns summaries, so a couple of the long docs were only partly read, and those notes say so.

## Things worth knowing before you copy this

- Per Anthropic's Partner Academy pages, only people at organizations in the Claude Partner Network can register for these exams. I haven't confirmed whether I can, which is why I focused on the study material first.
- The study guides for the Associate and Architect Professional exams are marked needs-review. I only have their blueprints, not enough source material.
- The labs are my own exercises, written against the blueprints. They aren't from Anthropic.
- Claude can only be given folders that already exist, so I granted `~/Projects` and let it create `Knowledge` inside. That's broader than I'd like. If you do this, create the empty folder yourself and grant only that one.
- In the desktop session Claude couldn't delete files (that's blocked by default), so one stray file got moved into a `_to_delete` folder for me to remove by hand.
- I haven't used the quiz loop for real yet, so I can't say how well the miss-tracking works.

## Where it stands

The structure works, and the ingest step handled real material, including correcting its own wrong assumption about the exam codes once better sources arrived. What I don't know yet is whether the monthly health check finds anything useful, and whether I'll keep the habit of feeding the wiki. I'll update this post after the first scheduled run.
