MoonshotAI / MoonshotAI/kimi-cli

[Feature Request] Mandatory project skill loading gates (.kimi/require-skills)

Open
#2,071 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

Feature Request: Project-level mandatory skill loading gates

Problem

When working on projects that define .agents/skills/<name>/SKILL.md, the AI agent can modify source code (src/, tests/) without ever loading the project's skill. This leads to workflow violations (e.
g., skipping TDD, git worktree isolation, code review requirements).

Real-world impact

In our project (Firefly, a Qt6/C++ system monitor), the skill firefly-dev-workflow mandates:

  1. Read knowledge base before any code change
  2. Use git worktree isolation
  3. TDD (Red-Green-Refactor)
  4. Two-stage code review
  5. Knowledge base update after completion

The AI skipped all of these and directly modified src/view/DetailPanel.cpp, violating the project's agreed-upon workflow. The user had to manually intervene after the fact.

Proposed solution

Add a mandatory gate mechanism for project-level skills. Options:

Option A: Auto-inject skill content
When .agents/skills/ exists in the project root, automatically prepend the skill's SKILL.md content to the system prompt (or treat it as higher-priority instructions).

Option B: .kimi/require-skills config file
Allow projects to define .kimi/require-skills (similar to .pre-commit-config.yaml):

required:
  - .agents/skills/firefly-dev-workflow/SKILL.md
The CLI should block WriteFile/StrReplaceFile operations on src//tests/ until the skill is acknowledged/loaded.
Option C: Tool-call layer gate In the tool dispatcher, if a WriteFile targets src/ or tests/ and the project has unloaded skills, reject with:
▌ "Project skill firefly-dev-workflow not loaded. Load it first before modifying code."
Preferred option
Option B + C combined: .kimi/require-skills as the declarative mechanism, tool-call gate as the enforcement.
Environment
• kimi-cli version: (your version, run kimi --version)
• OS: Linux

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the tool dispatcher and the existing project skill-loading path, then trace how WriteFile and StrReplaceFile handle targets under src/ and tests/. Compare the proposed .kimi/require-skills configuration with the auto-injection and tool-call gate options. Done means the chosen behavior is specified, enforced for required skills, and verified with tests for acknowledged and unacknowledged skills.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.