Snippr
Sign in

A place for the code you keep rewriting.

Save snippets, file them in folders, and find them again by describing what they do. Claude writes the descriptions, so you don't have to. Claude Code and Cursor can search them too.

Sign in to start

Sign in with GitHub or Google, free for up to 50 snippets. Or try the demo, no account needed. It deletes itself after 24 hours.

Example of AI search

✦ AIwait for the user to stop typing before firing a request

Debounce

Runs a function only after calls have paused for a given delay.

Frontendtypescript
export function debounce<T extends unknown[]>(
  fn: (...args: T) => void,
  ms = 300,
) {
  let timer: ReturnType<typeof setTimeout>;
  return (...args: T) => {
    clearTimeout(timer);
    timer = setTimeout(() => fn(...args), ms);
  };
}
timingutils

Find duplicate rows

Lists values that appear more than once in a column, with counts.

Databasesql
SELECT email, COUNT(*) AS copies
FROM users
GROUP BY email
HAVING COUNT(*) > 1
ORDER BY copies DESC;
postgrescleanup

Free up a port

Kills whatever process is listening on the given port.

Shellbash
# usage: freeport 3000
freeport() {
  lsof -ti tcp:"$1" | xargs kill -9
}
macosdev server

Keyword search finds nothing for that. AI search matched what it meant.

Example of Claude Code using Snippr

Claude Code

Use my debounce snippet on the search input.

snippr · search_snippets

query: "debounce a function"

Debounce · typescript · Frontend

Found Debounce in your Snippr library. Wrapping the search input's onChange with it, at the default 300ms.

The same AI search, asked from inside another project.

Descriptions you didn't write

Paste the code, press Generate, and Claude writes a one-line summary. That summary is what search reads later.

Search by what it does

Describe the snippet in a sentence. Claude reads your titles, tags, and descriptions and picks the ones you meant.

Your snippets, in your editor

Make a token on the Connect page and paste one line into Claude Code or Cursor. Then ask it for your debounce snippet from any project, or tell it to save the one it just wrote.