feat(skill): add a kit skill command to install the kit agent skill#1252
feat(skill): add a kit skill command to install the kit agent skill#1252youdie006 wants to merge 1 commit into
Conversation
Coding agents learn kit only from flag-oriented --help. Add a kit skill command that installs an embedded SKILL.md - covering Kitfile authoring and the pack/tag/login/push/pull/unpack workflow - into the agent skills directories, reusing the existing --as-skill installer so it lands in .claude/skills, the shared .agents/skills, etc. The SKILL.md is go:embed'd so it always matches the installed kit version and works air-gapped. Scopes to the command only; publishing the skill as a ModelKit is left to a follow-up. Refs kitops-ml#1249. Signed-off-by: youdie006 <youdie006@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
amisevsk
left a comment
There was a problem hiding this comment.
Nicely done @youdie006, thank you!
I have one note on the cli-reference.md file, but apart from that it looks good to me. I'd like @gorkem's review on the SKILL.md, though I have no concerns personally and think it's a solid starting point.
There was a problem hiding this comment.
A bit of a strange feature in this repository: this CLI reference doc is served at https://kitops.org/docs/cli/cli-reference/ based on the repository HEAD (i.e. not the last release). As a result, merging this update to the cli-reference.md file will update the public docs immediately, even though the skill command is not yet released.
Please revert this change in the PR; instead, this file will be automatically updated on the next Kit release through CI actions.
There was a problem hiding this comment.
@gorkem I'd like your opinion on this SKILL.md for KitOps -- you're better at writing these than I am.
Description
Coding agents (Claude Code, Codex, Cursor, ...) learn
kitonly from flag-oriented--help, which says nothing about workflows. This adds akit skillcommand that installs an embeddedSKILL.md— covering Kitfile authoring and the pack/tag/login/push/pull/unpack workflow, plus common errors — into the agent skills directories.pkg/cmd/skillcommand, registered incmd/root.goalongside the other subcommands.SKILL.mdisgo:embed'd so it always matches the installed kit version and works air-gapped, exactly as the issue asks.--as-skillinstaller (libskill.InstallSkill) and agent-directory resolution, so it lands in.claude/skills, the shared.agents/skills, etc., with the same--agents/-d/-o/-iflags askit unpack --as-skill. No agent-dir logic is duplicated.SKILL.mdis grounded in the real command implementations and Kitfile validation rules (no invented flags/behavior).docs/src/docs/cli/cli-reference.mdregenerated via the repo's owndocs/src/docs/cli/generate.sh.Scoped to the core command per the small-PR principle. The issue's secondary ask — publishing the skill as a ModelKit — is left to a follow-up.
Tests (
pkg/cmd/skill/cmd_test.go): installs the embedded skill to.claude/skills/kitops/SKILL.md; multi-agent install; unknown-agent error; a frontmatter drift guard.go build ./...,go vet,go test, andgofmtall pass; also smoke-tested with the built binary (writes the skill, overwrite / ignore-existing guards work,--helprenders).Design note: I named the skill/dir
kitops; if you'd prefer something more action-oriented (e.g.using-kit) it's a one-line change to theskillNameconst + the frontmattername(a test guards they stay equal).Linked issues
Refs #1249
AI-Assisted Code