Skip to content

feat: add MiniMax Code skills support#1214

Open
showms wants to merge 2 commits into
Fission-AI:mainfrom
showms:codex/add-minimax-code-tool-support
Open

feat: add MiniMax Code skills support#1214
showms wants to merge 2 commits into
Fission-AI:mainfrom
showms:codex/add-minimax-code-tool-support

Conversation

@showms

@showms showms commented Jun 15, 2026

Copy link
Copy Markdown

Summary

Adds MiniMax Code as a supported OpenSpec tool target.

This integration treats MiniMax Code as a global skills-based tool. OpenSpec now installs and refreshes MiniMax Code skills under the user-home MiniMax skills directory:

~/.minimax/skills

The tool metadata uses globalSkillsDir: '.minimax', and the shared skill path resolver appends the standard /skills suffix, matching the shape of existing skillsDir tool metadata.

Changes

  • Add minimax-code to supported AI tools
  • Add shared skill path resolution for project-local and user-home global skill targets
  • Detect MiniMax Code from OpenSpec-managed skills in ~/.minimax/skills
  • Support MiniMax Code in openspec init, openspec update, and workspace skill setup/update
  • Preserve existing global MiniMax Code skills when delivery is commands
  • Avoid creating repo-local .minimax or .mavis fallback directories
  • Update docs for CLI usage, supported tools, and MiniMax Code skill invocation
  • Add tests for detection, init/update behavior, workspace skills, and path resolution

Verification

  • pnpm run build
  • pnpm test

Full test suite passes:

  • 90 test files passed
  • 1668 tests passed

Summary by CodeRabbit

  • New Features

    • Added MiniMax Code (minimax-code) as a supported OpenSpec tool for openspec init --tools.
    • MiniMax Code now installs/refreshes skills only in the user-home global directory (~/.minimax/skills), skipping command generation.
    • Commands-only delivery preserves existing global MiniMax Code skills (no workspace-local .minimax/.mavis fallback creation or deletion).
  • Documentation

    • Updated CLI, command syntax, and supported-tools docs to reflect global skills behavior and workspace setup/update semantics.
  • Tests

    • Added/expanded coverage for global-skill detection, update/workspace behavior, commands-only preservation, and cross-platform home directory handling.

@showms showms requested a review from TabishB as a code owner June 15, 2026 10:02
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c09c481a-b15c-448b-bbbf-fe7fad684110

📥 Commits

Reviewing files that changed from the base of the PR and between eb444bd and 4746cee.

📒 Files selected for processing (4)
  • src/core/init.ts
  • test/core/init.test.ts
  • test/core/shared/skill-paths.test.ts
  • test/core/workspace/skills.test.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • test/core/workspace/skills.test.ts
  • src/core/init.ts
  • test/core/init.test.ts
  • test/core/shared/skill-paths.test.ts

📝 Walkthrough

Walkthrough

Adds MiniMax Code as a skills-only AI tool integration with global user-home skill storage. A new globalSkillsDir field is added to AIToolOption and a shared skill-paths module is introduced with SkillCapableTool, toolSupportsSkills, hasGlobalSkillTarget, and resolveToolSkillsDir. These helpers are wired through init, update, migration, profile-drift detection, and workspace skill commands. Skills are written to ~/.minimax/skills with no repo-local fallback and no command adapter generation.

Changes

MiniMax Code Global-Skills Integration

