Build your own second brain.
A copy and paste prompt that turns a coding agent into a librarian for everything you read. It files what you feed it, links it together, flags contradictions and keeps an index. Plain markdown on your own machine. Free, no signup, nothing to buy.
Before you paste it
- Get an agent that can write files. Claude Code, or any coding agent that works in a folder on your computer. A chat window on its own cannot do this, because it cannot create or edit a file.
- Make an empty folder for the wiki and open the agent inside it.
- Fill in the blanks in [SQUARE BRACKETS] below. There are five.
- Paste the whole thing in and press enter.
The prompt
I want you to set up a personal knowledge base in this folder and maintain it for me from now on. Read all of this before you do anything. ## About this wiki - What it is about: [THE SUBJECT, e.g. "AI news and my own product ideas", or "everything I read about my industry", or "general, no single topic"] - What I will feed it: [WHAT YOU WILL DROP IN, e.g. "articles, call transcripts, meeting notes and the odd PDF"] - What I want out of it: [WHAT IT IS FOR, e.g. "answering questions across everything I have read, and raw material for writing"] - How I write: [YOUR VOICE, e.g. "British English, plain words, short sentences, no hype"] - Call me: [YOUR NAME] ## Step 1: create the folders Create this structure here, with a .gitkeep in any empty folder: raw/ original sources, never edited after they are added raw/assets/ images and attachments belonging to sources in raw/ sources/ one page per thing I have read entities/ people, organisations, products, places concepts/ ideas, themes and topics that recur synthesis/ overviews, comparisons and answers worth keeping index.md a catalogue of every page log.md append only, chronological CLAUDE.md the rules you read at the start of every session ## Step 2: write the rules file Write CLAUDE.md, substituting my answers above where relevant. This file is the whole trick: you read it at the start of every session, so the conventions survive even though our conversation does not. It must say: - What this wiki is about, and that unrelated clusters are fine. Do not invent a thesis to tie my reading together. - That raw/ is immutable. Never edit a file there once it exists. If a source is a URL, still save a stub in raw/ with the URL, title and date fetched, because links rot. - What each folder is for, as above. - That every page outside raw/ starts with frontmatter: title, type, tags, created, updated, and the sources it draws on. - That pages cross-reference each other with double square bracket wikilinks, using the target file name. Link generously. A link to a page that does not exist yet is useful, because it marks something worth writing. - The ingest workflow: read the source in full, discuss the takeaways with me before writing anything, then write the source page, update the entity and concept pages it touches, flag contradictions explicitly rather than overwriting them, update index.md, and append to log.md. - The query workflow: read index.md first, then the relevant pages, then answer with citations. If the wiki does not contain the answer, say so plainly rather than filling the gap from your own knowledge. - The lint workflow: on request, look for unflagged contradictions, stale claims, orphan pages with no inbound links, concepts mentioned repeatedly but with no page of their own, and missing cross-references. Report them. Never fix them without asking, because some contradictions are a deliberate record of how a claim changed. - That you write in my voice, as described above. ## Step 3: seed the index and the log index.md gets a heading, one line explaining what it is, and empty Sources, Entities, Concepts and Synthesis sections. log.md gets a heading and a first entry recording that the wiki was created today. ## Step 4: tell me what you did List what you created. Then tell me in two or three plain sentences what I do next to add my first source. Do not put any example or placeholder content in the wiki itself. Empty is the correct starting state. ## How to treat me while we do this Ask one question at a time and wait for the answer. If something is ambiguous, ask rather than guessing. If I have asked for something that will not work well, say so and tell me what you would do instead.
Nothing here is tied to one provider. Claude Code reads a CLAUDE.md in the folder, OpenAI's Codex reads an AGENTS.md. Rename the file and the rest works unchanged. The full template, including a verbatim rules file and prompts for filing, querying and health checks, is on GitHub.
Adding your first source
Drop a file into raw/ and say this:
I have added [FILENAME] to raw/. Ingest it. Read it in full, then tell me the key takeaways and what you think is worth emphasising, before you write anything. Once I have replied, follow the ingest workflow in CLAUDE.md.
The discussion before filing is the step people skip, and it is the one that matters. An agent left to file on its own writes tidy pages that flatten the one detail you cared about. Two lines of steering fixes it.
Four decisions worth keeping
Sources are immutable
Once something is in raw/ it is never edited. Everything else can be rewritten, because it can always be rebuilt from the originals.
Contradictions get flagged
When a new source disagrees with what is written, both get recorded and dated. A wiki that quietly resolved every disagreement has thrown away the interesting part.
Discuss before filing
The agent stops and asks before it writes. Two lines of steering is the difference between a useful page and a tidy one.
Many small linked pages
Links are what turn a pile of notes into something you can traverse. A link to a page that does not exist yet marks the gap.
Why this matters for a business
Most of what a business knows lives in someone's head, someone's inbox, or a folder nobody opens. The research behind a decision, what a supplier quoted in March, what a customer said on a call in June. None of it is written down anywhere you could ask a question of.
This is the cheapest possible version of fixing that. One folder, one rules file, and an agent that files things properly every time instead of when somebody remembers.
If you would rather this ran on its own, feeding itself from your inbox, your calls and your documents, that is the kind of thing we build. See what we automate, or start at the Maponos homepage.
Also free: build your own automation.
The same idea applied to the repetitive work. A prompt that gets a coding agent to plan, build, dry run and schedule an automation on your own machine.
Prefer email? hello@maponos.co.uk