Skip to content

feat(mcp): refresh global AI skills on lerd update#222

Merged
geodro merged 2 commits intomainfrom
feat/refresh-global-mcp-skills-on-update
Apr 20, 2026
Merged

feat(mcp): refresh global AI skills on lerd update#222
geodro merged 2 commits intomainfrom
feat/refresh-global-mcp-skills-on-update

Conversation

@geodro
Copy link
Copy Markdown
Owner

@geodro geodro commented Apr 19, 2026

Summary

  • mcp:enable-global now writes user-scope skill, rules, and guidelines files (~/.claude/skills/lerd/SKILL.md, ~/.cursor/rules/lerd.mdc, ~/.junie/guidelines.md) in addition to the MCP server registrations, so the assistants actually know which lerd tools exist.
  • lerd update re-writes those three files from the newly installed binary when global MCP is enabled, so the skill content stays aligned with any added or renamed tools in the release.
  • Gate runs only when MCP was enabled globally, detected via claude mcp list --scope user or the lerd-owned marker files, covering users without Claude Code installed.

Changes

  • internal/cli/mcp.go: new WriteGlobalAISkills(home, verbose) helper shared between mcp:enable-global and the update flow, updated help text.
  • internal/cli/update.go: post-install refreshGlobalMCPSkills with mcpEnabledGlobally marker-aware gate.
  • internal/cli/mcp_test.go: seven tests covering file writes, idempotence, preservation of existing Junie guidelines, replacement of a stale lerd block, and the gate.
  • docs/features/mcp.md: documents the new user-scope files and the update-time refresh.

geodro added 2 commits April 19, 2026 19:37
mcp:enable-global now also writes user-scope SKILL.md, cursor rules, and
junie guidelines so the AI assistants actually know about the lerd tools.
lerd update re-writes those three files from the newly installed binary
when global MCP is enabled, so they stay aligned with any added or
renamed tools. Gate detects both claude user-scope registration and the
lerd-owned marker files, covering users without Claude Code installed.
@geodro geodro merged commit 8e0b58b into main Apr 20, 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.

1 participant