mq CLAUDE.md

A development guide for mq, a Rust command-line tool for slicing, filtering, mapping, and transforming Markdown files. It also defines Rust practices and a format for commit messages.

In plain words
What is it for?
Use it when developing mq, documenting public code, handling errors, adding tests, or writing commits for features, fixes, documentation, refactoring, and other changes.
Why use it?
It puts project context and contribution rules in one place, so code changes and commit history follow the same conventions.

Instructions file

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 instructions/harehare/mq/claude-md
Clone the repo
git clone --depth 1 https://github.com/harehare/mq
Per session 843 This file is loaded in full into every session.
When invoked 843 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00843 $0.00843
Opus 5 $0.00421 $0.00421
Sonnet 5 $0.00169 $0.00169
Haiku 4.5 $0.00084 $0.00084

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

Security

Grade A, and why

mq CLAUDE.md 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.

Origin

This is a copy

100% identical to mq copilot-instructions.md — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 102 lines

How it starts

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

mq Development Guide

Project Overview

mq is a jq-like command-line tool for Markdown processing. Written in Rust, it allows you to easily slice, filter, map, and transform Markdown files.

Coding Conventions

Rust Code Conventions

  • Always format and validate code using cargo fmt and cargo clippy
  • Add appropriate documentation comments to all public functions, structs, traits, enums, etc.
  • Use the miette crate for error handling and provide user-friendly error messages
  • Avoid panics whenever possible and return appropriate Result types
  • Write comprehensive tests and update related tests when adding or changing functionality

Commit Message Conventions

Use the following format for commit messages:

<type>(<scope>): <description>

[optional body]

[optional footer]
  • Types include:
    • ✨ feat: New feature
    • 🐛 fix: Bug fix
    • 📝 docs: Documentation changes
    • 💄 style: Code style changes that don't affect behavior
    • ♻️ refactor: Refactoring
    • ⚡ perf: Performance improvements
    • ✅ test: Adding or modifying tests
    • 📦 build: Changes to build system or external dependencies
    • 👷 ci: Changes to CI configuration files and scripts
  • Write clear, concise, and descriptive commit messages.
  • Reference related issues or pull requests when relevant.

Documentation Guidelines

When adding new features, update the documentation.

  • Keep documentation up-to-date with code changes.
  • Use clear, concise language and provide usage examples.
  • Document all public APIs, commands, and features.
  • Update /docs and crate-level README.md files for new features or changes.
  • Add changelog entries for all user-facing changes.
  • Ensure documentation is consistent across all files and crates.
  • Use Markdown best practices for formatting and structure.

Testing Conventions

  • Write comprehensive tests for all new features and bug fixes.
  • Use descriptive names for test functions and modules.
  • Prefer table-driven tests for similar input/output patterns.
  • Use assert_eq!, assert!, and custom error messages for clarity.
  • Avoid flaky or timing-dependent tests.
  • Place integration tests in the tests/ directory and unit tests alongside implementation.
  • Mock external dependencies where possible.
  • Keep tests fast and isolated.
  • Update or add tests when changing existing code.

Read the full file on GitHub · 102 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 · 102 lines · 843 tokens per session scan A c25e3d23d254

Subscribe to this mod's changes

mq CLAUDE.md is an instructions file published in the GitHub repository harehare/mq (1,023 stars, last pushed 2d ago), licensed MIT. It adds 843 tokens to every session, about $0.0042 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to mq copilot-instructions.md, differing in 0 lines, and is treated as a copy.