agentleFS
beyarkaybeyarkay/claude-skills/drop-user-in-file/SKILL.md

drop-user-in-file

Skill2 starsChanged 4 months agoMITView on GitHub

Hand the keyboard to the user so they can edit a file themselves mid-session, in a real nvim popup, then read back what they changed. Use when the user says things like "drop me into <file>", "let me hand-edit X", "open X in nvim for me", "I'll edit this part myself", "pause so I can tweak it", or otherwise wants to make manual edits rather than have you make them. Requires tmux + nvim.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After it returns, read the printed unified diff to see exactly what they changed, and continue from there.

    line 29
  2. Very specific:

    Window-gated: if this Claude's tmux window isn't the one the user is currently viewing, the popup does *not* ambush whatever they're …

    line 39
  3. Very specific:

    Instead the window is renamed ✎ EDIT WAITING — … and the popup only appears once they switch back to it.

    line 41
  4. Distinctive:

    If either is missing, tell the user the requirement rather than retrying.

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

drop-user-in-file

Float an interactive nvim session in a tmux display-popup at PATH:LINE, block until the user :qs, then print the before/after unified diff. Use it whenever the user wants to make an edit by hand instead of dictating it to you — prose they'd rather write themselves, a fiddly value, a judgement call about wording, etc.

How to run

Invoke the bundled script via Bash with a long timeout (it blocks for the whole edit session — the user may take minutes):

~/.claude/skills/drop-user-in-file/drop-user-in-file PATH [LINE]
  • PATH — file to open (relative paths resolve against the current working directory; the file is created if it doesn't exist yet).
  • LINE — optional line number to open at (default 1).
  • Set the Bash tool timeout to something generous, e.g. 600000 (10 min), so the call doesn't time out while the user is typing.

After it returns, read the printed unified diff to see exactly what they changed, and continue from there. Do not re-open the file to "verify" — the diff is the source of truth.

What it does / how it works

  • Runs from Claude's TTY-less Bash subshell, but tmux display-popup talks to the tmux server, which paints the popup onto the user's attached client. display-popup -E blocks the invoking shell until nvim exits, so the tool call naturally waits for the edit to finish.
  • Window-gated: if this Claude's tmux window isn't the one the user is currently viewing, the popup does not ambush whatever they're looking at. Instead the window is renamed ✎ EDIT WAITING — … and the popup only appears once they switch back to it. (No desktop notification, by design.)
  • The popup is top-anchored and leaves ~20 rows at the bottom uncovered so the user can still read your latest message while editing.
  • On return it diffs a pre-edit backup against the saved file and prints the full unified diff (never truncated). It reports no changes if they :q without saving, and notes if the file still doesn't exist afterwards.

Requirements & failure modes

  • Must be inside tmux — exits with an error if $TMUX is unset (Claude's Bash subshell has no TTY of its own; tmux is what renders nvim on screen).
  • nvim must be on PATH — exits with an error otherwise.

If either is missing, tell the user the requirement rather than retrying.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.