Skip to content

feat: add skills module updating project and global scopes - #16

Merged
amanthanvi merged 2 commits into
mainfrom
t3code/add-skill-update-support
Aug 22, 2026
Merged

amanthanvi merged 2 commits into
mainfrom
t3code/add-skill-update-support

Conversation

@amanthanvi

@amanthanvi amanthanvi commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a default-on skills module that updates agent skills installed on the machine — both project-level and global scopes — matching npx skills update's interactive Both option without prompting.

How it works

  • The skills CLI resolves scope to both when both --project and --global are passed (verified in vercel-labs/skills resolveUpdateScope), so the module runs skills update --project --global with no prompt.
  • Backing-command resolution: direct skills on PATH first, then npx --yes skills fallback; neither present → graceful skip in default runs, hard error under --only skills.
  • -n/--non-interactive appends --yes so the CLI's upstream-deletion prompts are skipped gracefully.
  • Dry-run prints the resolved command (DRY RUN: npx --yes skills update --project --global) and executes nothing.

Changes

  • updates: registry entry (between pi and mise) + module_skills / skills_update_argv.
  • updates-main.ps1: registry entry + Invoke-ModuleSkills (same resolution order and flags).
  • Tests: Bash stub coverage for success, npx fallback, non-interactive flag, dry-run purity, and skip/error semantics; native Windows test for success, missing dependency, and npx fallback.
  • Docs: SPEC module matrix/order/new §8.15, README module list/matrix/prereqs, CHANGELOG Unreleased, PLAN.

Validation

  • ./scripts/lint.sh
  • ./scripts/test.sh ✅ (Bash suite incl. 6 new skills cases + release guards)
  • PowerShell payload + native test files parse cleanly under pwsh
  • End-to-end dry run on macOS: resolves npx fallback, prints both-scope command

Summary by Sourcery

Add a cross-platform skills updater that refreshes project and global agent skills without prompting.

New Features:

  • Add a default-on skills module for updating agent skills across project and global scopes on Bash and native Windows.
  • Support direct skills CLI execution with an npx --yes skills fallback, including non-interactive and dry-run behavior.

Enhancements:

  • Register the skills module in the execution order and platform capability matrix.

Documentation:

  • Document the skills module, prerequisites, scope behavior, and platform support in the README and specification.
  • Record the new module in the unreleased changelog and project plan.

Tests:

  • Add Bash and native Windows coverage for successful updates, npx fallback, missing dependencies, non-interactive execution, and dry-run behavior.

Copilot AI lite review requested due to automatic review settings August 22, 2026 05:01

@sourcery-ai sourcery-ai 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.

Sorry @amanthanvi, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Warning

Your free Security trial is over. An organization admin can activate billing to continue.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5e6a2109-e699-476b-872d-18694d0c1171


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.

@sourcery-ai

sourcery-ai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a default-on skills update module on Bash and native Windows that updates agent skills in both project and global scopes via skills update --project --global, resolving the backing command as skills on PATH or falling back to npx --yes skills, with proper non-interactive, dry-run, skip, and error semantics plus tests and docs/spec updates.

Sequence diagram for skills update command resolution

sequenceDiagram
    participant Updates
    participant SkillsCLI
    participant Npx

    Updates->>SkillsCLI: Resolve-ApplicationCommand skills
    alt skills CLI is available
        Updates->>SkillsCLI: skills update --project --global
        SkillsCLI-->>Updates: ExitCode
    else skills CLI is unavailable
        Updates->>Npx: Resolve-ApplicationCommand npx
        alt npx is available
            Updates->>Npx: npx --yes skills update --project --global
            Npx-->>Updates: ExitCode
        else neither command is available
            Updates->>Updates: Resolve-MissingDependency
        end
    end
Loading

Flow diagram for skills module execution modes

flowchart TD
    Start["skills module invoked"] --> Resolve{"skills CLI available?"}
    Resolve -->|Yes| Direct["skills update --project --global"]
    Resolve -->|No| Npx{"npx available?"}
    Npx -->|Yes| Fallback["npx --yes skills update --project --global"]
    Npx -->|No| Missing{"--only skills?"}
    Missing -->|No| Skip["Graceful skip"]
    Missing -->|Yes| Error["Hard error"]
    Direct --> Mode{"--non-interactive?"}
    Fallback --> Mode
    Mode -->|Yes| Confirm["Append --yes"]
    Mode -->|No| Execute["Execute resolved command"]
    Confirm --> Execute
    Execute --> Result{"Dry-run?"}
    Result -->|Yes| Print["Print command; do not execute"]
    Result -->|No| Finish["Complete update"]
