annotated-rewrite

annotated-rewrite is a skill for Claude Code, Codex from Ghqqqq/codex-overleaf-link. It costs 58 tokens per session (844 once invoked), scanned A, original, MIT.

An editing rule for LaTeX files, which are source files used to produce formatted documents such as papers and reports. It keeps longer original passages as comments and places the rewritten text below them.

In plain words
What is it for?
Use it when rewriting paragraphs, equations, lists, or other multi-line LaTeX content; short word-level fixes may be changed directly.
Why use it?
It makes substantial edits easy to compare and review directly in the source file.

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/ghqqqq/codex-overleaf-link/annotated-rewrite
Any agent
npx skills add Ghqqqq/codex-overleaf-link --skill annotated-rewrite
Clone the repo
git clone --depth 1 https://github.com/Ghqqqq/codex-overleaf-link

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for annotated-rewrite

README.md
[![agentmods](https://agentmods.dev/badge/skills/ghqqqq/codex-overleaf-link/annotated-rewrite.svg)](https://agentmods.dev/skills/ghqqqq/codex-overleaf-link/annotated-rewrite)
Your own site
<a href="https://agentmods.dev/skills/ghqqqq/codex-overleaf-link/annotated-rewrite"><img src="https://agentmods.dev/badge/skills/ghqqqq/codex-overleaf-link/annotated-rewrite.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 844 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.00058 $0.00844
Opus 5 $0.00029 $0.00422
Sonnet 5 $0.00012 $0.00169
Haiku 4.5 $0.00006 $0.00084

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

Security

Grade A, and why

annotated-rewrite 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 5d 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.

native-host/src/skills/annotated-rewrite/SKILL.md · 72 lines

How it starts

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

Annotated Rewrite

When rewriting .tex file content (paragraphs, sentences, equations, list bodies, or any block larger than a few words), preserve the original by commenting it out rather than deleting it, then write the replacement below. This lets the user review exactly what changed before accepting the edit.

When to apply

Default to this pattern whenever the replaced content is more than a short inline phrase (see the word-level exception below), regardless of content type — prose, equations, lists, environment bodies, or any contiguous block. Use it as often as possible — when in doubt, use it.

A useful guide: if the replaced content is 3 or more source lines, always apply it. For shorter replacements (1-2 source lines), lean toward applying it unless the change is purely word-level: replacing a single word, fixing a typo, or changing a run of 1-5 words within an unbroken clause.

Word-level edits are the only case where skipping the annotated format is clearly appropriate (subject to the structural exceptions in Rule 8).

Edit format

% [original]
% The proposed method encodes user history as a fixed-length vector,
% then applies a linear projection before computing dot-product scores.
% Training uses binary cross-entropy loss over sampled negatives.
%
% \begin{equation}
%   \hat{y}_{ui} = \mathbf{u}_i^\top \mathbf{v}_j
% \end{equation}

% [revised]
We encode user history with a transformer encoder, producing a
context-aware representation that is projected into the item space.
Training minimises a softmax loss over in-batch negatives.

\begin{equation}
  \hat{y}_{ui} = \mathrm{softmax}(\mathbf{U}\mathbf{V}^\top)_{ij}
\end{equation}

Rules

  1. Copy the original lines verbatim into the comment block — do not alter them
  2. Include every line of the replaced content verbatim with % prepended; blank lines within the block become % empty-comment lines (a line containing only %). Include \begin{...} / \end{...} markers only when they are part of the replaced content — do not comment out enclosing environment markers that are not themselves changing
  3. No blank line between % [original] and the first commented line
  4. One blank line between the last commented line and % [revised]; one blank line before % [original] and after the last line of the replacement (to separate the annotated construct from surrounding document text)
  5. The new content after % [revised] is normal LaTeX (not commented)
  6. For multiple non-adjacent replaced blocks, apply the pattern independently to each block
  7. Idempotency: if the content being edited already contains a % [original] / % [revised] block, edit only the active content after % [revised] — do not re-wrap the existing annotated block or create a new outer annotation around it
  8. Structure safety: only apply this pattern at block level (paragraph, sentence, equation block, list body, or environment body). Do NOT insert % [original] / % [revised] inside macro arguments, table rows, math expressions, \caption{...}, \item[...], or preamble commands — make minimal direct edits there instead, or ask for confirmation before changing structurally sensitive content

Read the full file on GitHub · 72 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. 5d ago First seen · 72 lines · 58 tokens per session scan A f06eedf85c0b

Subscribe to this mod's changes

annotated-rewrite is a skill published in the GitHub repository Ghqqqq/codex-overleaf-link (75 stars, last pushed 17d ago), licensed MIT. It adds 58 tokens to every session and 844 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-30.

Related

Other skills, from other repositories

ml-paper-writing

Write publication-ready ML/AI/Systems papers for NeurIPS, ICML, ICLR, ACL, AAAI, COLM, OSDI, NSDI, ASPLOS, SOSP. Use when drafting papers from research repos, structuring arguments, verifying citations, or preparing camera-ready submissions. Includes LaTeX templates, reviewer guidelines, and citation verification…

OpenRaiser/NanoResearch · 80 tokens

academic-plotting

Generates publication-quality figures for ML papers from research context. Given a paper section or description, extracts system components and relationships to generate architecture diagrams via Gemini. Given experiment results or data, auto-selects chart type and generates data-driven figures via matplotlib/seaborn.…

OpenRaiser/NanoResearch · 68 tokens

academic-plotting

Generates publication-quality figures for ML papers from research context. Given a paper section or description, extracts system components and relationships to generate architecture diagrams via Gemini. Given experiment results or data, auto-selects chart type and generates data-driven figures via matplotlib/seaborn.…

Orchestra-Research/AI-Research-SKILLs · 68 tokens

systems-paper-writing

Comprehensive guide for writing systems papers targeting OSDI, SOSP, ASPLOS, NSDI, and EuroSys. Provides paragraph-level structural blueprints, writing patterns, venue-specific checklists, reviewer guidelines, LaTeX templates, and conference deadlines. Use this skill for all systems conference paper writing.

Orchestra-Research/AI-Research-SKILLs · 66 tokens

paperjury

Three modes for CS-conference papers (CVPR/ICCV/ECCV vision, ACL/EMNLP/NAACL NLP, ICLR/NeurIPS/ICML/AAAI ML). DIRECT-EDIT mode (common): the user describes a change in Chinese or English and the manuscript (LaTeX or Markdown) is edited directly through a CS-venue writing toolkit with author sign-off (use for 改这段 /…

Spark-To-Paper-Skills/paperjury · 263 tokens

overleaf

Sync and manage Overleaf LaTeX projects from the command line. Pull projects locally, push changes back, compile PDFs, and download compile outputs like .bbl files for arXiv submissions. Use when working with LaTeX, Overleaf, academic papers, or arXiv.

aloth/olcli · 62 tokens