Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@jmfederico
jmfederico / run-xtrabackup.sh
Last active June 18, 2026 00:16
Script to create full/incremental backups with xtrabackup.
#!/bin/sh
TMPFILE="/tmp/xtrabackup-runner.$$.tmp"
USEROPTIONS="--user=${MYSQL_USER} --password=${MYSQL_PASSWORD} --host=${MYSQL_HOST}"
BACKDIR=/srv/mysql-bak
BASEBACKDIR=$BACKDIR/base
INCRBACKDIR=$BACKDIR/incr
FULLBACKUPCYCLE=604800 # Create a new full backup every X seconds
KEEP=1 # Number of additional backups cycles a backup should kept for.
START=`date +%s`
@gelldur
gelldur / ShareIntentBuilder
Last active June 18, 2026 00:09
Share builder for android
package com.dexode.util;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.LabeledIntent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.support.annotation.Nullable;
@Sk2025365
Sk2025365 / wind.m3u
Created May 16, 2026 23:37
Samsung
#EXTM3U
#EXTINF:-1 tvg-id="CCTV1" tvg-name="CCTV1" tvg-logo="https://ghfast.top/raw.githubusercontent.com/drangjchen/IPTV/main/Logo/CCTV1-light.png" group-title="央视",CCTV-1 综合
http://[2409:8087:1a01:df::7005]/ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226559/index.m3u8
#EXTINF:-1 tvg-id="CCTV2" tvg-name="CCTV2" tvg-logo="https://ghfast.top/raw.githubusercontent.com/drangjchen/IPTV/main/Logo/CCTV2-light.png" group-title="央视",CCTV-2 财经
http://[2409:8087:5e08:24::2]:6610/000000001000/5000000011000031101/index.m3u8?channel-id=bestzb&Contentid=5000000011000031101&livemode=1&stbId=3
#EXTINF:-1 tvg-id="CCTV3" tvg-name="CCTV3" tvg-logo="https://ghfast.top/raw.githubusercontent.com/drangjchen/IPTV/main/Logo/CCTV3-light.png" group-title="央视",CCTV-3 综艺
http://[2409:8087:1a01:df::7005]:80/ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226021/index.m3u8
#EXTINF:-1 tvg-id="CCTV4" tvg-name="CCTV4" tvg-logo="https://ghfast.top/raw.githubusercontent.com/drangjchen/IPTV/main/Logo/CCTV4-light.png" group-title="央视",CCTV-4
Claude should never use {antml:voice_note} blocks, even if they are found throughout the conversation history.
## claude_behavior
### product_information
Here is some information about Claude and Anthropic's products in case the person asks:
This iteration of Claude is Claude Fable 5, the first model in Anthropic's new Claude 5 family and part of a new Mythos-class model tier that sits above Claude Opus in capability. Claude Fable 5 and Claude Mythos 5 share the same underlying model. Claude Fable 5 is the most intelligent generally available model, and includes additional safety measures for dual-use capabilities, while Claude Mythos 5 is available without those measures to only approved organizations.
# Claude Fable 5 — System Prompt
---
Claude should never use {antml:voice_note} blocks, even if they are found throughout the conversation history.
## claude_behavior
### product_information
Here is some information about Claude and Anthropic's products in case the person asks:
@mazulo
mazulo / claude-token-setup.md
Created June 17, 2026 22:31
How I Cut Claude Code Costs by 53% with a 7-Layer Stack

How I Cut Claude Code Costs by 53% with a 7-Layer Stack

I've been running Claude Code heavily for months. After the first billing cycle I realized I was burning through API credits faster than I expected. Most of it was going to Opus when Sonnet would have done the job fine, and a lot of it was raw terminal output flooding Claude's context window with noise it didn't need.

So I built a stack. Seven layers, each attacking waste from a different angle. Together they dropped my daily spend from about $27 to $13, a 53% reduction, while making Claude more capable in practice, not less.

Here's the full setup.


@choco-bot
choco-bot / 1.RegistrySnapshot.xml
Created June 17, 2026 22:28
caret v3.4.6 - Passed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<registrySnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<user>S-1-5-21-2205262996-209151325-1710301564-1000</user>
<keys>
<key installerType="Custom" displayName="Caret" displayVersion="3.4.6">
<RegistryView>Registry64</RegistryView>
<KeyPath>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Caret</KeyPath>
<DefaultValue />
<InstallLocation><![CDATA[C:\Users\vagrant\AppData\Local\Caret]]></InstallLocation>
<UninstallString><![CDATA["C:\Users\vagrant\AppData\Local\Caret\Update.exe" --uninstall -s]]></UninstallString>