Loading

File-Level Changes

Change Details Files
Introduce a default-on skills module in the Bash runner that updates both project and global skills, with PATH-first / npx fallback resolution and non-interactive/dry-run handling.
  • Register skills in the Bash module registry between pi and mise and wire it into the execution order.
  • Implement module_skills/skills_update_argv to build the command as skills update --project --global, appending --yes under --non-interactive.
  • Resolve the backing command by preferring a skills binary on PATH and falling back to npx --yes skills, warning and skipping when neither is available in default runs and failing under --only skills.
  • Ensure dry-run prints the resolved command (including npx and flags) without executing it.
updates
Add a native Windows skills module implementation with equivalent behavior to the Bash version, including dependency resolution and non-interactive semantics.
  • Register skills in $ModuleRegistry as a default-on module for macOS, Linux, and Windows with an appropriate description.
  • Implement Invoke-ModuleSkills to resolve skills vs npx, construct update --project --global arguments, and append --yes when non-interactive.
  • Use Resolve-MissingDependency to skip gracefully when skills/npx are missing in default runs and to error under --only skills.
  • Invoke the resolved command via Invoke-LoggedProcess and surface failures with a clear skills: update failed error.
updates-main.ps1
Extend Bash and native Windows test suites to cover the new skills module behavior, including npx fallback and missing dependency handling.
  • Add a skills stub to the Bash test harness and adjust module-order and skip-list expectations to include skills.
  • Add Bash tests for success path, dry-run purity, non-interactive --yes behavior, npx fallback when skills is absent, and skip vs error semantics when both skills and npx are missing.
  • Add a native Windows test case that verifies direct skills execution, explicit failure when skills is missing, and npx fallback with --non-interactive appending --yes.
  • Update any node-capability tests that depend on the module skip list to include skills.
  • Ensure new tests pass under the existing test harness and linting scripts.
tests/test_cli.sh
tests/test_windows_native.ps1
Update documentation and planning artifacts to describe the skills module, its behavior, and its place in the module matrix/order.
  • Document the skills module in README, including its default-on status, both-scope behavior, and npx fallback requirements.
  • Update SPEC module count, platform matrix, execution order, and add a new section describing skills (8.15) while renumbering subsequent sections.
  • Add a new plan section outlining the goals, execution checklist, and documentation requirements for the skills module.
  • Describe the new module in the Unreleased section of CHANGELOG, including non-interactive --yes behavior and npx fallback.
  • Ensure platform support tables and native Windows default module lists include skills.
  • Increment the documented total module count from 17 to 18 to reflect the new module.
README.md
SPEC.md
PLAN.md
CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown

Greptile Summary

The skills missing-dependency test now runs with a fixture-only command path, preventing host-installed npx from affecting its result. The exercised behavior confirms that a normal run skips skills when neither command is available, while --only skills exits with the expected failure.

Confidence Score: 5/5

No blocking failure remains.

The focused skills test and an isolated runtime reproducer both confirm that the missing-command paths behave as intended without discovering host tooling.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the focused CLI skills tests against the isolated fixture and confirmed there is no host npx leakage, with the focused suite exiting successfully.
  • Compared baseline host PATH discovery with the isolated PATH behavior to validate environment isolation, noting that host PATH resolves npx in the trusted-bin path while the isolated PATH reports npx_in_isolated_path=NOT_FOUND.
  • Observed runtime outcomes: the default skills selection ends with SKIP and the --only skills mode ends with FAIL and exit code 1 in the isolated fixture.
  • Collected and inspected artifacts from the focused CLI run, including the isolated skills fixture reproducer source and the focused CLI test result logs.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "fix(tests): isolate PATH for skills miss..." | Re-trigger Greptile

Comment thread tests/test_cli.sh
@amanthanvi
amanthanvi merged commit 6a742a4 into main Aug 22, 2026
10 checks passed
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