agentsclimarketplace

Kimi use

Skill cnlangzi/kimi-use

Kimi AI tools for Node.js - chat, image understanding, translation, web search. Use when you need LLM capabilities with Kimi models.From its SKILL.md

Install
npx -y skills add cnlangzi/kimi-use

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.3 KB, 928 tokens by cl100k_base, as published. Nobody here has run it

Kimi Use - Node.js AI Tools

Kimi AI 工具集,提供对话、图像理解、翻译、搜索等功能。Node.js 实现。

统一接口(与其他 provider 接口一致)

import { chat, translate, understandImage, webSearch } from 'kimi-use/scripts/index.js';

// 对话
await chat('你好');                              // 简单对话
await chat('写代码', { model: 'kimi-for-coding' });  // 指定模型
await chat('继续', { history: [{role:'user',content:'你好'}] }); // 带历史

// 图像理解
await understandImage('图片里有什么?', '/path/to/image.jpg');
await understandImage('描述这张图', 'https://example.com/image.jpg');

// 翻译
await translate('hello', { to: 'Chinese' });
await translate('你好', { to: 'English', from: 'zh' });

// 搜索(基于模型知识库)
await webSearch('今日新闻');

返回格式

// 成功
{ success: true, result: { content: '...' } }

// 失败
{ success: false, error: 'error message' }

CLI 用法

# 对话
node scripts/index.js chat "你好"

# 图像理解
node scripts/index.js image "描述图片" /path/to/image.jpg

# 翻译
node scripts/index.js translate "hello" --to Chinese

# 搜索
node scripts/index.js search "news"

环境变量

变量默认值说明
KIMI_API_KEY-必填,API Key
KIMI_API_HOSThttps://api.kimi.com/codingAPI 端点
KIMI_MODELkimi-for-coding对话模型
KIMI_VISION_MODELkimi-vl-flash视觉模型

获取 API Key: https://www.kimi.com/code/user-center/basic-information/interface-key

函数签名

chat(message, opts)

参数类型默认值说明
messagestring-用户消息
opts.systemstringnull系统提示
opts.modelstringkimi-for-coding模型名
opts.temperaturenumber1.0温度 0-1
opts.max_tokensnumber4096最大 token
opts.streambooleanfalse流式输出
opts.historyarraynull历史记录

understandImage(prompt, imagePath, opts)

参数类型默认值说明
promptstring-关于图片的问题
imagePathstring-图片路径或 URL
opts.modelstringkimi-vl-flash视觉模型
opts.temperaturenumber0.3温度
opts.max_tokensnumber300最大 token

translate(text, opts)

参数类型默认值说明
textstring-待翻译文本
opts.tostringEnglish目标语言
opts.fromstringauto源语言
opts.modelstringkimi-for-coding模型名

webSearch(query, opts)

参数类型默认值说明
querystring-搜索查询
opts.modelstringkimi-for-coding模型名

安装依赖

cd ~/workspace/skills/kimi-use
npm install

What ships with it: 3 files

10.3 KB alongside SKILL.md, 1 of them executable

scripts/

Keep looking

Skills are one crate of 326,422. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.