Skip to content

Add bundled agent skill command#349

Merged
kindermax merged 2 commits into
masterfrom
skill-builtin
Jun 13, 2026
Merged

Add bundled agent skill command#349
kindermax merged 2 commits into
masterfrom
skill-builtin

Conversation

@kindermax

@kindermax kindermax commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Summary by Sourcery

Add experimental lets self skills commands to manage the bundled lets agent skill and document their usage.

New Features:

  • Introduce lets self skills subcommands to show, install, and update the bundled lets agent skill, including local/global scopes and custom paths.
  • Bundle the lets Agent Skill definition within the binary for installation into standard Agent Skills directories.

Documentation:

  • Add an Agent Skills documentation page explaining the bundled lets skill, its installation locations, and usage, and link it from the config reference.
  • Update the changelog with notes about the new lets self skills commands and Agent Skills documentation.

Tests:

  • Add tests covering lets self skills show, install (local/global), non-destructive installs, and update behaviors.

@sourcery-ai

sourcery-ai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Reviewer's Guide

Introduce an experimental lets self skills CLI subcommand for managing the bundled lets Agent Skill, including commands to show, install, and update the skill, along with associated documentation and tests.

File-Level Changes

Change Details Files
Add experimental self skills command hierarchy (show/install/update) for managing the bundled lets Agent Skill.
  • Register a new skills subcommand under lets self and wire it into the existing Cobra command tree.
  • Implement skills show to print the embedded lets skill content to stdout using the skills package.
  • Implement skills install with flags for local/global/path scopes, optional skill name validation, and a prompt-based scope picker when no scope is provided.
  • Implement skills update to scan known local and global skill locations and update installed skills to the bundled version.
  • Introduce helpers for determining local (Git-root) and global (~/.agents/skills) skills directories, prompting for scope, installing/updating the skill file, and finding the Git repository root.
internal/cmd/self.go
internal/cmd/self_skills.go
Embed the bundled lets Agent Skill content and constants describing its layout.
  • Add an embedded internal/skills/lets/SKILL.md file describing how agents should discover and use lets tasks and configuration.
  • Expose constants for the lets skill name, skills directory layout, and skill file name.
  • Provide a LetsSkill accessor that returns a copy of the embedded skill bytes for use by CLI commands.
internal/skills/lets/SKILL.md
internal/skills/skills.go
Add tests for the new self skills commands covering show, install, and update behaviors.
  • Verify self skills show outputs the bundled lets skill content.
  • Test interactive install prompting for local/global scope and writing to the correct directory under a temporary Git repo or HOME.
  • Ensure existing skills are not overwritten without --force and that update rewrites old content and reports status messages.
  • Add helpers to create a temporary Git repo and assert installed skill files match the embedded skill content.
internal/cmd/self_skills_test.go
Document the new Agent Skills feature and link it into existing docs and navigation.
  • Add an Agent Skills section to the config reference explaining that skills are managed via lets self skills rather than lets.yaml.
  • Create a dedicated Agent Skills doc page describing what gets installed, how to show/install/update/remove the bundled skill, and the supported flags.
  • Update the changelog with entries for the new lets self skills commands and documentation.
  • Register the new Agent Skills doc in the Docusaurus sidebar navigation.
docs/docs/config.md
docs/docs/changelog.md
docs/docs/agent_skills.md
docs/sidebars.js

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • In skillsInstallOptions.targetDir, prompting for scope fails entirely if localSkillsDir cannot be resolved (e.g., not in a Git repo), even when the user might want a global install; consider making the local path optional in this case so that prompting still works and global-only installs are possible.
  • findGitRoot only detects repositories where .git is a directory; for worktrees or non-standard setups where .git is a file, this will fail and break --local installs, so it may be worth extending this helper to handle .git as a file pointing to the actual repo metadata.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `skillsInstallOptions.targetDir`, prompting for scope fails entirely if `localSkillsDir` cannot be resolved (e.g., not in a Git repo), even when the user might want a global install; consider making the local path optional in this case so that prompting still works and global-only installs are possible.
- `findGitRoot` only detects repositories where `.git` is a directory; for worktrees or non-standard setups where `.git` is a file, this will fail and break `--local` installs, so it may be worth extending this helper to handle `.git` as a file pointing to the actual repo metadata.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@kindermax kindermax merged commit 83cfa82 into master Jun 13, 2026
5 checks passed
@kindermax kindermax deleted the skill-builtin branch June 13, 2026 19:01
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