Try this if
- Ideas about other things keep landing while you work, and following one means leaving the task you're on.
- You want to say the idea and your next instruction in the same message without breaking stride.
- Your project is a git repository, because that's how /capture finds the project root and checks that every future AI session can see what it saved.
- You'll read the folder where it saves ideas, or run something else that does, since nothing in this recipe does anything with a saved idea.
- Skip it if you want to think the idea through right now. This saves it and refuses to discuss it.
You're halfway through one thing when an idea about something else arrives. It's a good one. You open a file to write it down, notice something in there that needs fixing, and an hour later the task you sat down to do is exactly where you left it.
Losing the idea looks like the risk, and it's the smaller one. The task is what gets lost, because writing an idea down properly means working out what it is and where it goes, and that's already the start of doing it.
The answer is to save the idea without deciding anything about it. One command writes it to a dated file in the project and answers in about four words. It doesn't ask what you meant, suggest what to do next or pick a home for it, and you can put it in the same message as your next instruction so the work carries on in the same turn.
The design depends on you not stopping to check, and that was learned when it went wrong in another project. Its version control had been told to ignore the whole inbox folder, to keep large dropped files out of the history, so a saved idea landed where no other session could see it. The confirmation was true, the file existed, and nobody looked, because not looking is the point.
What lands in the file
/capture takes the idea as you typed it and writes it to a folder called ingest/captures/ at the root of your project. The file is named with the date and a few words from the idea, and it opens with three short lines saying it's a capture, when it was saved and which conversation it came from. It reads nothing except a listing of that folder, which it needs so a second idea with a similar name gets a number on the end rather than replacing the first.
Type the command with nothing after it and it writes a short note of what you were just discussing instead. It doesn't show you that note to approve, because a slightly wrong summary costs almost nothing when the conversation is still there to check against later. Hand it several ideas at once and it writes one file each, all carrying the same source line, so a bad split can be put back together.
Then it answers with the count, something like "captured 2," and stops. If the capture was one part of a longer message, it gives the same short answer and goes straight on with the rest. That's the habit worth building. Say the idea, then say the next instruction, and never leave the task to do it.
Every session has to be able to see the file
Since nobody checks, the command checks for you after writing. It asks git, the version control most projects use, whether the file it just wrote is ignored. git check-ignore answers in one command, and git's own reference page lists what it returns. Exit code 1 means the file is visible, 0 means it's hidden and the command says so in a line, and anything else means the check couldn't run, which it also reports rather than calling fine. The recipe below runs the same check once while it installs, before anything has been saved.
Git is also how the command finds the root of the project, so an idea saved from a subfolder still lands in the one inbox. That's why the recipe needs a git repository. Outside one it refuses in a line and writes nothing.
Saved ideas wait until something reads them
Nothing in this recipe does anything with a saved idea after it's written. The captures folder fills up, one small file per idea, and stays full until you read it yourself or run something that files what's in it. /ingest is a separate recipe with its own setup that does that, sending each item where the project keeps that kind of thing and stopping for you to review the result. Either way the deciding happens at a moment you pick, with the task behind you.
What you get and what you don't
You get to finish the task you were on, with the idea sitting in a dated file that says where it came from. You don't get any thinking about it. There's no expansion, no suggestion about what to do and no filing into the place it finally belongs.
Take this spell for a spin
The block below is written for your AI rather than for you. Paste it in and it asks three questions, checks that version control can see the inbox folder, saves the /capture prompt where your tool keeps commands and runs it once on an idea you give it, as part of a small unrelated request, so you can watch it save the idea and carry on. Two changes happen only if you say yes: turning the folder into a git repository if it isn't one, and fixing a rule that would hide the inbox. It commits nothing, and it lists every file it created or changed so you can read them before you commit.
Next time an idea interrupts you, capture it in the same message as your next instruction and keep going.
Paste this into your AI agent or a new chat. The post above says what it does. Some prompts set something up in your project that keeps working after, and others run once, right where you paste them. None of them pushes anything to a remote.
You are installing a capture prompt in my coding project. The goal: when an idea about something else arrives while I am in the middle of a task, one command writes it into the project's inbox folder, answers in about four words and lets me carry on, so the idea never costs me the work I was doing. It saves the idea and does nothing else with it. Dealing with what piles up is a separate job for later, and not part of this.
Before you change anything, ask me these three things and wait for my answers:
1. Which tool I work in: Claude Code, Codex, Cursor, or the Claude chat app.
2. If that tool can read and write my files, which project folder. Capture needs that folder to be a git repository, because it uses git to find the project root and to check that what it saves is visible to every session. If it is not one, say so, explain in one line what git init does, and run it only if I say yes. If I say no, stop and tell me this recipe needs a repository.
3. One idea to capture right now, so we can test it.
If I ask what you are about to do before I answer, explain it in plain words and wait.
Then, using my answers:
- Check that version control will see the inbox: from the project root, run git check-ignore -v ingest/captures/x.md, a throwaway path that does not need to exist. Exit 1 means nothing ignores it, and you go on. Exit 0 means a rule in .gitignore would hide every capture from every other session and every other machine: show me the rule it names, propose the smallest change that stops that folder being ignored, make the change only if I say yes, and run the check again to prove it worked. Any other exit means the check could not run; say so rather than reading it as fine.
- Save the prompt below as a skill named capture, where my tool keeps one. In Claude Code a file at .claude/skills/capture/SKILL.md, relative to the project root, becomes a command I run by typing /capture; create the folders if they do not exist, and open the file with a short frontmatter block giving name, a one-line description of when to use it written from the goal above, and the line disable-model-invocation: true, so it runs only when I type it and never because an idea came up in conversation. In Codex or Cursor, save the prompt where I can paste it, tell me where, and replace $ARGUMENTS with the words: the idea I give you when I start this. In the Claude chat app, with no access to my files, most of the point is gone, and say so: the prompt goes in a project's instructions, and instead of writing a file it hands each capture back as a short note in its reply, in the same format, for me to keep. Skip the check above. In the saved prompt for the chat app, add one line after it saying that the date is today's date as the conversation shows it, that the git steps and the refusal without a project root do not apply, and that the reply is the note followed by the count. The prompt goes in word for word under a line naming the words of mine that start it, with $ARGUMENTS replaced as in Codex or Cursor; where it says to write a file, that means the note in the reply, and every git step is skipped. Everything between the line CAPTURE PROMPT BEGINS and the line CAPTURE PROMPT ENDS goes in the file, not including those two marker lines, and nothing else does apart from the frontmatter block in Claude Code. The bullets after the end line are instructions to you for right now; putting them in the file would make every future run try to install itself.
CAPTURE PROMPT BEGINS
You are given an idea to save. The input is: $ARGUMENTS. Save it and get out of the way. Do not discuss it, expand it, judge it, ask me about it or decide where it belongs, because that happens later and a question now costs me the task I am on. Find the project root once with git rev-parse --show-toplevel and build every path from it, because a bare relative path run from a subfolder writes to the wrong place. If there is no root, say in one line that there is no project inbox to capture into, and write nothing. Create <root>/ingest/captures/ if it does not exist, list it, and read nothing else. If the input is empty, or only points back at the conversation, such as that, this or the gist of this, write a short note of the idea we were just discussing that will make sense on its own later, and do not show it to me to check. Otherwise use my words as I gave them, with no screening, cleaning or rewording; if they hold several ideas, on separate lines, as bullets or joined by and also, write one file per idea, every file carrying the identical source line so a bad split can be put back together. Name each file <root>/ingest/captures/<date>-<short-slug>.md, taking the date from the shell with date +%F rather than from memory, and if that name is taken add -2, -3 and so on, never overwriting. Each file opens with a frontmatter block of three lines, type: capture, captured: the date, and source: the tool I am in plus enough of the conversation topic to find it later, marked as distilled when you wrote the note yourself; the idea follows. After writing, run git check-ignore -q on each file. Exit 1 is fine. Exit 0 means the file is ignored and invisible to every other session, so say that in one line and name the .gitignore change that would fix it. Any other exit means the check could not run, so say that instead of calling it fine. Reply in about four words with the count, such as captured 2, and nothing else. If the capture was one part of a longer message that also asked for other work, give the same short reply and then carry straight on with the rest of the message in the same turn.
CAPTURE PROMPT ENDS
- Run it once, now, on the idea I gave you, treating it as one part of a longer request whose other part is to list the files at the project root, so I can see it save the idea and then carry on. If the new command is not available in this session yet, follow the saved file by hand and say that is what you did; a run performed by hand is not proof the command fires, which is why the last thing you tell me is to type it in a fresh session. I should see the file it wrote with its three header lines, the result of the ignore check, a reply of about four words, and then the file listing.
- Do not commit anything, the capture included. List every file you created or changed, so I can read them and commit them myself.
- Do not push to any remote. Do not install software.
Finish by telling me how to start it: in Claude Code the command to type, in Codex or Cursor where the saved file is and what to paste with it, in the Claude chat app the words to open with, and what to put after it: the idea, or nothing to save the idea we were just discussing. Then tell me in one line that captures collect in ingest/captures/ until something deals with them, and that nothing in this recipe does.
