Skip to content

Conversation

@xxchan
Copy link
Collaborator

@xxchan xxchan commented Jan 14, 2026

See klips/klip-8-config-and-skills-layout.md

@xxchan xxchan marked this pull request as ready for review January 14, 2026 06:09
Copilot AI review requested due to automatic review settings January 14, 2026 06:09
Copy link
Contributor

Copilot AI left a comment

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 implements KLIP-8 to unify skills and AGENTS.md discovery across coding agents, replacing vendor-specific directory layouts with a standardized approach using ~/.config/agents/ as the canonical location while maintaining backward compatibility.

Changes:

  • Implements layered skills discovery (builtin → user → project) with priority-based directory lookup
  • Adds global AGENTS.md support at ~/.config/agents/AGENTS.md that merges with project-level files
  • Updates documentation across English and Chinese versions to reflect new discovery paths

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
klips/klip-8-config-and-skills-layout.md New KLIP proposal document defining unified discovery specification
src/kimi_cli/skill.py Core implementation of layered skills discovery with priority-based candidates
src/kimi_cli/soul/agent.py Integration of new discovery logic and global AGENTS.md merging
tests/test_skill.py Comprehensive tests for new skills discovery functions
tests/test_agents_md.py Tests for global+project AGENTS.md merging behavior
tests/test_default_agent.py Updated expected output for merged AGENTS.md display
src/kimi_cli/agents/default/system.md Updated system prompt text to reflect merged AGENTS.md
docs/en/customization/skills.md Updated English documentation for new discovery paths
docs/zh/customization/skills.md Updated Chinese documentation for new discovery paths
docs/en/customization/agents.md Added AGENTS.md documentation in English
docs/zh/customization/agents.md Added AGENTS.md documentation in Chinese
docs/en/reference/kimi-command.md Updated --skills-dir help text
docs/zh/reference/kimi-command.md Updated --skills-dir help text
src/kimi_cli/skills/skill-creator/SKILL.md Added skill locations and discovery documentation
src/kimi_cli/cli/init.py Updated CLI help text for --skills-dir
src/kimi_cli/app.py Updated docstring for skills_dir parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 437d8886f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@xxchan xxchan changed the title docs: KLIP-8 unified skills and AGENTS.md discovery feat: KLIP-8 KaosPath skills/AGENTS discovery Jan 14, 2026
@xxchan xxchan force-pushed the klip-8-unified-skills-discovery branch from de759e5 to 5987250 Compare January 14, 2026 07:37
@xxchan
Copy link
Collaborator Author

xxchan commented Jan 14, 2026

CI re-trigger

@xxchan xxchan closed this Jan 14, 2026
@xxchan xxchan reopened this Jan 14, 2026
- Add ~/.config/agents/ as canonical location for skills and AGENTS.md
- User level skills: ~/.config/agents/skills/ > ~/.kimi/skills/ > ~/.claude/skills/
- Project level skills: .agents/skills/ > .claude/skills/
- Global AGENTS.md: ~/.config/agents/AGENTS.md
- Fallback paths may be deprecated in future releases
@xxchan xxchan force-pushed the klip-8-unified-skills-discovery branch 9 times, most recently from 660fb3e to c111224 Compare January 14, 2026 09:04
- User skills: ~/.config/agents/skills/ → ~/.kimi/skills/ → ~/.claude/skills/
- Project skills: .agents/skills/ → .kimi/skills/ → .claude/skills/
- User AGENTS.md: ~/.config/agents/AGENTS.md (no fallback)
- Project AGENTS.md: AGENTS.md or agents.md in project root
- Built-in skills only load for LocalKaos or ACPKaos
- All discovery functions are now async with KaosPath
@xxchan xxchan force-pushed the klip-8-unified-skills-discovery branch from c111224 to 6d66b72 Compare January 14, 2026 09:08
Signed-off-by: tianxiao <shentianxiao@moonshot.cn>
> - Provide precise, agent-focused guidance that complements existing `README` and docs.
The project level `/path/to/work/dir/AGENTS.md`:
The merged `AGENTS.md` (global first, then project):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we'd better not merge them into one, because we should encourage the agent to update project AGENTS.md when architecture changes.

Comment on lines -13 to +28
Kimi CLI 会从以下目录发现 Skills
两层逻辑

1. 内置 Skills(随软件包安装)
2. `~/.kimi/skills`(用户目录)
3. `~/.claude/skills`(兼容 Claude 的 Skills)
1. **分层合并**:builtin → user → project 三个层级会被加载,同名 skill 后者覆盖前者
2. **目录查找**:每个层级按优先级查找,找到第一个存在的目录即停止

如果同名 Skill 存在于多个目录中,后发现的会覆盖先前的。你也可以通过 `--skills-dir` 参数指定其他目录:
**内置**:随软件包安装(仅本地或 ACP 模式可用)

```sh
kimi --skills-dir /path/to/my-skills
```
**用户级**(按优先级):
- `~/.config/agents/skills/` — 推荐
- `~/.kimi/skills/` — 旧版回退
- `~/.claude/skills/` — 旧版回退

**项目级**
- `.agents/skills/`

使用 `--skills-dir` 指定目录时,只用指定目录,跳过默认发现(内置 Skills 在支持的后端仍会加载)。
Copy link
Collaborator

Choose a reason for hiding this comment

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

The doc style is too "codex"

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.

3 participants