Skip to content

feat: add kit skill command to install agent skill files - #1267

Open
ManthanNimodiya wants to merge 2 commits into
kitops-ml:mainfrom
ManthanNimodiya:main
Open

feat: add kit skill command to install agent skill files#1267
ManthanNimodiya wants to merge 2 commits into
kitops-ml:mainfrom
ManthanNimodiya:main

Conversation

@ManthanNimodiya

Copy link
Copy Markdown

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

# Print skill content to stdout
kit skill

# Install for Claude Code → .claude/skills/kit.md
kit skill --agent claude

# Install for generic agents → .agents/skills/kit.md
kit skill --agent generic

# Install to a custom directory
kit skill --dir ./my-agent-dir

# Overwrite existing skill file
kit skill --agent claude --force

Implementation

  • pkg/cmd/skill/SKILL.md -> skill content embedded in the binary via //go:embed, so it's always version-matched and works offline
  • pkg/cmd/skill/skill.go -> cobra command following the existing command pattern in the repo
  • cmd/root.go -> registers SkillCommand() in addSubcommands()

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

@ManthanNimodiya ManthanNimodiya changed the title feat: add kit skill command to install agent skill files feat: add kit skill command to install agent skill files Aug 25, 2026
Signed-off-by: ManthanNimodiya <manthannimodiya989898@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 skill Cobra command with --agent, --dir, and --force behaviors (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.

Comment thread pkg/cmd/skill/SKILL.md Outdated
kit push other-registry.io/org/mymodel:v1.0
```

<!-- AGENT_MODIFIED: Human review required before merge -->
Comment thread pkg/cmd/skill/SKILL.md Outdated
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 thread pkg/cmd/skill/skill.go
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>
@ManthanNimodiya

Copy link
Copy Markdown
Author

@gorkem I have addressed the comments of copilot, have a look when you get time

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.

Add a kit skill command to teach AI agents how to use the kit CLI

2 participants