Layer / File(s) Summary
Design, proposal, and specs
openspec/changes/add-minimax-code-tool-support/.openspec.yaml, openspec/changes/add-minimax-code-tool-support/design.md, openspec/changes/add-minimax-code-tool-support/proposal.md, openspec/changes/add-minimax-code-tool-support/tasks.md, openspec/changes/add-minimax-code-tool-support/specs/ai-tool-paths/spec.md, openspec/changes/add-minimax-code-tool-support/specs/cli-init/spec.md, openspec/changes/add-minimax-code-tool-support/specs/cli-update/spec.md, openspec/changes/add-minimax-code-tool-support/specs/workspace-links/spec.md
Adds full design, proposal, tasks, and per-area requirement specs defining globalSkillsDir metadata, AIToolOption extensions, and behavioral requirements for init, update, workspace, and drift detection.
AIToolOption config and shared skill-paths module
src/core/config.ts, src/core/shared/skill-paths.ts, src/core/shared/index.ts
Adds globalSkillsDir to AIToolOption, registers MiniMax Code in AI_TOOLS, and creates skill-paths.ts with SkillCapableTool, toolSupportsSkills, hasGlobalSkillTarget, and resolveToolSkillsDir (resolves home-based vs project-local paths), re-exported from shared/index.ts.
Tool detection and available-tools
src/cli/index.ts, src/core/shared/tool-detection.ts, src/core/available-tools.ts
Updates getToolsWithSkillsDir, getToolSkillStatus, getToolVersionStatus, getConfiguredTools, and getAvailableTools to use shared helpers instead of direct skillsDir property access; adds global-home SKILL.md existence check for globalSkillsDir tools.
InitCommand: ValidatedInitTool and global-skill wiring
src/core/init.ts
Introduces ValidatedInitTool with skillsPath and isGlobalSkillTarget; validateTools receives projectPath and uses shared helpers; skill-dir removal is gated on !isGlobalSkillTarget; success display uses skillsPath.
Update, migration, and profile-drift wiring
src/core/update.ts, src/core/migration.ts, src/core/profile-sync-drift.ts
Update loop, legacy-upgrade path, workflow scanning, and drift detection all switch from tool.skillsDir to shared helpers; global-target tools are excluded from command-file scans and skill-dir removal.
Workspace skills: global-target detection and managed-dir removal
src/core/workspace/skills.ts
Redefines WorkspaceSkillCapableTool as SkillCapableTool; updates path resolution to use resolveToolSkillsDir; rewrites isOpenSpecManagedSkillDir to treat openspec-* dirs as managed for global-target tools without needing SKILL.md metadata.
Test helper and env isolation
test/helpers/temp-dir.ts, test/commands/context-store.test.ts, test/commands/config-profile.test.ts, test/commands/workspace.test.ts, test/core/context-store/registry.test.ts, test/core/profile-sync-drift.test.ts, test/core/shared/tool-detection.test.ts, test/core/update.test.ts
Adds mkdtempOutsideGit helper; updates test suites to inject HOME/USERPROFILE in beforeEach and restore env in afterEach for isolation.
Feature tests: skill-paths, init, detection, workspace
test/core/shared/skill-paths.test.ts, test/core/init.test.ts, test/core/available-tools.test.ts, test/core/shared/tool-detection.test.ts, test/core/update.test.ts, test/core/workspace/skills.test.ts
Adds tests for resolveToolSkillsDir, MiniMax Code init/update global-target writes, commands-only preservation, local-dir non-creation, workspace generate/update flows, and detection from global vs repo-local paths.
Documentation
docs/cli.md, docs/commands.md, docs/supported-tools.md
Documents MiniMax Code global ~/.minimax/skills/ target in CLI reference, command-syntax guide, and supported-tools table; removes lingma from --tools list.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

Possibly related PRs

  • Fission-AI/OpenSpec#736: Modifies the same src/core/profile-sync-drift.ts and src/core/update.ts delivery-mode logic that this PR extends for global-skill target handling.
  • Fission-AI/OpenSpec#941: Also adds a new skill-based tool to AI_TOOLS in src/core/config.ts and docs/supported-tools.md, using the same tool-registration and detection surface.
  • Fission-AI/OpenSpec#1003: Both PRs extend OpenSpec's skills-only (adapterless command generation) tool integration with new tools in AI_TOOLS and corresponding init/update/workspace behavior changes.

Suggested reviewers

  • alfred-openspec

🐰 A rabbit hops to ~/.minimax/skills/
No repo-local dirs, just a home that thrills!
resolveToolSkillsDir picks the right path,
Global skills written, avoiding the wrath
Of leftover commands — the adapter's not there,
So MiniMax Code floats free in the air! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 27.59% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add MiniMax Code skills support' directly and accurately summarizes the main change—adding MiniMax Code as a supported OpenSpec tool with global skills support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/core/init.ts (1)

667-676: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Success output reports command location incorrectly.

The summary prints command counts using tool.skillsPath, which can state commands are in the skills directory (not true for adapter-based tools) and is especially misleading for minimax-code where commands are skipped.

