feat: add skilld prepare command for package.json hooks#43
Conversation
Lightweight, blocking alternative to `skilld update -b` that runs on every `pnpm install`. Restores broken symlinks from lockfile, auto-installs shipped skills from node_modules, and reports outdated package count without triggering LLM regeneration. Also extracts prepare hook suggestion into shared `suggestPrepareHook()` helper and shows it after `skilld add`, `skilld update`, and multi-package sync completions.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIntroduces a new Changes
Sequence DiagramsequenceDiagram
participant CLI as CLI (skilld prepare)
participant State as getProjectState
participant FS as Filesystem
participant Symlink as Symlink Ops
participant Deps as Dependency Packages
CLI->>FS: read per-skill lockfiles
CLI->>Symlink: restore or recreate `.skilld/pkg` symlinks
Symlink->>FS: verify/create links
CLI->>State: load current project state (includes shipped)
CLI->>Deps: for each shipped dependency skill -> link into skillsDir
Deps->>FS: create skill dir/link and write lock entry (source: 'shipped')
CLI->>State: re-read project state (post-install)
State-->>CLI: return updated state with `shipped`
CLI->>CLI: log count of outdated skills (suggest `skilld update`)
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
❓ Type of change
📚 Description
Improves integration with packages that publish their own skills via the skills-npm convention, and keeps installed skills in sync with node_modules.
Adds
skilld prepare, a lightweight, blocking command designed forpackage.jsonprepare hooks. Unlike the previousskilld update -brecommendation (which ran the full LLM pipeline in the background),skilld preparedoes three things fast and without any LLM calls:.skilld/pkgsymlinks from the lockfile (e.g. afterpnpm installrecreatesnode_modules)skills/directoryskilld updateAlso extracts the "add prepare hook" suggestion into a shared
suggestPrepareHook()helper and surfaces it afterskilld add,skilld update, and multi-package sync completions, so users discover the hook earlier.Summary by CodeRabbit
New Features
skilld prepareto restore references, install shipped skills, and report outdated packagespreparehook after sync/setup operationsDocumentation
skilld prepareinpackage.jsonand clarify its role vsskilld update