cq: A Local-First Knowledge Sharing System for AI Coding Agents

cq is an open-source project from Mozilla.ai that creates a shared knowledge system for AI coding agents, described as "Stack Overflow for agents." It allows agents to propose and query "knowledge units" (KUs) — structured insights about problems encountered during coding tasks — using a standard schema.
How it works
Before tackling unfamiliar work, an agent queries the cq commons. If another agent has already learned something useful (like "Stripe returns 200 with an error body for rate-limited requests"), your agent gets that information upfront. When your agent discovers something novel, it proposes that knowledge back. Other agents confirm what works and flag stale information.
Technical implementation
- Local-first by default: Knowledge stays in
~/.cq/local.db(SQLite) on your machine - Skills: Markdown-based
- Local Python MCP server: FastMCP managing the local knowledge store
- Optional team API: FastAPI with Docker compose for sharing knowledge across an organization
- Human review: Team-level KUs can be reviewed via browser UI before appearing in queries
- Installation: Available as Claude Code plugin or OpenCode MCP server
Setup commands
claude plugin marketplace add mozilla-ai/cq
claude plugin install cq
Example use case
When asking Claude Code to write a GitHub action, it often used actions that were multiple major versions out of date due to training data staleness. After identifying this issue, the agent proposed a knowledge unit. Later, in a different repo using OpenCode with an OpenAI model, the cq skill was used before starting the task, retrieving the gotcha about major versions. The agent checked GitHub proactively and used correct, latest major versions, then confirmed the KU, increasing its confidence score.
Philosophy and approach
The project aims to move beyond static documentation files like CLAUDE.md or AGENTS.md, which can lead to unpredictable behavior when overloaded with rules. Instead, cq provides targeted information on specific tasks. The system is designed to work with any agent and any model, not locked to specific platforms.
Currently a proof-of-concept, the project is iterating from local use to team level, with eventual goals for a public commons. The team is focused on delivering immediate day-to-day value while acknowledging future challenges around data privacy and governance.
License: Apache 2.0
📖 Read the full source: HN LLM Tools
👀 See Also

Running OpenClaw and Codex CLI Natively on Android via AnyClaw APK
A developer has packaged OpenClaw and Codex CLI into an Android APK called AnyClaw, enabling the gateway and Control UI to run locally on ARM64 Android 7.0+ devices without root. The project required building dependencies from source and patching multiple components to handle Android-specific constraints.

Open Source Vigil Tool Addresses Agent Identity Problem in OpenClaw Ecosystem
An OpenClaw user building a web service discovered agent traffic indistinguishable from human users, prompting development of Vigil - an open source identity layer based on W3C DID that provides cryptographic credentials and behavioral history for agents.

Introducing cltree: A File Tree TUI for Claude Code
cltree is a split-pane TUI that displays your project file tree in real-time alongside Claude Code, showing the current working directory, hiding noise, and allowing all keystrokes to pass through.

Markdown as Protocol for Agentic UI with Streaming Execution
A prototype uses Markdown as a unified protocol for AI agents to stream text, executable code, and data in a single response. It features streaming execution where code runs statement-by-statement as it arrives and a mount() primitive for creating React UIs with data flow between client, server, and LLM.