Proposed adjustment
-      if (skillCount > 0 && commandCount > 0) {
-        console.log(`${skillCount} skills and ${commandCount} commands in ${toolDirs}/`);
-      } else if (skillCount > 0) {
+      if (skillCount > 0) {
         console.log(`${skillCount} skills in ${toolDirs}/`);
-      } else if (commandCount > 0) {
-        console.log(`${commandCount} commands in ${toolDirs}/`);
+      }
+
+      const generatedCommandTools = successfulTools.filter(
+        (t) => !results.commandsSkipped.includes(t.value) && CommandAdapterRegistry.get(t.value)
+      );
+      if (commandCount > 0 && generatedCommandTools.length > 0) {
+        console.log(
+          `${commandCount} commands generated for ${generatedCommandTools
+            .map((t) => t.name)
+            .join(', ')}`
+        );
       }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/core/init.ts` around lines 667 - 676, The output message uses toolDirs
(constructed from successfulTools.map((t) => t.skillsPath)) to report the
location of both skills and commands, but commands are not necessarily stored in
the skills directory. To fix this, build a separate set of directories
specifically for commands from the appropriate command path property (not
skillsPath), and use toolDirs only when reporting skills, and commandDirs only
when reporting commands. This ensures the output accurately reflects where each
artifact type is actually located.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/core/shared/skill-paths.test.ts`:
- Line 23: The test assertions in the resolveToolSkillsDir test are using
hard-coded POSIX path separators (forward slashes like /repo/app/.claude/skills)
which will fail on Windows systems. Replace all hard-coded path strings in the
expect assertions with path.join() to construct the expected paths
programmatically, ensuring the tests work across all operating systems.
Specifically, replace `/repo/app/.claude/skills` with path.join('/repo/app',
'.claude', 'skills') and apply the same pattern to other similar hard-coded
paths in related assertions.

In `@test/core/workspace/skills.test.ts`:
- Around line 59-81: The test hard-codes a POSIX path string in the expect
assertion, making it platform-sensitive and missing Windows path separator
coverage. In the test for getWorkspaceSkillDirectory function with
'minimax-code', replace the hard-coded string '/home/alex/.minimax/skills' in
the expect call with a dynamic path constructed using path.join() from the
component parts (the HOME directory and the relative path segments), so the
assertion automatically uses the correct path separators for the platform being
tested.

---

Outside diff comments:
In `@src/core/init.ts`:
- Around line 667-676: The output message uses toolDirs (constructed from
successfulTools.map((t) => t.skillsPath)) to report the location of both skills
and commands, but commands are not necessarily stored in the skills directory.
To fix this, build a separate set of directories specifically for commands from
the appropriate command path property (not skillsPath), and use toolDirs only
when reporting skills, and commandDirs only when reporting commands. This
ensures the output accurately reflects where each artifact type is actually
located.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6fb29e29-71d7-4cd0-bb4d-7c51a2d3994d

📥 Commits

Reviewing files that changed from the base of the PR and between 1b06fdd and b0faef8.

📒 Files selected for processing (34)
  • docs/cli.md
  • docs/commands.md
  • docs/supported-tools.md
  • openspec/changes/add-minimax-code-tool-support/.openspec.yaml
  • openspec/changes/add-minimax-code-tool-support/design.md
  • openspec/changes/add-minimax-code-tool-support/proposal.md
  • openspec/changes/add-minimax-code-tool-support/specs/ai-tool-paths/spec.md
  • openspec/changes/add-minimax-code-tool-support/specs/cli-init/spec.md
  • openspec/changes/add-minimax-code-tool-support/specs/cli-update/spec.md
  • openspec/changes/add-minimax-code-tool-support/specs/workspace-links/spec.md
  • openspec/changes/add-minimax-code-tool-support/tasks.md
  • src/cli/index.ts
  • src/core/available-tools.ts
  • src/core/config.ts
  • src/core/init.ts
  • src/core/migration.ts
  • src/core/profile-sync-drift.ts
  • src/core/shared/index.ts
  • src/core/shared/skill-paths.ts
  • src/core/shared/tool-detection.ts
  • src/core/update.ts
  • src/core/workspace/skills.ts
  • test/commands/config-profile.test.ts
  • test/commands/context-store.test.ts
  • test/commands/workspace.test.ts
  • test/core/available-tools.test.ts
  • test/core/context-store/registry.test.ts
  • test/core/init.test.ts
  • test/core/profile-sync-drift.test.ts
  • test/core/shared/skill-paths.test.ts
  • test/core/shared/tool-detection.test.ts
  • test/core/update.test.ts
  • test/core/workspace/skills.test.ts
  • test/helpers/temp-dir.ts

Comment thread test/core/shared/skill-paths.test.ts Outdated
Comment thread test/core/workspace/skills.test.ts

@alfred-openspec alfred-openspec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the thorough MiniMax integration. The global skill resolver shape and test coverage are directionally good, but I found one user-facing correctness issue that should be fixed before merge.

src/core/init.ts now builds toolDirs from successfulTools.map((t) => t.skillsPath) and uses that same value for both skills and commands in the setup summary. That is wrong for adapter-backed tools because commands are generated under command-specific directories, not the skills directory, and it is especially misleading for minimax-code because command generation is skipped entirely. With delivery: both, openspec init --tools minimax-code can report something like N skills and M commands in ~/.minimax/skills/ and only later say commands were skipped. Please split the success summary so skill counts use skill paths and command counts only include tools with a command adapter and their actual command output locations, or omit the command location/count when every selected tool skipped commands.

The other broad pieces I checked look sane: resolveToolSkillsDir() consistently targets home-backed ~/.minimax/skills, update/drift/detection paths now use shared skill-capable helpers, and the workspace skill tests cover preserving global MiniMax skills during commands-only delivery. The path-separator nits in tests are worth cleaning up too, but this summary output bug is the blocking bit because it tells users OpenSpec generated artifacts that do not exist.

@showms showms force-pushed the codex/add-minimax-code-tool-support branch from eb444bd to 4746cee Compare June 15, 2026 13:44
@showms

showms commented Jun 15, 2026

Copy link
Copy Markdown
Author

@alfred-openspec Thanks for the review. I pushed a follow-up update that splits the init summary for skills and commands.

  • Skill counts now report only skill target directories.
  • Command counts only include tools with a command adapter and report the adapter’s actual output directories.
  • Adapterless tools like minimax-code no longer report command output locations; they only show the skipped-commands message.
  • Also cleaned up the path-separator-sensitive test assertions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants