Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

htmlq

$ htmlq Community Low Risk
Michael Farrell (mgdm) · Browser & Web · MIT · macos / linux / windows

htmlq parses HTML from stdin using CSS selectors (like article p, a, or meta[name=description]) and prints matched elements, --text, or --attribute values—letting agents strip megabytes of HTML boilerplate before reading.

FCRS-1.0 Score
89 /100
Good
Medium Confidence
Zero-Friction Install
brew install htmlq
CLI vs MCP Decision CLI Only

Offline Unix pipe filter (curl ... | htmlq --text 'main') that dramatically reduces token consumption with zero network/MCP overhead.

Agent-Readiness Checklist

— JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Zero-noise pipe filter with --text, --attribute, and --remove-nodes, though it emits text/HTML fragments rather than JSON.

  • Supports --text, --attribute, --remove-nodes, and -b base URL resolution
Trust & Safety 25 / 25

Strictly offline, read-only HTML parser with zero network access, zero JS execution, and zero credential access.

  • Pure offline stdin-to-stdout parser with no writes or network calls
Setup & Portability 14 / 15

Single static Rust binary via brew, cargo, and GitHub Releases.

  • Zero-dependency Rust binary
Utility & Efficiency 14 / 15

Slashes HTML payload size by 10x–50x in shell pipelines alongside curl.

  • Fast CSS selector extraction (--text, -a href)
Maintenance & Lineage 7 / 10

Community Rust tool (mgdm/htmlq, MIT); feature-complete with infrequent releases.

  • mgdm/htmlq repository under MIT license
Docs & Verifiability 8 / 10

Simple, single-page README and --help.

  • Clear examples in mgdm/htmlq README

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; operates purely on local stdin/files offline.

Side Effects
Read-Only
Cost & Quotas

Free, MIT open-source Rust binary.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# htmlq Agent Rules
- Pipe `curl` HTML through `htmlq --text` or `--remove-nodes script --remove-nodes style` before inspecting web pages.
- `htmlq` is strictly static HTML parsing—it does not execute JavaScript on SPAs.

Agent-Ready Command Recipes

Safe Read-Only Queries

Extract plain article text from a fetched HTML page
curl -fsS https://example.com | htmlq --text 'main, article, body'

Strips tags, scripts, and nav chrome using --text to return compact readable text.

List all href links inside a container
htmlq --attribute href 'main a' < page.html

Extracts only href attribute values (-a href) from matching anchor elements.

Strengths for Agents

  • + Purely offline, read-only, millisecond Rust HTML filter.
  • + --text and --attribute strip HTML noise cleanly for agent context savings.

Caveats & Pitfalls

  • ! Static HTML only—cannot render client-side React/Vue SPAs.
  • ! Does not emit JSON natively.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI