feat: add kit skill command to install agent skill files - #1267
Open
ManthanNimodiya wants to merge 2 commits into
Open
feat: add kit skill command to install agent skill files#1267ManthanNimodiya wants to merge 2 commits into
ManthanNimodiya wants to merge 2 commits into
Conversation
kit skill command to install agent skill filesSigned-off-by: ManthanNimodiya <manthannimodiya989898@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new kit skill CLI command that prints an embedded Agent Skills–style SKILL.md to stdout or installs it into common agent skill directories (e.g., .claude/skills/kit.md, .agents/skills/kit.md), making offline, version-matched workflow guidance available to coding agents.
Changes:
- Added the embedded skill content (
pkg/cmd/skill/SKILL.md) intended to teach KitOps workflows. - Implemented the
kit skillCobra command with--agent,--dir, and--forcebehaviors (pkg/cmd/skill/skill.go). - Registered the new command on the root CLI (
cmd/root.go).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/cmd/skill/SKILL.md | Adds the skill content that will be embedded and installed/printed by kit skill. |
| pkg/cmd/skill/skill.go | Implements the kit skill command and file install/overwrite logic using embedded content. |
| cmd/root.go | Wires the new skill command into the CLI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| kit push other-registry.io/org/mymodel:v1.0 | ||
| ``` | ||
|
|
||
| <!-- AGENT_MODIFIED: Human review required before merge --> |
Comment on lines
+85
to
+87
| kit unpack registry.io/org/mymodel:v1.0 --model # model weights only | ||
| kit unpack registry.io/org/mymodel:v1.0 --datasets # datasets only | ||
| kit unpack registry.io/org/mymodel:v1.0 --code # code only |
Comment on lines
+118
to
+122
| func writeSkill(dir string, force bool) error { | ||
| if err := os.MkdirAll(dir, 0o755); err != nil { | ||
| return output.Fatalf("Failed to create directory %s: %s", dir, err) | ||
| } | ||
|
|
Signed-off-by: ManthanNimodiya <manthannimodiya989898@gmail.com>
Author
|
@gorkem I have addressed the comments of copilot, have a look when you get time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1249
Description
A new kit skill command that installs a SKILL.md file into AI agent skill directories, following the Agent Skills spec.
The skill teaches agents about kit workflows (Kitfile authoring, pack/push/pull/unpack, tagging, common errors), rather than just flags, so agents can reason about kit tasks without needing internet access or stale manual context.
Usage
Implementation
Testing
kit skill # prints to stdout
kit skill --agent claude # creates .claude/skills/kit.md
kit skill --agent claude # errors: file exists, use --force
kit skill --agent claude --force # overwrites
kit skill --agent bad # errors: unknown agent
kit skill --agent claude --dir ./x # errors: mutually exclusive flags