Skip to content

feat: add Codex skill install guidance#815

Open
zzzhangy wants to merge 1 commit into
kucherenko:masterfrom
zzzhangy:feat/codex-skill-install-docs
Open

feat: add Codex skill install guidance#815
zzzhangy wants to merge 1 commit into
kucherenko:masterfrom
zzzhangy:feat/codex-skill-install-docs

Conversation

@zzzhangy

@zzzhangy zzzhangy commented Jun 12, 2026

Copy link
Copy Markdown
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Feature / docs update.

Closes #800.

  • What is the current behavior? (You can also link to an open issue here)

The AI skill documentation lists generic npx skills add commands, and the CLI tip points to npx skills add kucherenko/jscpd without naming the refactoring skill. Users looking for Codex support have to infer that the existing agent skills can be installed for Codex via the skills CLI.

  • What is the new behavior (if this is a feature change)?
  • Documents an explicit Codex install command for both bundled skills:
    npx skills add kucherenko/jscpd --skill jscpd --skill dry-refactoring --agent codex
  • Notes where --global installs the skills for Codex.
  • Updates the CLI tip to show the exact dry-refactoring skill install command.
  • Adds tests for the default skill tip and --noTips suppression.
  • Other information:

Validation run locally:

  • npx skills add . --list
  • pnpm --filter jscpd test -- __tests__/options.test.ts -t tips
  • pnpm --filter jscpd typecheck
  • pnpm build
  • git diff --check HEAD

This change is Reviewable

Summary by CodeRabbit

  • Documentation

    • Updated installation guidance for agent skills with explicit --global flag examples for user-level installation.
    • Clarified snippet checking mechanisms and request isolation behavior.
  • New Features

    • Introduced helpful tips guiding users to install auto-refactor skills with the Codex agent.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR adds Codex agent support by introducing a reusable dry-refactoring skill installation command, testing CLI tip output, and documenting installation for both jscpd and dry-refactoring skills targeting Codex's user skills directory.

Changes

Codex Agent Skill Support

Layer / File(s) Summary
Skill install command constant and tip integration
apps/jscpd/src/index.ts
New DRY_REFACTORING_SKILL_INSTALL_COMMAND constant holds the npx skills add command; the auto-refactor tip message is updated to use this constant instead of hard-coded text.
Tip display and --noTips flag validation
apps/jscpd/__tests__/options.test.ts
Test suite imports grey color and adds new tips describe block validating that the dry-refactoring install command appears in default CLI output and is suppressed when --noTips flag is provided.
User-facing Codex installation and MCP docs
apps/jscpd/README.md, docs/ai-ready.md
README documents how to install both jscpd and dry-refactoring skills for Codex with --global flag for user directory placement; AI-ready guide adds Codex subsection and clarifies MCP snippet-checking uses ephemeral per-request in-memory store for isolation and concurrency safety.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A Codex comes to town today,
With skills to dry-refactor away,
Tips and tests and docs so clear,
The garden grows throughout the year! 🌱

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: add Codex skill install guidance' directly and accurately reflects the main changes, which add Codex installation guidance and tests to the codebase.
Linked Issues check ✅ Passed The PR successfully addresses issue #800 by adding explicit Codex support to JSCPD skills, including installation commands, documentation, and tests verifying the skill tip functionality.
Out of Scope Changes check ✅ Passed All changes directly support the objective of adding Codex skill install guidance: documentation updates, test coverage for the tips feature, and CLI tip constant extraction are all in-scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@apps/jscpd/README.md`:
- Around line 632-640: Update the Codex install example so it's self-contained
by including the --global variant in the command snippet itself and matching the
surrounding explanatory sentence; specifically modify the command shown (`npx
skills add kucherenko/jscpd --skill jscpd --skill dry-refactoring --agent
codex`) to also show the global form (`npx skills add ... --agent codex
--global`) and adjust the adjacent text so both the inline example and the
explanatory line consistently state that adding --global installs to Codex's
user skills directory (~/.codex/skills/) while omitting it installs to the
project's .agents/skills/ directory.
🪄 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: 11a33773-dcef-4b20-b6bf-d780fdfcd439

📥 Commits

Reviewing files that changed from the base of the PR and between 53cbf7b and 6d5730a.

📒 Files selected for processing (4)
  • apps/jscpd/README.md
  • apps/jscpd/__tests__/options.test.ts
  • apps/jscpd/src/index.ts
  • docs/ai-ready.md

Comment thread apps/jscpd/README.md
Comment on lines +632 to +640
To install both skills for Codex explicitly:

```bash
npx skills add kucherenko/jscpd --skill jscpd --skill dry-refactoring --agent codex
```

Add `--global` to install into Codex's user skills directory
(`~/.codex/skills/`) instead of the current project's `.agents/skills/`
directory.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Make the Codex install example self-contained. The new Codex section says the command is the explicit install, but --global is only mentioned afterward. As written, copy-paste users can miss the Codex user-directory install the surrounding text is describing.

Suggested edit
-npx skills add kucherenko/jscpd --skill jscpd --skill dry-refactoring --agent codex
+npx skills add kucherenko/jscpd --skill jscpd --skill dry-refactoring --agent codex --global

Apply the same wording in both docs.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
To install both skills for Codex explicitly:
```bash
npx skills add kucherenko/jscpd --skill jscpd --skill dry-refactoring --agent codex
```
Add `--global` to install into Codex's user skills directory
(`~/.codex/skills/`) instead of the current project's `.agents/skills/`
directory.
To install both skills for Codex explicitly:
🤖 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 `@apps/jscpd/README.md` around lines 632 - 640, Update the Codex install
example so it's self-contained by including the --global variant in the command
snippet itself and matching the surrounding explanatory sentence; specifically
modify the command shown (`npx skills add kucherenko/jscpd --skill jscpd --skill
dry-refactoring --agent codex`) to also show the global form (`npx skills add
... --agent codex --global`) and adjust the adjacent text so both the inline
example and the explanatory line consistently state that adding --global
installs to Codex's user skills directory (~/.codex/skills/) while omitting it
installs to the project's .agents/skills/ directory.

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.

Add support for Codex for Skill install

1 participant