120-utilities

120-utilities is a cursor rule for Cursor from d-padmanabhan/agent-engineering-handbook. It costs 3,138 tokens per session, scanned A, original, MIT.

A set of rules for choosing command-line tools to read web pages, documentation, logs, and diagrams. It explains when to use tools such as curl, jq, Playwright, OCR, or a vision-capable model.

In plain words
What is it for?
Use it when fetching static or JavaScript-rendered pages, extracting structured data, reading official documentation, inspecting diagrams, or recognizing text inside images.
Why use it?
It helps an agent collect readable, source-linked information without using a heavy or unreliable tool for a simple page. It also sets expectations for clean, chunked, repeatable output.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: positional $N argument.

Good fit Use it when fetching static or JavaScript-rendered pages, extracting structured data, reading official documentation, inspecting diagrams, or recognizing text inside images.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/d-padmanabhan/agent-engineering-handbook/120-utilities
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.

Clone the repo
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook

Made for: Cursor.

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 120-utilities

README.md
[![agentmods](https://agentmods.dev/badge/rules/d-padmanabhan/agent-engineering-handbook/120-utilities.svg)](https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/120-utilities)
Your own site
<a href="https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/120-utilities"><img src="https://agentmods.dev/badge/rules/d-padmanabhan/agent-engineering-handbook/120-utilities.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,138 This file is loaded in full into every session.
When invoked 3,138 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.03138 $0.03138
Opus 5 $0.01569 $0.01569
Sonnet 5 $0.00628 $0.00628
Haiku 4.5 $0.00314 $0.00314

Measured 7d ago against content hash f5cc2d734ccf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

120-utilities scanned grade A with 1 finding 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 7d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

description: Practical tool selection for agents reading docs, blogs, logs, and diagrams (curl, lynx, jq, httpie, ripgrep, Playwright, OCR, VLM)
rules/120-utilities.mdc · 429 lines

How it starts

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

Command-Line Utilities & Documentation Ingestion Tools

Guiding principle

Choose the lightest tool that reliably produces the content you need in a machine-consumable form.

  • If the page is static HTML: prefer curl plus parsing (jq for JSON, HTML to text conversion, or a lightweight extractor).
  • If the page is JavaScript-rendered or requires interaction: use a headless browser (Playwright).
  • If Playwright is blocked or too heavy: try a doc-extraction proxy/cache (for example https://context7.com/) when it supports the target site.
  • If you need diagrams understood (not OCR): use a screenshot (Playwright) and a vision-capable model (VLM).
  • If you need text inside images: use OCR (Tesseract) as a supplement.
  • If you are reading official documentation at scale: prefer a documentation-aware retrieval system (RAG) over raw scraping.

What "done" looks like for an agent

The output you hand to the LLM should be:

  • Clean text (minimal navigation noise)
  • Source-attributed (URL, section headings)
  • Chunked (so the LLM does not get one huge blob)
  • Rate-limited and cacheable
  • Deterministic when possible (same input URL gives similar chunks)

Tool selection matrix

1) Static pages, APIs, feeds

Use these when content is already present in HTML or JSON without JS:

  • curl for fetching
  • jq for JSON shaping
  • ripgrep for local searching
  • lynx -dump for fast text extraction

Examples:

# Fetch HTML
curl -fsSL "https://acme.com/page" -o page.html

# Fetch JSON and shape it
curl -fsSL "https://api.acme.com/v1/items" | jq '.items[] | {id, name, updated_at}'

# Extract readable text quickly
lynx -dump -nolist "https://acme.com/page" > page.txt

When to stop here:

  • If the text is good enough for the agent to answer questions
  • If you do not need diagrams interpreted
  • If the page is not JS-rendered

2) JS-heavy sites, auth flows, dynamic docs, robust extraction

Use Playwright when curl or lynx fails to capture the real content.

Read the full file on GitHub · 429 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. 7d ago First seen · 429 lines · 3,138 tokens per session scan A f5cc2d734ccf

Subscribe to this mod's changes

120-utilities is a cursor rule published in the GitHub repository d-padmanabhan/agent-engineering-handbook (16 stars, last pushed 7d ago), licensed MIT. It adds 3,138 tokens to every session, about $0.0157 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.