Plugins
Extend CodeWork with MCP servers, tools, and system prompt sections, installed from npm, git, or a file in your repo.
Plugins extend CodeWork. A plugin can add MCP servers, give the agent a new tool, change how an existing tool is described, or add instructions to the system prompt. CodeWork’s own tools and system prompt are plugins too.
How plugins work
A plugin is a JavaScript module that default-exports one plugin definition. One package is one plugin. You name it in a settings file, install it with the CLI, and CodeWork loads it.
- Declare it. Add an entry to the
pluginsarray in.codework/settings.jsonc(for a project) or~/.codework/settings.jsonc(for you). - Install it.
codework plugin addinstalls and declares in one step. On a fresh checkout,codework plugin installfetches everything the settings already name. - Run. Before every turn, CodeWork runs the
setupof each plugin that is turned on and hands the resulting servers, tools, and prompt to the model.
Loading never touches the network. If a plugin is declared but not installed, CodeWork tells you to run codework plugin install instead of quietly fetching it. See resolve-only loading.
Only install plugins you trust
A plugin’s code runs inside the CodeWork process with your user’s access, and CodeWork has no permission prompts: tools a plugin registers run without asking. CodeWork never runs install scripts, but the plugin itself is trusted once it loads.
Plugin kinds
Every plugin declares a kind, which is the part of the agent it extends. The kind also decides when it runs: every mcp plugin runs first, then every tool plugin, then every prompt plugin. A prompt plugin therefore always sees the complete tool set.
| Kind | What it does | Example |
|---|---|---|
mcp | Adds, changes, or removes the MCP servers a session connects to. | A plugin that adds your company’s docs server. |
tool | Registers tools the model can call, changes another tool’s description, or guards its own calls. | A list_processes tool that runs ps inside the sandbox. |
prompt | Writes into the system prompt: the foundation, the shared rules list, or a section of its own. | A house-style plugin that appends your team’s coding rules. |
Within one kind, plugins run in the order their entries are written, so one plugin can build on another.
Built-in plugins
CodeWork ships these plugins. You can switch any of them on or off from settings by ID.
| ID | Default | What it adds |
|---|---|---|
codework.tool.bash | On | Run shell commands in the session’s sandbox. |
codework.tool.read | On | Read files. |
codework.tool.write | On | Create or overwrite files. |
codework.tool.edit | On | Make targeted edits to existing files. |
codework.tool.grep | Off | Search file contents. |
codework.tool.find | Off | Find files by name. |
codework.tool.ls | Off | List a directory. |
codework.tool.toolsearch | Auto | Load deferred tools, which aren’t offered up front. Switches on by itself when a turn has them. |
codework.prompt.default | On | The base system prompt and standing rules. |
codework.prompt.instruction | On | Project instructions from AGENTS.md or CLAUDE.md files in your workspace. |
codework.prompt.skill | On | Lists the skills found in .codework/skills and .agents/skills. |
Turn on the search tools with one entry each:
{
"plugins": [
{ "plugin": "codework.tool.grep", "enabled": true },
{ "plugin": "codework.tool.find", "enabled": true },
],
}The codework. namespace is reserved for built-ins. Third-party plugins use their own vendor prefix, like acme.tool.proc.
Where plugins come from
| Source | Example entry | Notes |
|---|---|---|
| npm registry | @acme/codework-tool-proc@1.2.0 | Exact versions, ranges, and tags all work. |
| git repository | github:acme/codework-tool-proc#v1.2.0 | Branches, tags, and commits. Subdirectories with ::path:. |
| local file | ./plugins/house-style.ts | Loaded in place. TypeScript works with no build step. |
Installed packages live in a shared store under ~/.codework/cache/plugins, so ten projects using the same plugin share one copy. Nothing is written into your project except the settings entry.
FAQ
Do plugins need a build step?
Not for a local file. A plugin loaded by path can be plain TypeScript, because Node strips types outside node_modules. A plugin installed from npm or git must ship compiled JavaScript.
Does CodeWork update plugins automatically?
No. A session only loads what is already installed. Run codework plugin check to see which plugins have newer versions, and codework plugin update to fetch them.
How do I pin a plugin version?
Write an exact version (@acme/codework-tool-proc@1.2.0) or a full commit SHA after # for git. That entry is the pin: there is no separate lockfile. Ranges, tags, and branches move when you run codework plugin update.
Can I turn off a built-in tool?
Yes. Add { "plugin": "codework.tool.bash", "enabled": false } (or any other built-in ID) to the plugins array.
Can a project and my user settings both declare plugins?
Yes. The two lists are combined, user first, so project plugins add to your personal ones instead of replacing them.