Skip to content
Agent Memory
Skill

/cq

INVOKE WHEN: - Starting any task — query first (cq catches blind spots your training data missed: stale versions, integration gotchas, undocumented quirks) - You just resolved a non-obvious error, confusing error message, or surprising tool behavior — present a draft KU to the

BOOST
From plugin
cq
1.3k1 skill2 commands
Install
$ npx -y skills add mozilla-ai/cq --skill cq --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/cq

Context preview

The summary Claude sees to decide when to auto-load this skill.

INVOKE WHEN: - Starting any task — query first (cq catches blind spots your training data missed: stale versions, integration gotchas, undocumented quirks) - You just resolved a non-obvious error, confusing error message, or surprising tool behavior — present a draft KU to the

SKILL.md

cq.SKILL.md
name: cq
description: |
  INVOKE WHEN:
  - Starting any task — query first (cq catches blind spots your training data missed: stale versions, integration gotchas, undocumented quirks)
  - You just resolved a non-obvious error, confusing error message, or surprising tool behavior — present a draft KU to the user and call `propose` if they approve
  - Retrieved guidance proved correct or wrong — confirm or flag it

  SKIP WHEN:
  - You already queried cq for this exact topic earlier in this session

  Propose with user approval mid-task the moment an insight stabilizes — never batch to end-of-session via /cq:reflect.

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.

`reflect` and `status` are not part of the per-task loop. `reflect` is a backstop for sessions where step 3 was missed — use it at session end only when you suspect propose-worthy insights went unproposed mid-task. Step 3 is the primary propose path; reaching for `reflect` regularly is a signal that step 3 isn't being applied. Use `status` on demand to check store statistics.

---

Reference

Detailed guidance for each tool follows. Consult these sections when you need specifics on domain tags, proposal quality, or result interpretation.

Querying Knowledge (`query`)

Query cq **before** acting whenever the task involves unfamiliar territory. Specifically, call `query` when:

  • About to make an API call to an external service.
  • Working with a library or framework not yet used in this session.
  • Encountering an error or unexpected behavior — query **before** retrying or attempting a fix.
  • Setting up CI/CD pipelines, infrastructure, or configuration.
  • Starting work in an unfamiliar area of the codebase.

When Not to Query

Do not query cq for:

  • Routine edits to application code you have already been working in during this session.
  • Standard library operations in the project's primary language.
  • Tasks already queried for earlier in the current session.

**Rationalization check.** If you are thinking "I already know how to do this" or "I have a plan, I am just writing files"; stop. Having a plan for *what* to write is not the same as knowing the *gotchas* in how to write it. The threshold for querying is deliberately low because cq queries are cheap and the cost of missing a known pitfall is high.

Formulating Domain Tags

Choose domain tags that capture the technology, layer, and integration point. Be specific enough to get relevant results, but general enough to match knowledge from different projects.

Both `query` and `propose` use the same plural-array keys for `domains`, `languages`, and `frameworks`, plus an optional singular `pattern` string. Each is a flat top-level argument; there is no `context` wrapper.

Each piece of information belongs in one field — do not repe

Read more
Ships withcq

Status: 0.x — expect breaking changes. See DEVELOPMENT.md for migration guides. An open standard for shared agent learning — structured knowledge that prevents AI agents from repeating each other's mistakes.

Get the whole plugin
Stats
1,283
Stars
69
Forks
Active
Maintenance
Go
Language
Apache-2.0
License
2d ago
Last commit
7mo ago
Created
1d ago
Added

Repo: mozilla-ai/cq