cq

cq is a skill for Claude Code, Codex from mozilla-ai/cq. It costs 128 tokens per session (5,787 once invoked), scanned A, a copy of cq, Apache-2.0.

A shared knowledge system for coding agents that stores and retrieves practical answers about tools, versions, configuration, and integrations.

In plain words
What is it for?
Use it to search existing guidance, add newly discovered knowledge, confirm useful entries, or flag information that is wrong or out of date.
Why use it?
It helps catch outdated assumptions and recurring setup problems before work begins, and can preserve new findings for later tasks.

Skill for Claude CodeCodex

About the project

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.

mozilla-ai/cq · 1,262 stars · on GitHub

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 skills/mozilla-ai/cq/prompts
Any agent
npx skills add mozilla-ai/cq --skill prompts
Clone the repo
git clone --depth 1 https://github.com/mozilla-ai/cq

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for cq

README.md
[![agentmods](https://agentmods.dev/badge/skills/mozilla-ai/cq/prompts.svg)](https://agentmods.dev/skills/mozilla-ai/cq/prompts)
Your own site
<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>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,787 The whole file, excluding the scripts and references it only reads on demand.
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.00128 $0.05787
Opus 5 $0.00064 $0.02893
Sonnet 5 $0.00026 $0.01157
Haiku 4.5 $0.00013 $0.00579

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

Security

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.

Origin

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.

sdk/go/prompts/SKILL.md · 324 lines

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:

  1. Before acting — call query with 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.
  2. Apply guidance — if results are returned, use the action field 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 — call confirm immediately. Do not defer to task completion.
  3. 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 call propose once 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√.
  4. 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? → confirm with 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? → flag with a reason.

Read the full file on GitHub · 324 lines

Files

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.

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. 5d ago First seen · 324 lines · 128 tokens per session scan A 6b7e94aeb754

Subscribe to this mod's changes

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.

Related

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.

openai/openai-agents-python · 47 tokens

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.

openai/openai-agents-python · 59 tokens

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…

openai/openai-agents-python · 69 tokens

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.

microsoft/agent-framework · 43 tokens

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.

wshobson/agents · 45 tokens

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.

wshobson/agents · 37 tokens