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

MCP Server for Italian Train Data: Real-Time Delays, Departures, and Schedules in Claude
A developer built an unofficial MCP server for Trenitalia that provides five tools for querying Italian train data through Claude, including real-time departure/arrival boards, train tracking, and schedules with live delay enrichment.
TextGen (text-generation-webui) Becomes Native Desktop App with Portable Builds
TextGen, the open-source alternative to LM Studio, has evolved from a web UI to a no-install desktop app for Windows, Linux, and macOS with portable builds, full privacy, and advanced quantization support.

OpenClaw Agent Gains Phone Call Capability Through Custom Skill
A developer created a custom skill for self-hosted OpenClaw agents that enables phone call functionality, allowing the agent to initiate calls based on triggers like build completions or server outages. The implementation provides voice interaction with full chat capabilities including web searches and alert setup.

Building a Geological Clock with Claude Code: Single HTML + Three.js
A product designer built eona.earth, a geological clock that maps Earth's 4.5 billion years onto 12 hours, using Claude Code, Three.js, and custom WebGL shaders — all as a single HTML file with no build step.