Skip to content

Commit e30f8a2

Browse files
authored
feat: support targeted agent skill installs
1 parent d2e4ce1 commit e30f8a2

33 files changed

Lines changed: 1245 additions & 106 deletions

AGENTS.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
environment files, or generated vector stores.
99
- Keep public branding centered on `Mimir`. Use JCode Labs and Jean-Baptiste Thery for
1010
package scope, repository ownership, and copyright, not as the product name.
11+
- Use `Mimir Core` only for the technical core package `@jcode.labs/mimir` and developer-facing
12+
package metadata. User-facing product copy remains `Mimir`; companion packages are Mimir add-ons.
1113
- The package is open source under the MIT License unless the user explicitly changes it.
1214
- This package must stay reusable across repositories. Resolve project data from the
1315
caller's working directory or explicit config, not from the package installation path.
@@ -104,8 +106,12 @@ General principles (KISS, DRY, YAGNI, SOLID) as applied in this codebase. Match
104106
- `packages/mimir/skills/mimir-markdown-report/SKILL.md` is the optional bundled Markdown-report
105107
skill.
106108
- `kb setup` must keep generating agent-specific MCP helpers for easy local use:
107-
`.mimir/claude-mcp-server.json` for `claude mcp add-json` and `.mimir/codex-mcp.toml` for Codex
108-
config layers.
109+
`.mimir/claude-mcp-server.json` for `claude mcp add-json`, `.mimir/codex-mcp.toml` for Codex
110+
config layers, `.mimir/kimi-mcp.json` for Kimi, `.mimir/opencode.jsonc` for OpenCode, and
111+
`.mimir/cline-mcp.json` for Cline.
112+
- `kb install-agent` owns native skill discovery for the main supported coding agents. Keep
113+
`--agents claude|codex|kimi|opencode|cline` targeted so a user can install only the agent they use,
114+
with project scope by default and user scope available through `--scope user`.
109115
- `packages/mimir/examples/sovereign-rag-demo` is the tracked synthetic test workspace for manual
110116
and package validation.
111117
- `.kb/`, `.mimir/`, and project `private/` folders are local user data or generated agent

README.md

Lines changed: 73 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ installed in any Node.js repository. It indexes local files from the target repo
1212
vectors locally with LanceDB, and can use either built-in local-hash retrieval or optional
1313
Transformers.js semantic embeddings.
1414

15-
Mimir core returns cited retrieval context. Answer synthesis belongs to the AI agent, LLM, or local
15+
Mimir Core returns cited retrieval context. Answer synthesis belongs to the AI agent, LLM, or local
1616
model runtime you choose around it.
1717

1818
Created by Jean-Baptiste Thery and published under the JCode Labs npm scope.
@@ -25,8 +25,8 @@ This root README is the canonical product documentation for the public npm packa
2525

2626
| Package | Role |
2727
| --- | --- |
28-
| `@jcode.labs/mimir` | Core CLI, library, MCP server, bundled agent skills, and synthetic examples. |
29-
| `@jcode.labs/mimir-tts` | Plug-and-play Edge-quality MP3 and offline Transformers.js WAV renderer used by `kb audio`. |
28+
| `@jcode.labs/mimir` | Mimir Core: CLI, library, MCP server, bundled agent skills, and synthetic examples. |
29+
| `@jcode.labs/mimir-tts` | Mimir add-on for Edge-quality MP3 and offline Transformers.js WAV rendering through `kb audio`. |
3030

3131
The package README files are intentionally short because npm displays each package README
3232
separately. They point npm readers back to this GitHub documentation.
@@ -150,7 +150,11 @@ private/ # raw documents to ingest
150150
.mimir/skills/mimir-markdown-report/SKILL.md
151151
.mimir/mcp.json # generic MCP server config snippet
152152
.mimir/claude-mcp-server.json # Claude Code add-json payload
153-
.mimir/codex-mcp.toml # Codex config.toml snippet
153+
.mimir/codex-mcp.toml # Codex config.toml snippet with MCP and skills.config
154+
.mimir/kimi-mcp.json # Kimi Code CLI MCP config
155+
.mimir/opencode.jsonc # OpenCode config snippet
156+
.mimir/cline-mcp.json # Cline MCP config
157+
.mimir/agent-setup.md # agent-specific setup guide
154158
.gitignore # ignores private/**, .kb/, and .mimir/
155159
```
156160

@@ -303,6 +307,10 @@ This creates:
303307
.mimir/mcp.json
304308
.mimir/claude-mcp-server.json
305309
.mimir/codex-mcp.toml
310+
.mimir/kimi-mcp.json
311+
.mimir/opencode.jsonc
312+
.mimir/cline-mcp.json
313+
.mimir/agent-setup.md
306314
.mimir/README.md
307315
```
308316

@@ -312,6 +320,25 @@ Agents that support skill folders can load `.mimir/skills/mimir/` for deep local
312320
audit memo, or planning note. Other agents can read the generated `.mimir/README.md` and use the MCP
313321
config snippet.
314322

