Skip to content

fix(cli,skill): unify config source, write SKILL.md, fix TS param parser#92

Merged
bug-ops merged 2 commits into
masterfrom
81-cli-config-skill-fixes
May 3, 2026
Merged

fix(cli,skill): unify config source, write SKILL.md, fix TS param parser#92
bug-ops merged 2 commits into
masterfrom
81-cli-config-skill-fixes

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 3, 2026

Summary

Breaking change

skill command stdout shape changed from a raw GenerateSkillResult JSON dump to a SkillWriteResult object (success, output_path, bytes_written, tool_count).

Test plan

  • cargo nextest run --workspace --all-features — 639/639 pass
  • cargo +nightly fmt --check — clean
  • cargo clippy --all-targets --all-features --workspace -- -D warnings — clean
  • cargo test --doc --all-features --workspace — 10/10 pass
  • server list returns [] when ~/.claude/mcp.json is absent (not an error)
  • skill --server <id> writes SKILL.md to ~/.claude/skills/<id>/SKILL.md
  • skill --server <id> --format json outputs SkillWriteResult JSON
  • Parser: name: string; /* required */ and name: string; // comment both produce param name
  • Parser: JSDoc default: and include: tokens do not appear as parameters

Closes #81, #82, #83

Fixes three independent bugs:

- fix(cli): server subcommands (list/info/validate) now read from
  ~/.claude/mcp.json instead of Claude Desktop config. Removes
  ServerManager; all paths go through common::load_mcp_config_from().
  list_mcp_servers() returns empty vec (not error) when the file is
  absent. Fixes misleading error hint. Closes #81.

- fix(skill): skill CLI now writes SKILL.md directly instead of
  dumping a JSON context blob to stdout. Output is rendered via a new
  skill-md.hbs Handlebars template and written atomically
  (temp + rename). Frontmatter values are YAML-quoted to prevent
  injection. Closes #82.

- fix(skill): TypeScript property parser no longer extracts tokens
  from JSDoc comment lines as parameter names. parse_parameters() now
  iterates lines, skips comment-prefix lines, and strips inline // and
  /* */ comments before applying the anchored PROP_LINE_REGEX. The
  comment search is bounded at the first string-literal delimiter to
  avoid false truncation on URL types. Closes #83.

BREAKING: skill command stdout shape changed from a raw GenerateSkillResult
JSON dump to a SkillWriteResult object (success, output_path, bytes_written,
tool_count).
@bug-ops bug-ops force-pushed the 81-cli-config-skill-fixes branch from 8efc7ef to 60df188 Compare May 3, 2026 13:48
@bug-ops bug-ops enabled auto-merge (squash) May 3, 2026 13:48
@github-actions github-actions Bot added crate: mcp-cli Changes to mcp-cli crate (command-line interface) type: documentation Documentation changes (*.md, docs/, comments) breaking change Contains breaking API changes (requires major version bump) release Release preparation (changelog, version bumps) labels May 3, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 3, 2026

Codecov Report

❌ Patch coverage is 87.46667% with 47 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/mcp-cli/src/commands/server.rs 40.00% 24 Missing ⚠️
crates/mcp-cli/src/commands/common.rs 84.16% 19 Missing ⚠️
crates/mcp-cli/src/commands/skill.rs 93.33% 2 Missing ⚠️
crates/mcp-skill/src/parser.rs 99.04% 1 Missing ⚠️
crates/mcp-skill/src/template.rs 98.70% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #92      +/-   ##
==========================================
+ Coverage   89.03%   89.82%   +0.79%     
==========================================
  Files          33       33              
  Lines        7751     7817      +66     
==========================================
+ Hits         6901     7022     +121     
+ Misses        850      795      -55     
Flag Coverage Δ
mcp-cli 89.82% <87.46%> (+0.79%) ⬆️
mcp-codegen 89.82% <87.46%> (+0.79%) ⬆️
mcp-core 89.82% <87.46%> (+0.79%) ⬆️
mcp-files 89.82% <87.46%> (+0.79%) ⬆️
mcp-introspector 89.82% <87.46%> (+0.79%) ⬆️
mcp-server 89.82% <87.46%> (+0.79%) ⬆️
mcp-skill 89.82% <87.46%> (+0.79%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
crates/mcp-cli/src/commands/introspect.rs 98.95% <100.00%> (+<0.01%) ⬆️
crates/mcp-skill/src/parser.rs 98.09% <99.04%> (+0.12%) ⬆️
crates/mcp-skill/src/template.rs 98.41% <98.70%> (+0.23%) ⬆️
crates/mcp-cli/src/commands/skill.rs 97.97% <93.33%> (-1.18%) ⬇️
crates/mcp-cli/src/commands/common.rs 94.93% <84.16%> (-0.96%) ⬇️
crates/mcp-cli/src/commands/server.rs 41.80% <40.00%> (-8.75%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Windows CI renders skill-md.hbs with CRLF line endings, causing
starts_with("---\n") assertions to fail. Normalize after rendering.
@bug-ops bug-ops merged commit c7c5e1b into master May 3, 2026
17 checks passed
@bug-ops bug-ops deleted the 81-cli-config-skill-fixes branch May 3, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Contains breaking API changes (requires major version bump) crate: mcp-cli Changes to mcp-cli crate (command-line interface) release Release preparation (changelog, version bumps) type: documentation Documentation changes (*.md, docs/, comments)

Projects

None yet

2 participants