Add skill cache management to SDK (list, remove, validate installed skills)

Open
#75 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
54/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
node.js, typescript

Research direction

Start by reading packages/cli/src/commands/skills/validate.ts and the SDK's MpakBundleCache implementation to understand existing validation and lifecycle patterns. Add SDK methods to list, remove, and validate installed skills, then update skill validate to use the SDK. Done means each method has unit tests and the CLI uses the shared validation logic.

Written by the indexing model from the issue text.

Description

pkg/sdk-typescript

Summary

The SDK has MpakBundleCache for bundle lifecycle (list, load, remove, check updates) but no equivalent for installed skills. The CLI has skill validate and skill pack commands that operate on skill directories, but there's no SDK-level abstraction for:

  1. Listing installed skills — scan ~/.claude/skills/ and return metadata
  2. Removing installed skills — delete a skill directory
  3. Validating skill directories — check SKILL.md frontmatter, structure, naming

The validation logic currently lives in packages/cli/src/commands/skills/validate.ts and should be promoted to the SDK.

Proposed API

// New class or extension of Mpak facade
interface InstalledSkillInfo {
  name: string;
  path: string;
  description: string;
  version?: string;
}

interface SkillValidationResult {
  valid: boolean;
  name: string | null;
  errors: string[];
  warnings: string[];
}

// On the Mpak facade:
listInstalledSkills(skillsDir?: string): InstalledSkillInfo[]
removeInstalledSkill(name: string, skillsDir?: string): boolean
validateSkillDirectory(path: string): SkillValidationResult

Acceptance Criteria

  • List installed skills with metadata from SKILL.md frontmatter
  • Remove installed skills by name
  • Validate skill directories (structure, frontmatter, naming conventions)
  • Unit tests for each method
  • CLI skill validate updated to use SDK validation

Context

Companion to #74 (installSkill). Together these give the SDK full skill lifecycle management, enabling platform consumers to manage skills without the CLI.

Dominant language
TypeScript
Stars
14
Forks
13
Avg merge
16m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NimbleBrainInc/mpak

All issues in NimbleBrainInc/mpak

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.