djinnvim

A command-line file editor with Vim-style commands that changes small, pattern-matched sections instead of reading entire files. It shows a short confirmation around each edit.

In plain words
What is it for?
Use it to find, replace, print, and edit targeted text in files, especially when files are large or shell and file access are limited.
Why use it?
It helps edit large or restricted files while limiting how much file content is exposed or loaded. The displayed result provides a quick way to check each change.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/anschnapp/djinnvim/skill
Any agent
npx skills add anschnapp/djinnvim --skill skill
Clone the repo
git clone --depth 1 https://github.com/anschnapp/djinnvim

Made for: Claude Code, Codex.

Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,594 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00054 $0.02594
Opus 5 $0.00027 $0.01297
Sonnet 5 $0.00011 $0.00519
Haiku 4.5 $0.00005 $0.00259

Measured 2d ago against content hash 4272b0d03208, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

djinnvim scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/djinnvim/skill/SKILL.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

djinnvim: keyhole editing from the shell

You edit through small viewports, the way a vim user does: search by pattern, look at the echo, edit. Never read a whole file — every command returns the few lines around what it did, and that echo IS your verification (no re-reads needed).

Reach for it when finding or changing something would otherwise mean reading a whole file, when a change repeats across many sites, or when file and shell tools are restricted. Creating a file or rewriting one wholesale is not its job.

Setup — every command, two rules

  1. Pin the sandbox root in the same shell command (shell env does not persist between your calls):

    export DJINNVIM_ROOTS=/abs/path/to/project; djinnvim open src/app.py
    
  2. Pass each editor command as ONE quoted argument. Single-quote it; switch to double quotes only when the text itself contains a single quote:

    djinnvim edit 'at /old_name/ ciw new_name'
    djinnvim substitute ":%s/'eu-west'/'us-east'/"
    
  3. -f PATH names the file to work on, opening it if needed, so edit, substitute, print, matches and write need no separate open call: djinnvim edit -f src/app.py 'at /old/ ciw new'. Without it they use the active buffer. A switch is announced in the echo ([now on ... ]).

State (open buffers, cursor, registers, undo) persists across your shell calls via an auto-spawned per-session daemon — nothing to start or manage. djinnvim status shows it, djinnvim shutdown stops it (unwritten buffers die with it; only write touches disk). Exit codes: 1 = the editor said error: ... (read it — the buffer is untouched), 2 = usage/daemon problem.

The seven verbs

  • djinnvim open PATH — open/switch the active buffer and show its head. Optional, given -f above; use it when you want the file's metadata. Relative paths resolve against the root, not your cwd.
  • djinnvim motion CMD — move the cursor, one motion per call: /pattern (regex, forward), ?pattern (back), n/N (next/prev — n is ALWAYS forward, N ALWAYS backward, unlike vim), :80 (line), gg/G, fx/Fx (char on the cursor line). Search is strictly after the cursor and wraps, reporting match i of n (wrapped).
  • djinnvim matches PATTERN [-C 1] — grep-style listing of every match (capped at 50). Call this before any rename-like edit to see all sites and decoys.
  • djinnvim edit CMD — vim normal-mode edit (details below).
  • djinnvim substitute CMD — ex command (details below).
  • djinnvim print [CMD] — read-only window print (ed/vim :p), the reading tool: 'p' (current line, cursor stays), ':80 p' / ':/def load/ p' (cursor MOVES there, prints it), ':10,25 p' (range; cursor to its last line). Widen with above/below/around
    • tiny (8) / middle (25) / long (50) or a number — ':/def load/ p around middle'; around counts EACH side. Max ~100 lines per call; page by re-addressing a gutter line number.
  • djinnvim write — save the active buffer; reports lines changed. write --preview shows the full pending buffer-vs-disk ±diff without writing — the final review before committing.

Read the full file on GitHub · 175 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 175 lines · 54 tokens per session scan A 4272b0d03208

Subscribe to this mod's changes

djinnvim is a skill published in the GitHub repository anschnapp/djinnvim (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 54 tokens to every session and 2,594 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

verify-behavior

Verify or reproduce visible product behavior by driving the real UI with pi-computer-use's checked tools, requiring verified expect postconditions and durable state evidence for meaningful UI flows. Use when triage needs visual reproduction, implementation needs behavioral proof, review needs interactive confirmation…

nicknisi/dotfiles · 68 tokens

source-drafting

Use when drafting documents, reports, posts, presentations, or review comments from source materials, or conducting research across provided documents. Enforces read-first drafting, a source map for every claim, agent verification, and separation of verified from unverified claims.

nicknisi/dotfiles · 54 tokens

srt-whiteboard-animation

将 SRT 字幕做成暖米黄纸张底的白板手绘动画:读字幕→输出配图策略→确认后生成统一风格线稿→按叙事语义标注分区→预览台调整→渲染 MP4。编排沿用分区遮罩揭示(annotation.json / sequence / startMs / protectedRegions),但每个区域内的落墨换成 stream 的连续笔迹(骨架/网格 ink→color)。当用户提供 SRT 字幕并要求"字幕做成白板手绘/流式笔迹视频""SRT 生成白板动画""按字幕分镜画手绘"时触发。.

geeklee/srt-whiteboard-animation · 156 tokens

bro

Restate the last message in plain human language, with no jargon.

nicknisi/dotfiles · 16 tokens

user-research-cookiy

End-to-end user research assistant — qualitative and quantitative. Use this skill whenever the user mentions user research, user interviews, discussion guides, interview guides, research plans, qualitative research, quantitative research, user surveys, survey design, usability studies, participant recruitment…

cookiy-ai/user-research-skill · 154 tokens

autopilot-batch

Fan out a batch of autopilot-queued issues to parallel background worktree subagents — each runs /autopilot at the build model from its 'model:' label — with a gating review at Opus 5 or above and never below the build (Opus reviews Sonnet and Opus builds, Fable reviews Fable builds).

joshukraine/dotfiles · 75 tokens