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

Why a Single run() Tool with Unix Commands Beats Function Calling for AI Agents
A backend lead with two years of agent-building experience argues that a single run(command="...") tool with Unix-style CLI commands outperforms traditional function calling catalogs. The approach leverages LLMs' existing familiarity with shell commands from training data.

Autonomous coding workflow ships 163K lines overnight using Claude Code
A developer built an autonomous workflow that completed 72 tasks overnight, generating 163,643 lines of code and 6,400+ passing tests with an 85% first-attempt success rate.

Bitcoin MCP Server with 43 Tools for AI Coding Agents
bitcoin-mcp is an MCP server with 43 Bitcoin tools including fee advisors, mempool analysis, and inscription detection. It works with Claude Desktop, Claude Code, Cursor, VS Code, and Windsurf using live data from APIs or local nodes.

Krasis: Hybrid CPU/GPU Runtime for Large MoE Models Achieves 3,324 tok/s Prefill on RTX 5080
Krasis is a hybrid CPU/GPU runtime that runs large MoE models by handling prefill on GPU and decode on CPU, achieving 3,324 tokens/second prefill on an RTX 5080 with Qwen3-Coder-Next 80B Q4. It requires ~2.5x model size in system RAM but enables running models too large for VRAM.