-
Notifications
You must be signed in to change notification settings - Fork 394
feat: KLIP-8 KaosPath skills/AGENTS discovery #611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.mdthat 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.
There was a problem hiding this 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".
de759e5 to
5987250
Compare
|
CI re-trigger |
- 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
660fb3e to
c111224
Compare
- 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
c111224 to
6d66b72
Compare
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): |
There was a problem hiding this comment.
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.
| 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 在支持的后端仍会加载)。 |
There was a problem hiding this comment.
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"
See klips/klip-8-config-and-skills-layout.md