Skip to content

feat(list): add --outdated flag - #42

Merged
harlan-zw merged 1 commit into
mainfrom
feat/list-outdated
Mar 22, 2026
Merged

harlan-zw merged 1 commit into
mainfrom
feat/list-outdated

Conversation

@oritwoen

@oritwoen oritwoen commented Mar 22, 2026

Copy link
Copy Markdown
Collaborator

skilld list shows all installed skills but there's no quick way to check which ones fell behind your package.json versions without opening the interactive TUI. Useful for CI checks and scripting.

Adds --outdated (-o) flag that compares installed skill versions against local deps and prints only the stale ones with a version arrow:

vue-skilld  3.4.0  →  3.5.0  vuejs/core  2d ago

Works with --json so you can pipe it into CI gates or monitoring.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added --outdated flag (-o) to list command, displaying skills with available updates and comparing current vs. latest versions.
    • Supports both formatted table and JSON output modes for outdated skills.
    • Shows "All skills are up to date" confirmation when no updates are available.
  • Tests

    • Added comprehensive unit tests for the new outdated feature.

Adds `skilld list --outdated` (alias `-o`) which compares installed
skill versions against local package.json deps and shows only skills
with a newer version available. Works with `--json` for CI pipelines.
@coderabbitai

coderabbitai Bot commented Mar 22, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Extended list command with outdated skills detection feature. Made command asynchronous, added outdated boolean flag and latest version field to list entries. New logic filters and displays outdated skills with version comparisons. Updated CLI with -o alias argument. Added comprehensive unit tests for all output modes.

Changes

Cohort / File(s) Summary
Outdated Skills Feature
src/commands/list.ts
Added outdated?: boolean flag to ListOptions. Made listCommand async; when outdated is true, fetches project state and filters entries to only outdated skills. Supports --json output or formatted table with version → latest columns. Added CLI argument with -o alias.
Test Coverage
test/unit/list.test.ts
New comprehensive unit test suite verifying all output modes: default table output, --json mode, --outdated filtering, --outdated --json combined mode, and "all up to date" message when no outdated skills exist.

Sequence Diagram

sequenceDiagram
    actor User as CLI User
    participant CLI as List Command
    participant Agent as Project State
    participant Fmt as Formatters
    participant Out as Output

    User->>CLI: listCommand(opts: {outdated: true})
    alt Normal Mode
        CLI->>Out: Display all skills table
    else Outdated Mode
        CLI->>Agent: getProjectState()
        Agent-->>CLI: {outdated: [...]}
        CLI->>Fmt: formatSource() + timeAgo()
        Fmt-->>CLI: Formatted entries
        alt Has Outdated Skills
            CLI->>Out: Display version → latest table (or JSON)
        else No Outdated Skills
            CLI->>Out: Print "All skills are up to date"
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

With -o we hop through outdated skills so bright,
Comparing versions, finding those not quite right,
Old versions shown with latest side by side,
An async journey through the update tide,
JSON or tables—choose your display with pride! 🐰

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and concisely describes the main change: adding a new --outdated flag to the list command, which is the primary focus of this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/list-outdated

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

Tip

Migrating from UI to YAML configuration.

Use the @coderabbitai configuration command in a PR comment to get a dump of all your UI settings in YAML format. You can then edit this YAML file and upload it to the root of your repository to configure CodeRabbit programmatically.

@oritwoen oritwoen self-assigned this Mar 22, 2026

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

🧹 Nitpick comments (1)
test/unit/list.test.ts (1)

1-1: Consider using vitest globals for consistency.

The coding guidelines specify using vitest with globals: true, which would allow using describe, it, expect, and vi without explicit imports. This is optional since the current approach works correctly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/unit/list.test.ts` at line 1, The test file currently imports vitest
symbols explicitly; update it to use vitest globals by removing the import line
(so tests use describe, it, expect, vi directly) and enable globals: true in
your Vitest config (vitest config option) to keep consistency with the project's
testing guidelines; target the import statement that brings in "describe,
expect, it, vi" in list.test.ts and remove it after toggling globals.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/unit/list.test.ts`:
- Line 1: The test file currently imports vitest symbols explicitly; update it
to use vitest globals by removing the import line (so tests use describe, it,
expect, vi directly) and enable globals: true in your Vitest config (vitest
config option) to keep consistency with the project's testing guidelines; target
the import statement that brings in "describe, expect, it, vi" in list.test.ts
and remove it after toggling globals.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 04faf335-b476-4953-ab83-bb4884c6c9d6

📥 Commits

Reviewing files that changed from the base of the PR and between f5f2a79 and 5539483.

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

@harlan-zw
harlan-zw merged commit deb5066 into main Mar 22, 2026
3 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