Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kimi — design-aware Agent delegation to a local Kimi Code CLI

Delegate focused coding and design tasks from any Agent to your local Kimi Code CLI.
让任意 Agent 稳定地调用本地 Kimi Code:捕获进度、续接会话,并返回紧凑的 Markdown 结果。

Install · First task · Capabilities · Limits

What this is

An unofficial, host-agnostic Agent Skill that wraps the local kimi command for predictable, non-interactive delegation. Any Agent that can load SKILL.md and execute a shell command can use it.

Kimi is especially useful when a task benefits from strong UI/UX judgment, visual direction, design-system thinking, or polished frontend implementation. The wrapper adds the orchestration layer that a calling Agent needs: focused context, JSONL capture, compact progress, resumable sessions, and a Markdown handoff.

Agent request → ask_kimi.sh → Kimi stream-json → result.md + session_id → Agent review

Proof, not ceremony

$ ./scripts/ask_kimi.sh "Review this interface and improve the layout" \
    --workspace ./my-app \
    --file src/App.tsx \
    --file references/current-ui.png

[kimi] tool: Read
[kimi] tool: Edit
session_id=session_…
output_path=…/.runtime/20260718-….md
elapsed=12s

The caller reads the result, reviews the workspace changes, and can resume the same Kimi session for a genuine follow-up.

Install

Requirements

  • macOS or Linux with Bash 3.2+
  • Kimi Code CLI installed and authenticated
  • jq available on PATH
  • An Agent that can load SKILL.md and run local shell commands

Clone the repository, then link it into the Skill directory used by your Agent:

git clone https://github.com/oil-oil/kimi.git
cd kimi
export AGENT_SKILLS_DIR="/path/to/your/agent/skills"
mkdir -p "$AGENT_SKILLS_DIR"
ln -s "$PWD" "$AGENT_SKILLS_DIR/kimi"

If a kimi Skill already exists in that directory, update or remove it intentionally before creating the link. Hosts may also load this repository's SKILL.md directly without a symlink.

First task

Invoke the Skill from your Agent:

Use $kimi to inspect this repository and implement the requested change.

Or verify the wrapper directly:

./scripts/ask_kimi.sh \
  "Explain the active request path" \
  --workspace "/path/to/repository" \
  --file "src/main.ts"

Resume the returned session:

./scripts/ask_kimi.sh \
  "Now add the missing regression test" \
  --workspace "/path/to/repository" \
  --session "session_..."

Capabilities

  • Design-aware delegation — favor Kimi for interface critique, layout, typography, design systems, and frontend polish.
  • Focused context — pass 1–4 priority code, image, or video paths without pasting their contents into the prompt.
  • Session continuity — capture Kimi's session ID and resume only when prior context is valuable.
  • Compact handoff — save the final response and tool summary as Markdown instead of forwarding raw JSONL.
  • Failure diagnostics — preserve useful errors while truncating output and redacting common token patterns.

Wrapper options

Option Purpose
--workspace <path> Run Kimi from a chosen working directory.
--file <path> Add a priority code or media hint; repeatable.
--session <id> Resume a previous Kimi session.
--model <alias> Use a locally configured Kimi model alias.
--add-dir <path> Add another accessible workspace directory; repeatable.
--skills-dir <path> Replace Kimi's auto-discovered Skill directories for this run.
--output <path> Choose the Markdown result path.

Task text can be the first positional argument, --task, or stdin.

Limits and safety

Kimi can inspect images, but it cannot generate them

Use image and video paths as visual references for analysis, critique, or frontend implementation. Do not delegate image generation or image editing to this Skill; use a dedicated image tool for PNG, JPEG, WebP, or other image deliverables.

Prompt mode is not a read-only sandbox

Kimi's non-interactive prompt mode may edit files or run commands under its automatic permission policy. It cannot be combined with Kimi's interactive --plan mode, so this wrapper deliberately does not pretend to offer --read-only. Use it only in trusted workspaces and only when the requested mutations are authorized.

Repository layout

.
├── SKILL.md                 # Triggering metadata and agent workflow
├── agents/openai.yaml       # Optional metadata for OpenAI hosts
├── scripts/ask_kimi.sh      # Deterministic Kimi Code wrapper
└── assets/readme/hero.svg   # GitHub-safe project hero

Validate changes

bash -n scripts/ask_kimi.sh
scripts/ask_kimi.sh --help
python3 /path/to/skill-creator/scripts/quick_validate.py .

For behavioral changes, test a harmless new session, a resumed session, and one read-only tool call before publishing.

Contributing

Issues and focused pull requests are welcome. Keep the Skill concise, preserve macOS Bash 3.2 compatibility, and verify behavior against the currently installed kimi --help rather than assuming another Agent CLI uses the same flags.

License

The Skill and wrapper are released under the MIT License.

Kimi and the Kimi logo are trademarks or brand assets of Moonshot AI. This project is unofficial, is not affiliated with or endorsed by Moonshot AI, and uses the official mark only to identify Kimi Code compatibility. See NOTICE; the logo is not covered by this repository's MIT license.

About

Design-strong Agent Skill for delegating tasks to a local Kimi Code CLI

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages