Skip to content

Commit e0b0002

Browse files
Digi-Boclaude
andcommitted
fix(kimi): use .kimi/skills/<name>/SKILL.md structure for Kimi Code CLI
Kimi Code CLI uses a skills system, not flat command files: - Skills live in .kimi/skills/<name>/SKILL.md (project-level) - Invoked with /skill:<name> (e.g. /skill:speckit.specify) - Each skill is a directory containing SKILL.md with YAML frontmatter Changes: - AGENT_CONFIG["kimi"]["commands_subdir"] = "skills" (was "commands") - create-release-packages.sh: new create_kimi_skills() function creates skill directories with SKILL.md from real template content - Bump version to 0.1.14.2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0b0ffe2 commit e0b0002

File tree

3 files changed

+50
-4
lines changed

3 files changed

+50
-4
lines changed

.github/workflows/scripts/create-release-packages.sh

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,52 @@ Execute the add-dir workflow with arguments: $ARGUMENTS
5656
EOF
5757
}
5858

59+
# Create Kimi Code skills in .kimi/skills/<name>/SKILL.md format.
60+
# Kimi CLI discovers skills as directories containing a SKILL.md file,
61+
# invoked with /skill:<name> (e.g. /skill:speckit.specify).
62+
create_kimi_skills() {
63+
local skills_dir="$1"
64+
65+
local commands=(constitution specify clarify plan tasks analyze checklist implement taskstoissues)
66+
for cmd in "${commands[@]}"; do
67+
local skill_name="speckit.${cmd}"
68+
local skill_dir="${skills_dir}/${skill_name}"
69+
mkdir -p "$skill_dir"
70+
71+
# Extract description from template frontmatter if available, else use a default
72+
local src="$COMMANDS_TEMPLATES_DIR/${cmd}.md"
73+
local description="Spec Kit: ${cmd} workflow"
74+
if [[ -f "$src" ]]; then
75+
local fm_desc
76+
fm_desc=$(grep -m1 '^description:' "$src" | sed 's/^description:[[:space:]]*//' | tr -d '"' || true)
77+
[[ -n "$fm_desc" ]] && description="$fm_desc"
78+
fi
79+
80+
# Write SKILL.md with Kimi frontmatter + template content
81+
{
82+
printf -- '---\n'
83+
printf 'name: "%s"\n' "$skill_name"
84+
printf 'description: "%s"\n' "$description"
85+
printf -- '---\n\n'
86+
if [[ -f "$src" ]]; then
87+
# Strip existing frontmatter from template and append the body
88+
awk '/^---/{p++; if(p==2){found=1; next}} found' "$src"
89+
fi
90+
} > "$skill_dir/SKILL.md"
91+
done
92+
93+
# add-dir skill
94+
mkdir -p "${skills_dir}/add-dir"
95+
cat > "${skills_dir}/add-dir/SKILL.md" << 'EOF'
96+
---
97+
name: "add-dir"
98+
description: "Add a directory to the Spec Kit project structure"
99+
---
100+
101+
Execute the add-dir workflow with arguments: $ARGUMENTS
102+
EOF
103+
}
104+
59105
# Generate toml command files for agents that use that format (gemini, qwen).
60106
generate_toml_commands() {
61107
local agent="$1"
@@ -199,8 +245,8 @@ create_package() {
199245
copy_real_md_commands "$base_dir/.bob/commands"
200246
;;
201247
kimi)
202-
mkdir -p "$base_dir/.kimi/commands"
203-
copy_real_md_commands "$base_dir/.kimi/commands"
248+
mkdir -p "$base_dir/.kimi/skills"
249+
create_kimi_skills "$base_dir/.kimi/skills"
204250
;;
205251
esac
206252

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "specify-cli"
3-
version = "0.1.14.1"
3+
version = "0.1.14.2"
44
description = "Specify CLI, part of GitHub Spec Kit. A tool to bootstrap your projects for Spec-Driven Development (SDD)."
55
requires-python = ">=3.11"
66
dependencies = [

src/specify_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def _format_rate_limit_error(status_code: int, headers: httpx.Headers, url: str)
254254
"kimi": {
255255
"name": "Kimi Code",
256256
"folder": ".kimi/",
257-
"commands_subdir": "commands",
257+
"commands_subdir": "skills", # Kimi uses /skill:<name> with .kimi/skills/<name>/SKILL.md
258258
"install_url": "https://code.kimi.com/",
259259
"requires_cli": True,
260260
},

0 commit comments

Comments
 (0)