mq copilot-instructions.md

A development guide for mq, a Rust command-line tool that processes Markdown files in ways similar to jq, a tool for filtering and transforming structured data. It documents coding, testing, error-handling, and commit rules.

In plain words
What is it for?
Use it when adding or changing mq features, fixing bugs, writing tests, formatting Rust code, checking warnings, or preparing commits.
Why use it?
It helps an agent follow the project's Rust standards and produce clear errors and tested changes. It also keeps commit messages in the expected format.

Instructions file for GitHub Copilot

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/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/harehare/mq

Made for: GitHub Copilot.

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 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.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 copilot-instructions.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

Copies of this mod

2 near-identical copies found in the catalogue:

.github/copilot-instructions.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 copilot-instructions.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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.