Kimi
by @ivangdavila
Build and debug Kimi API workflows for chat, coding, reasoning, and tool-calling with live model checks, retries, and safe routing.
clawhub install kimiπ About This Skill
name: Kimi slug: kimi version: 1.0.0 homepage: https://clawic.com/skills/kimi description: Build and debug Kimi API workflows for chat, coding, reasoning, and tool-calling with live model checks, retries, and safe routing. changelog: Initial release with Kimi workflow routing, OpenAI-compatible request patterns, migration guidance, and operational safety checks. metadata: {"clawdbot":{"emoji":"π","requires":{"bins":["curl","jq"],"env":["MOONSHOT_API_KEY"]},"os":["linux","darwin","win32"],"configPaths":["~/kimi/"]}}
When to Use
User needs Kimi to work reliably for chat, coding, long-context research, structured outputs, or agent workflows. Agent handles live model verification, request shaping, migration from other OpenAI-compatible providers, and failure recovery before the workflow is trusted.
Architecture
Memory lives in ~/kimi/. If ~/kimi/ does not exist, run setup.md. See memory-template.md for structure.
~/kimi/
βββ memory.md # Status, activation rules, and stable defaults
βββ routes.md # Preferred route per workload
βββ approvals.md # Sensitive-send boundaries and redaction preferences
βββ experiments.md # Prompt, parser, and fallback notes
βββ logs/ # Optional sanitized repro payloads
Quick Reference
Use the smallest file that resolves the blocker.
| Topic | File |
|-------|------|
| Setup process | setup.md |
| Memory template | memory-template.md |
| Minimal request patterns | api-patterns.md |
| Workload routing choices | routing-matrix.md |
| OpenAI-compatible migration | migration-playbook.md |
| Trust and redaction workflows | safety-workflows.md |
| Fast diagnosis and recovery | troubleshooting.md |
Requirements
curl and jq for minimal endpoint checksMOONSHOT_API_KEY kept in environment variables onlyCore Rules
1. Verify Auth and Live Models Before Naming Any Route
https://api.moonshot.ai/v1/models and copy live model IDs from the response.2. Lock the Job to One Workload Before Tuning Prompts
3. Treat Structured Output as a Separate Reliability Path
4. Keep Sensitive Data Out Unless the User Explicitly Approves It
~/kimi/approvals.md after confirming the first write.5. Route by Deadline and Cost, Not Brand Habit
6. Separate Provider Migration Problems From Model Problems
7. Ask Before Creating Persistent State
~/kimi/ notes, approvals, or debug logs after the user wants continuity across Kimi tasks.Common Traps
/models and use the live ID instead.External Endpoints
Use only the official Moonshot API surface required for the current task.
| Endpoint | Data Sent | Purpose | |----------|-----------|---------| | https://api.moonshot.ai/v1/models | Auth header only | Discover live Kimi models | | https://api.moonshot.ai/v1/chat/completions | Prompt messages and options | Kimi chat, reasoning, coding, and structured-output requests |
No other data is sent externally.
Security & Privacy
Data that leaves your machine:
Data that stays local:
~/kimi/ after user approvalThis skill does NOT:
MOONSHOT_API_KEY in markdown or project filesScope
This skill ONLY:
This skill NEVER:
~/kimi/Trust
Using this skill sends prompt data to Moonshot's Kimi API. Only install if you trust Moonshot with that data, or keep sensitive preprocessing local and sanitized.
Related Skills
Install withclawhub install if user confirms:
api β debug auth, payloads, retries, and OpenAI-compatible request shapesmodels β compare model families and cost tiers before locking Kimi into productioncoding β tighten coding-agent behavior after the Kimi route itself is stablebackend β connect Kimi workflows to services, jobs, and API boundariesfastapi β expose Kimi-backed endpoints with request validation and safer deployment defaultsFeedback
clawhub star kimiclawhub syncβ‘ When to Use
User needs Kimi to work reliably for chat, coding, long-context research, structured outputs, or agent workflows. Agent handles live model verification, request shaping, migration from other OpenAI-compatible providers, and failure recovery before the workflow is trusted.