mq general.instructions.md

General development rules for mq, a Rust command-line tool that queries and transforms Markdown files. They cover code style, project structure, errors, tests, documentation, and changelog updates.

In plain words
What is it for?
Use them for everyday Rust changes, bug fixes, feature requests, directory decisions, formatting, validation, testing, and release notes.
Why use it?
They give contributors a shared way to make changes readable, checked, and consistent across the project.

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

Made for: GitHub Copilot.

Per session 622 This file is loaded in full into every session.
When invoked 622 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.00622 $0.00622
Opus 5 $0.00311 $0.00311
Sonnet 5 $0.00124 $0.00124
Haiku 4.5 $0.00062 $0.00062

Measured yesterday against content hash 125a2c256cc0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mq general.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 yesterday.

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.

.github/instructions/general.instructions.md · 66 lines

How it starts

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

General Coding Conventions for mq

  • Follow Rust best practices and idioms for all Rust code.
  • Use meaningful variable, function, and type names.
  • Write concise, clear, and specific comments and documentation.
  • Avoid magic numbers; use named constants.
  • Prioritize code readability and maintainability.
  • All code must be formatted with cargo fmt and pass cargo clippy.
  • Use the miette crate for error handling and provide user-friendly error messages.
  • Avoid panics; return appropriate Result types instead.
  • All public items (functions, structs, traits, enums, etc.) must have documentation comments.
  • Update or add tests for all new or changed functionality.
  • All changes must be reflected in CHANGELOG.md.
  • Ensure all contributions are compatible with the MIT License.

Directory Structure

The mq project follows this main directory structure:

  • /crates - Contains multiple Rust crates
    • mq-c-api - C API for integrating mq functionality into C applications
    • mq-run - Implementation of the mq command-line interface
    • mq-crawler - Tool for crawling directories and collecting Markdown files for batch processing
    • mq-formatter - Code formatter
    • mq-hir - High-level Internal Representation (HIR)
    • mq-lang - Implementation of the mq
    • mq-lsp - Language Server Protocol implementation
    • mq-markdown - Markdown parser and manipulation utilities
    • mq-repl - REPL (Read-Eval-Print Loop) for mq
    • mq-wasm - WebAssembly (Wasm) implementation for running mq in browsers and other WASM environments
    • mq-web-api - Web API bindings for mq
  • /docs - Documentation and user guides
  • /editors - Editor integrations and plugins for popular code editors
  • /assets - Static assets such as images, icons, and other resources
  • /examples - Usage examples
  • /tests - Integration tests
  • /scripts - Scripts for automation tasks
  • /packages - Contains various packages for different functionalities
    • mq-web - npm package for using mq in web applications and JavaScript environments
    • playground - A playground for developing and testing for mq

Read the full file on GitHub · 66 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. yesterday First seen · 66 lines · 622 tokens per session scan A 125a2c256cc0

Subscribe to this mod's changes

mq general.instructions.md is an instructions file published in the GitHub repository harehare/mq (1,023 stars, last pushed 2d ago), licensed MIT. It adds 622 tokens to every session, about $0.0031 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.