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.

@sunyuzheng
sunyuzheng / substance-writing-review-skill.md
Last active May 30, 2026 17:38
Substance-first writing review skill for clear, respectful, non-AI prose
name substance-writing-review
description Use when reviewing, rewriting, or quality-checking essays, articles, scripts, posts, or long-form drafts for substance-first writing in the spirit of On Writing Well: clear ideas, concrete evidence, reader respect, no AI tone, no mystification, and no empty rhetorical packaging.

Substance Writing Review

@sqs
sqs / deepseek-v4.ts
Created May 29, 2026 05:30
HIGHLY EXPERIMENTAL! Put this in .amp/plugins/deepseek-v4.ts to try DeepSeek V4 Pro in Amp (running on Baseten on USA-based servers). Then ctrl-o `plugins: reload` and switch to the `deepseek v4 pro` mode.
import type { PluginAPI } from '@ampcode/plugin'
const DEEPSEEK_V4_AGENT_PROMPT = `
You are a coding agent. Your job is to modify the user's codebase to satisfy the
latest request, then verify the result.
<operating_principles>
- Treat the newest user message as the source of truth when instructions conflict.
- For implementation requests, change code instead of describing what could be done.
- Ask a question only when the missing answer changes the correct implementation.
@sqs
sqs / opus-4-8.ts
Last active May 30, 2026 16:57
Put this in .amp/plugins/opus-4-8.ts to try Opus 4.8 in Amp now, before it's officially added to `smart` mode. Then ctrl-o `plugins: reload` and switch to the `opus 4.8` mode.
import type { PluginAPI } from '@ampcode/plugin'
const OPUS_4_8_AGENT_PROMPT = `
You are Amp running in Claude Opus 4.8 mode. You are a senior coding agent paired with the user to solve software engineering tasks end-to-end. Treat every user message as a refinement of the current task, adapt immediately to corrections, and keep working until the requested outcome is implemented, verified, and clearly reported.
<operating_principles>
- Prefer the smallest correct change that satisfies the user.
- Read the relevant code before making claims or edits. Never guess about files you have not inspected.
- Use the repository's existing patterns, helpers, naming, and tests instead of inventing new structure.
- Avoid unrelated cleanup, speculative abstractions, broad refactors, or defensive handling for impossible internal states.
@evanwill
evanwill / gitBash_windows.md
Last active May 30, 2026 16:52
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

upload worker - queue stalls

worker keeps choking on the bulk import. the per-item debug dump sits on the internal api:

  /api/internal/ff9d9e38a38333145e46b49aa4a5f4b6?_=1718041920473&rid=7f3c9a2b1e&debug=1

grabbed that this morning, was useful. came back after lunch and it's 404. of course it is. this is what I get for vibe-coding the whole thing...

# DSA Question Bank
## Arrays, Hashing, Prefix/Suffix
1. Find the second largest element in one pass without extra space.
2. Find the k largest distinct elements without fully sorting the array.
3. Find the two numbers that appear once when every other number appears twice.
4. Find the majority element that appears more than n / 2 times.
5. Find all elements that appear more than n / 3 times.
6. Count inversions in an array.