cq is an open standard and command-line tool for storing, sharing, and querying structured knowledge between coding agents. It helps agents reuse lessons from previous tasks and avoid independently repeating known failures. The catalogue add-ons install and guide cq workflows in supported coding-agent hosts.
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.
npx agentmods add skills/mozilla-ai/cq/promptsnpx skills add mozilla-ai/cq --skill promptsgit clone --depth 1 https://github.com/mozilla-ai/cqWrote 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.
[](https://agentmods.dev/skills/mozilla-ai/cq/prompts)<a href="https://agentmods.dev/skills/mozilla-ai/cq/prompts"><img src="https://agentmods.dev/badge/skills/mozilla-ai/cq/prompts.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00128 | $0.05787 |
| Opus 5 | $0.00064 | $0.02893 |
| Sonnet 5 | $0.00026 | $0.01157 |
| Haiku 4.5 | $0.00013 | $0.00579 |
Grade A, and why
cq 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 5d 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.
This is a copy
100% identical to cq — 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.
How it starts
The opening of the file, as written. The whole thing — 324 lines — stays where its author put it; the contents beside it link to each section on GitHub.
cq Skill
cq is a shared knowledge commons for AI agents. Use the cq MCP tools to query existing knowledge before acting, propose new knowledge when you discover something novel, and confirm or flag knowledge units based on your experience.
These tools communicate with a local MCP server that maintains a SQLite knowledge store on your machine and optionally syncs with a shared remote store.
| Tool | When | Purpose |
|---|---|---|
query |
Before acting | Search for relevant knowledge |
propose |
After discovering | Submit new knowledge |
confirm |
After verifying | Strengthen a knowledge unit |
flag |
When wrong/stale | Weaken or mark a knowledge unit |
status |
On demand | Show store statistics |
Core Protocol
Follow this loop for every task:
- Before acting — call
querywith relevant domain tags derived from the task. The threshold for querying is low: if the work touches anything where version-specific behavior, tool configuration, or cross-system integration could bite you, query. Skip only for routine edits to application code you have already been working in during this session. - Apply guidance — if results are returned, use the
actionfield as a starting point. Always verify guidance before relying on it; confidence scores reflect how many agents have confirmed the insight, not whether it is still current. If the guidance proves legitimate — it resolves an issue or saves you from a potential mistake — callconfirmimmediately. Do not defer to task completion. - Draft and present IMMEDIATELY when the current step stabilizes — not at end-of-task, not via
/cq:reflect. The trigger is: "did I just learn something non-obvious another agent would benefit from?" If yes, draft the candidate, run the VIBE√ safety check, present it to the user, and callproposeonce they approve — then continue with the task. "Immediately" means do not batch or defer the draft to end-of-session; it does not mean skip approval. "Non-obvious" means you had to read docs/issues, change build/CI/packaging config, handle an unfamiliar error, or the behavior contradicted reasonable expectations. Applies to error-driven fixes and non-error insights (performance gotchas, subtle API contracts, workflow best practices). Strip project-specific details before submitting. In unattended runs where no user can approve, follow the headless rules under Applying VIBE√. - STOP — before completing the task (safety net, not the primary path). Step 3 should already have caught any propose-worthy insights mid-task; this step exists to catch what slipped through. Before sending "done":
- Used cq guidance that proved correct? →
confirmwith the unit's ID. - Discovered something novel that you somehow didn't propose at step 3? → run it through the same gate as step 3 now anyway (draft, VIBE√, present, approval,
propose), and treat its existence as a step-3 protocol failure (you should have presented it earlier). - Found cq guidance that was wrong or stale? →
flagwith a reason.
- Used cq guidance that proved correct? →
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 324 lines · 128 tokens per session scan A 6b7e94aeb754
cq is a skill published in the GitHub repository mozilla-ai/cq (1,262 stars, last pushed 4d ago), licensed Apache-2.0. It adds 128 tokens to every session and 5,787 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to cq, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
implementation-strategy
Choose compatibility-aware scope for runtime and API changes in openai-agents-python. Use before initial implementation and each review-feedback batch to decide whether to patch, reset the design, preserve compatibility, or reject unsupported cases.
sensitive-logging-audit
Audit and fix sensitive-data exposure through Python runtime logging in openai-agents-python. Use when reviewing logging, print, warnings, stderr, traceback, MCP names, model or tool exceptions, redaction flags, or any diagnostic path that may retain user data.
maintainer-review
Assess an openai-agents-python GitHub issue or pull request as a maintainer. Use to verify the claimed need and practical impact, compare supported alternatives or competing approaches, separate code quality from repository readiness, recommend the maintainer action, and draft a copy-ready comment when evidence…
python-package-management
Guide for managing packages in the Agent Framework Python monorepo, including creating new connector packages, versioning, and the lazy-loading pattern. Use this when adding, modifying, or releasing packages.
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
fastapi-templates
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.