Skip to content

Conversation

@chada
Copy link

@chada chada commented Dec 30, 2025

Update all references from 'opencode/skills' to 'opencode/skill' to align with OpenCode Agent Skills documentation (https://opencode.ai/docs/skills)

Changes:

  • .opencode/plugin/superpowers.js: Update project and personal skills dir paths from plural skills to singular skill.
  • docs/README.opencode.md: Update all path references in documentation to reflect the correct directory structure.

This fixes a critical issue where find_skills cannot locate user-defined skills, and users are prevented from applying a workaround by OpenCode core itself.

Motivation and Context

The official OpenCode documentation mandates that user-defined skills reside in .opencode/skill (singular).

The current implementation of superpowers incorrectly searches for a plural skills directory.
Crucially, users cannot manually rename their directory to skills to work around this bug, because OpenCode core strictly enforces the naming convention and throws the following error on startup:

Directory "skills" in /Users/.../.config/opencode is not valid. Rename the directory to "skill" or remove it. This is a common typo.

This creates a deadlock where the plugin expects a directory name that the core application explicitly forbids. This PR resolves this conflict by aligning the plugin with the core specification.

How Has This Been Tested?

I tested this locally on macOS:

  1. Renamed my local config directory to skill (as required by OpenCode core).
  2. Applied the fix to superpowers.js.
  3. Ran use find_skills tool within OpenCode.
  4. Result: The agent successfully located and listed the skills from ~/.config/opencode/skill (global skills) and .opencode/skill (project skills).

Breaking Changes

None.
Previously, it was impossible to use custom skills with this plugin because OpenCode core would reject the skills directory required by the plugin. This change enables the intended functionality.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Summary by CodeRabbit

  • Chores
    • Reorganized skills directory paths: personal skills now at ~/.config/opencode/skill/ and project skills at .opencode/skill/
    • Updated user-facing messages and error text to reference the new singular "skill" paths
  • Documentation
    • Updated README and setup instructions to use the new directory names and creation commands
  • Tests
    • Adjusted test fixtures and checks to verify the new skill directory locations

✏️ Tip: You can customize this high-level summary in your review settings.

Update all references from 'opencode/skills' to 'opencode/skill' to align
with OpenCode Agent Skills documentation (https://opencode.ai/docs/skills)

Changes:
- .opencode/plugin/superpowers.js: Update project and personal skills dir paths
- docs/README.opencode.md: Update all path references in documentation

This fixes the issue where OpenCode rejects the 'skills' directory name
and requires 'skill' (singular) instead.
@coderabbitai
Copy link

coderabbitai bot commented Dec 30, 2025

📝 Walkthrough

Walkthrough

Project and personal "skills" directories were renamed from plural to singular: project .opencode/skills.opencode/skill and personal ~/.config/opencode/skills~/.config/opencode/skill. All code, tests, and documentation references were updated to the new paths.

Changes

Cohort / File(s) Summary
Core plugin
.opencode/plugin/superpowers.js
Changed project/personal skills path references from .opencode/skills / ~/.config/opencode/skills to singular .opencode/skill / ~/.config/opencode/skill; updated user-facing messages and error text.
Documentation
docs/README.opencode.md
Replaced all examples and instructions to use .opencode/skill and ~/.config/opencode/skill; updated mkdir examples, SKILL.md path references, and priority ordering section.
Tests
tests/opencode/setup.sh, tests/opencode/test-plugin-loading.sh, tests/opencode/test-priority.sh
Updated test fixtures and assertions to create and check SKILL.md under .../skill/... instead of .../skills/...; no test logic changes beyond path updates.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hopped from "skills" to a single "skill" with cheer,
Paths trimmed and tidy, the burrow's now clear,
Tests and docs aligned, no more plural frill,
A neat little change — I celebrate with a trill!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically identifies the main change: updating the OpenCode skills directory path from plural to singular form to align with official specification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56ecf42 and e34229b.

📒 Files selected for processing (3)
  • tests/opencode/setup.sh
  • tests/opencode/test-plugin-loading.sh
  • tests/opencode/test-priority.sh
🔇 Additional comments (6)
tests/opencode/test-plugin-loading.sh (1)

73-73: LGTM! Path correctly updated to singular form.

The fixture verification now checks the correct singular path skill/personal-test/SKILL.md, consistent with the OpenCode specification.

tests/opencode/setup.sh (2)

32-33: LGTM! Personal skill fixture updated correctly.

Both directory creation and file writing now use the singular skill/ path, properly aligning with the OpenCode specification.


46-47: LGTM! Project skill fixture updated correctly.

The project-level test fixture now uses .opencode/skill/ (singular), consistent with the specification and the personal skill path updates.

tests/opencode/test-priority.sh (3)

35-36: LGTM! Personal priority fixture updated correctly.

The personal-level priority test skill now uses the singular skill/ path, consistent with the specification.


49-50: LGTM! Project priority fixture updated correctly.

The project-level priority test skill now uses .opencode/skill/ (singular), maintaining consistency with the personal path updates.


75-82: LGTM! Verification checks updated consistently.

Both fixture existence checks now verify the singular skill/ paths for personal (line 75) and project (line 82) skills. Note that the superpowers path at line 68 correctly remains as skills/ (plural) since it references the bundled skills directory within the superpowers package installation, which is distinct from user custom skills.


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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.opencode/plugin/superpowers.js (1)

160-160: Improve error message to mention all skill locations.

The error message references superpowers and project skill directories but omits the personal skills directory (~/.config/opencode/skill/). Consider including all three locations to help users understand their options.

🔎 Suggested improvement
-            return 'No skills found. Install superpowers skills to ~/.config/opencode/superpowers/skills/ or add project skills to .opencode/skill/';
+            return 'No skills found. Install superpowers skills to ~/.config/opencode/superpowers/skills/, add personal skills to ~/.config/opencode/skill/, or add project skills to .opencode/skill/';
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b9e1649 and 56ecf42.

📒 Files selected for processing (2)
  • .opencode/plugin/superpowers.js
  • docs/README.opencode.md
🔇 Additional comments (4)
.opencode/plugin/superpowers.js (1)

44-47: LGTM!

The comment updates correctly reflect the new singular directory paths and provide clear guidance on the skill priority ordering.

docs/README.opencode.md (3)

73-79: LGTM!

Personal skills documentation accurately reflects the new singular directory structure with consistent path references and clear examples.


98-101: LGTM!

Project skills documentation correctly updated with the new singular directory paths and consistent examples.


118-120: LGTM!

The skill priority documentation correctly reflects the new directory structure. Note that the superpowers installation directory correctly remains plural (skills/) as it's distinct from user-created personal and project skill directories.

Update all references from 'opencode/skills' to 'opencode/skill' (singular)
to align with the OpenCode Agent Skills documentation.

Changes:
- .opencode/plugin/superpowers.js: Update project and personal skills dir paths
- docs/README.opencode.md: Update all path references in documentation
- tests/opencode/setup.sh: Update test fixture paths
- tests/opencode/test-plugin-loading.sh: Update fixture verification path
- tests/opencode/test-priority.sh: Update all priority test fixture paths

This fixes the issue where OpenCode rejects the 'skills' directory name
and requires 'skill' (singular) instead.

Reference: https://opencode.ai/docs/skills
@chada
Copy link
Author

chada commented Dec 30, 2025

This PR has 2 commits with the same title because I forgot to check the tests/opencode/ directory to fix related test files when making the initial fix. Please squash when merging if accepted.

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.

1 participant