Skip to content

feat(skills): add list command to show oo-managed skills#44

Merged
BlackHole1 merged 2 commits into
mainfrom
add-list-skills
Mar 30, 2026
Merged

feat(skills): add list command to show oo-managed skills#44
BlackHole1 merged 2 commits into
mainfrom
add-list-skills

Conversation

@BlackHole1
Copy link
Copy Markdown
Member

Introduce oo skills list which scans the local Codex skills directory for child directories containing .oo-metadata.json and prints a summary with skill name, source package (or bundled marker), and recorded version. The oo skill is always listed first; remaining skills are sorted alphabetically.

Includes unit tests for the listing/sorting logic, CLI integration tests for text and color output, and bilingual documentation.

Introduce `oo skills list` which scans the local Codex skills directory
for child directories containing `.oo-metadata.json` and prints a
summary with skill name, source package (or bundled marker), and
recorded version. The `oo` skill is always listed first; remaining
skills are sorted alphabetically.

Includes unit tests for the listing/sorting logic, CLI integration
tests for text and color output, and bilingual documentation.

Signed-off-by: Kevin Cui <bh@bugs.cc>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 30, 2026

Warning

Rate limit exceeded

@BlackHole1 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 17 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 12 minutes and 17 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8d1f0659-2007-4057-9da4-191ea2ccacc6

📥 Commits

Reviewing files that changed from the base of the PR and between d306650 and d6d32e7.

📒 Files selected for processing (2)
  • src/application/commands/skills/list.cli.test.ts
  • src/application/commands/skills/list.ts

Walkthrough

This PR introduces a new oo skills list subcommand that enumerates installed managed skills stored under the Codex home directory's skills/ folder. The implementation includes the command module with directory scanning and metadata-based filtering, multiple test suites covering both unit and CLI integration scenarios, documentation updates in English and Chinese, internationalization string additions, and integration of the new subcommand into the skills command hierarchy.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

Suggested labels

codex

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title follows the required format and accurately describes the main change: adding a list command to the skills feature.
Description check ✅ Passed The pull request description is directly related to the changeset, providing clear details about the new oo skills list command functionality, behavior, and included tests/documentation.

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


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.

Why: GitHub Actions failed the PR because the skills list command\nused a chained terminal color helper shape that this codebase's\nTerminalFormatter type does not expose.\n\nWhat: Replace the chained hex-plus-bold calls in the command and\nits CLI color test with the supported nested formatter form.\n\nHow: Wrap the hex-colored text with the top-level bold formatter so\nthe output stays the same while remaining type-safe in CI.
Copy link
Copy Markdown

@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)
src/application/commands/skills/list.cli.test.ts (1)

25-27: Assert install setup success before continuing the test.

At Line [25], the precondition step (skills install) is not asserted. If setup fails, later assertions become noisy and less actionable.

♻️ Suggested test hardening
-            await sandbox.run(["skills", "install"], {
+            const installResult = await sandbox.run(["skills", "install"], {
                 version: "9.9.9",
             });
+            expect(installResult.exitCode).toBe(0);
+            expect(installResult.stderr).toBe("");
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/application/commands/skills/list.cli.test.ts` around lines 25 - 27, The
test calls sandbox.run(["skills", "install"], { version: "9.9.9" }) but does not
assert the install succeeded; capture the result of sandbox.run and assert
success (e.g., check result.exitCode === 0 or that stderr is empty / stdout
contains a success message) before proceeding so failures in the setup step fail
fast; update the test around the sandbox.run call to store its return value and
add an assertion using the test framework's expect/assert helpers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/application/commands/skills/list.ts`:
- Line 145: Replace the invalid formatter chaining on colors.hex at the skill
rendering: colors.hex(managedSkillNameColor).bold(skill.name) is calling .bold()
on a TerminalFormatter function which doesn't exist; instead invoke the
formatter function with the value: use
colors.hex(managedSkillNameColor)(skill.name). Update the occurrence in the list
rendering (the line referencing managedSkillNameColor and skill.name) to call
the formatter rather than chaining .bold().

---

Nitpick comments:
In `@src/application/commands/skills/list.cli.test.ts`:
- Around line 25-27: The test calls sandbox.run(["skills", "install"], {
version: "9.9.9" }) but does not assert the install succeeded; capture the
result of sandbox.run and assert success (e.g., check result.exitCode === 0 or
that stderr is empty / stdout contains a success message) before proceeding so
failures in the setup step fail fast; update the test around the sandbox.run
call to store its return value and add an assertion using the test framework's
expect/assert helpers.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 233fc322-cdd6-4ddb-981d-89b9cb94f8ab

📥 Commits

Reviewing files that changed from the base of the PR and between 3dfc1c8 and d306650.

📒 Files selected for processing (7)
  • docs/commands.md
  • docs/commands.zh-CN.md
  • src/application/commands/skills/index.ts
  • src/application/commands/skills/list.cli.test.ts
  • src/application/commands/skills/list.test.ts
  • src/application/commands/skills/list.ts
  • src/i18n/catalog.ts

Comment thread src/application/commands/skills/list.ts Outdated
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