323+
For native discovery in a specific agent, install only the agent you use:
324+
325+
```bash
326+
pnpm exec kb install-agent --agents claude
327+
pnpm exec kb install-agent --agents kimi
328+
pnpm exec kb install-agent --agents claude,codex,kimi,opencode,cline
329+
```
330+
331+
By default, `install-agent` writes project-scope skill folders. Add `--scope user` for global
332+
installations.
333+
334+
| Agent | Project skill directory | Main MCP helper |
335+
| --- | --- | --- |
336+
| Claude Code | `.claude/skills/` | `.mimir/claude-mcp-server.json` |
337+
| Codex | `.codex/skills/` plus `skills.config` | `.mimir/codex-mcp.toml` |
338+
| Kimi Code CLI | `.kimi/skills/` | `.mimir/kimi-mcp.json` |
339+
| OpenCode | `.opencode/skills/` | `.mimir/opencode.jsonc` |
340+
| Cline | `.cline/skills/` | `.mimir/cline-mcp.json` |
341+
315342
Start the MCP server from the repository root:
316343

317344
```bash
@@ -336,6 +363,7 @@ From the target repository root:
336363

337364
```bash
338365
pnpm exec kb setup
366+
pnpm exec kb install-agent --agents claude
339367
claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)"
340368
```
341369

@@ -350,11 +378,51 @@ From the target repository root:
350378

351379
```bash
352380
pnpm exec kb setup
381+
pnpm exec kb install-agent --agents codex
353382
cat .mimir/codex-mcp.toml
354383
```
355384

356385
Copy the printed TOML into `~/.codex/config.toml` or another trusted Codex config layer. The snippet
357-
contains the repository `cwd`, so Codex can launch the Mimir MCP server from the right project.
386+
contains the repository `cwd`, the Mimir MCP server, and `skills.config` entries for the bundled
387+
skills.
388+
389+
### Kimi Code CLI
390+
391+
From the target repository root:
392+
393+
```bash
394+
pnpm exec kb setup
395+
pnpm exec kb install-agent --agents kimi
396+
kimi --mcp-config-file .mimir/kimi-mcp.json
397+
```
398+
399+
Kimi can discover project skills from `.kimi/skills/`. The MCP config can also be installed in
400+
Kimi's global MCP file if you intentionally want a global setup.
401+
402+
### OpenCode
403+
404+
From the target repository root:
405+
406+
```bash
407+
pnpm exec kb setup
408+
pnpm exec kb install-agent --agents opencode
409+
cat .mimir/opencode.jsonc
410+
```
411+
412+
Copy or merge the generated snippet into the OpenCode config layer you use for the project.
413+
414+
### Cline
415+
416+
From the target repository root:
417+
418+
```bash
419+
pnpm exec kb setup
420+
pnpm exec kb install-agent --agents cline
421+
cat .mimir/cline-mcp.json
422+
```
423+
424+
Cline can discover project skills from `.cline/skills/`. Add the generated MCP JSON under
425+
`mcpServers` in Cline's MCP configuration when tool access is needed.
358426

359427
For other MCP clients that cannot set `cwd`, set `MIMIR_PROJECT_ROOT=/absolute/path/to/repository`
360428
when launching `kb serve-mcp`.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "jcode-mimir",
3-
"version": "0.4.8",
3+
"version": "0.4.9",
44
"private": true,
5-
"description": "Monorepo for the Mimir open-source local RAG packages.",
5+
"description": "Monorepo for Mimir Core and open-source Mimir add-ons.",
66
"type": "module",
77
"license": "MIT",
88
"packageManager": "pnpm@11.9.0",

packages/mimir-tts/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Mimir TTS Package
1+
# Mimir TTS Add-On
22

3-
`@jcode.labs/mimir-tts` is the standalone text-to-speech package used by Mimir audio summaries.
3+
`@jcode.labs/mimir-tts` is the standalone text-to-speech add-on used by Mimir audio summaries.
44
It gives Mimir a plug-and-play narration renderer without making audio generation part of the core
55
RAG pipeline.
66

packages/mimir-tts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@jcode.labs/mimir-tts",
3-
"version": "0.4.8",
4-
"description": "Plug-and-play Edge-quality and offline text-to-speech for Mimir audio summaries.",
3+
"version": "0.4.9",
4+
"description": "Mimir add-on for plug-and-play Edge-quality and offline text-to-speech audio summaries.",
55
"type": "module",
66
"license": "MIT",
77
"author": {

packages/mimir/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Mimir Core Package
22

3-
`@jcode.labs/mimir` is the core package for Mimir, an open-source sovereign local RAG toolkit for
3+
`@jcode.labs/mimir` is Mimir Core, the technical core package for Mimir, an open-source sovereign local RAG toolkit for
44
confidential datasets and AI agents.
55

66
**Full documentation:** https://github.com/jcode-works/jcode-mimir#readme
@@ -59,9 +59,10 @@ Run `pnpm exec kb doctor --fix` later to repair missing setup or rebuild stale i
5959

6060
## Claude Code And Codex
6161

62-
After `pnpm exec kb setup`, use `.mimir/claude-mcp-server.json` with `claude mcp add-json`, or copy
63-
`.mimir/codex-mcp.toml` into a trusted Codex config layer. See the canonical GitHub README for the
64-
full agent demo.
62+
After `pnpm exec kb setup`, use `pnpm exec kb install-agent --agents claude`, `--agents kimi`, or a
63+
comma-separated list for native agent skill discovery. Mimir Core also generates MCP helpers for
64+
Claude Code, Codex, Kimi, OpenCode, and Cline under `.mimir/`. See the canonical GitHub README for
65+
the full agent demo.
6566

6667
## License
6768

packages/mimir/dist/cli.js

Lines changed: 51 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mimir/dist/cli.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mimir/dist/doctor.js

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)