Skip to content

Fix the Claude Code plugin's skill list reading a renamed field, and its project lookup missing a repository stored with another spelling #3643

Closed

Description

@malibio

Overview

Running the merged Claude Code plugin against a real daemon built from main showed two defects. Both make the plugin quietly do less than it should, with no error.

Problem Statement

1. The skill list shows no descriptions.

  1. The plugin reads each listed skill's description from nodespace --json skill guidance.
  2. A listing entry now carries use_for and no description (the retrieval fields were renamed).
  3. The system prompt section lists every skill as - <title>: with nothing after it, and a skill whose use_for was edited is not reported as changed by its text.

Evidence: on a fresh database, nodespace --json skill guidance returns 12 entries, each with title, use_for, modified_at, node_id; a search of the output for "description" finds none.

2. A project whose repository was saved with .git is not found.

  1. A project is created with repository.url = https://github.com/NodeSpaceAI/nodespace-core.git.
  2. The plugin normalizes the checkout's remote to https://github.com/NodeSpaceAI/nodespace-core and queries repository.url with equals.
  3. The query returns 0 nodes, so the plugin shows "no project for this checkout" and adds nothing.

Evidence: the equals query on the form without .git returns count: 0; the same query with operator in over the spellings of that remote returns the project.

Documentation

  • ADR-092 §4 - a client compares the checkout's remote with project.repository, and two spellings of one remote compare equal
  • ADR-093 §4, §5 - the project lookup and the skill list in the section; Consequences - the CLI operations are a contract
  • Prompt and Skill System, Harness plugins - each entry is a skill's title and its use_for
  • Updates: none

Root Cause

Location: packages/skill/plugins/claude-code/hooks/register.ts

  • skillsOf reads entry.description. The listing's field is use_for (skill_json in packages/cli/src/commands/skill.rs). The plugin's tests answer from a fake CLI that still returns description, so they pass.
  • findProject sends one equals filter with one spelling of the remote.

Proposed Solution

  • Read use_for in skillsOf, and rename the plugin's own field to match. No fallback to the old name.
  • Query with in over the spellings of the remote: the HTTPS form with and without .git, and the SSH forms (git@host:path and ssh://git@host/path, each with and without .git).
  • Make the plugin tests' fake CLI answer in the shapes the real commands print, and add a scripts test that the field the plugin reads is one the CLI's listing prints, so a rename on either side fails the gate.

Acceptance Criteria

  • The section lists each skill as its title and its use_for
  • A skill whose use_for changed is named as changed in the note
  • A project is found whether its repository was saved as HTTPS or SSH, with or without .git
  • The plugin tests' fake CLI returns use_for, and {count, nodes} for the project query
  • A test in the merge gate fails if the listing field the plugin reads is not one skill_json prints
  • Verified in a live session against a daemon on a throwaway NODESPACE_HOME: the section shows the project and the skills with their text
  • bun run --cwd packages/skill test:plugin passes
  • Code passes bun run quality:fix
  • Tests pass (bun run test:changed)

Technical Specifications

Files to Modify

  • packages/skill/plugins/claude-code/hooks/register.ts - skillsOf, findProject, httpsRemote
  • packages/skill/plugins/claude-code/types/index.d.ts - NodespaceSkill
  • packages/skill/plugins/claude-code/tests/register.test.ts - the fake CLI's shapes
  • scripts/publish-skill-repo.test.ts - the gate-side check, beside the existing parse check

Test Requirements

  • Plugin tests for both fixes, under claude plugin test
  • A scripts test (bun, DOM-free) tying the plugin's listing field to packages/cli/src/commands/skill.rs

Related Issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions