skillfree 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/SKILL.md +58 -9
  2. package/package.json +3 -2
  3. package/postinstall.js +59 -0
package/SKILL.md CHANGED
@@ -2,36 +2,85 @@
2
2
 
3
3
  ## 功能
4
4
 
5
- SkillFree 是一个统一的 AI 能力调用层。通过一个 API Key,调用图像生成、语音合成、视频生成、智能对话等多种 AI 能力。
5
+ SkillFree 是一个统一的 AI 能力调用层。通过一个 API Key,调用对话、图像生成、语音合成、视频生成、音乐生成、文档 OCR、向量 Embedding 等 56 个模型。
6
6
 
7
7
  ## 使用方式
8
8
 
9
+ ### 对话(chat)
9
10
  ```bash
10
- # 对话(1 积分)
11
11
  skillfree pilot --type chat --prompt "帮我写一首诗"
12
+ skillfree pilot --type chat --model claude-sonnet-4-6 --prompt "分析一下最近的 AI 趋势"
13
+ ```
12
14
 
13
- # 图像生成(5 积分)
15
+ ### 图像生成(image)
16
+ ```bash
14
17
  skillfree pilot --type image --prompt "赛博朋克的上海" --output ./out.png
18
+ skillfree pilot --type image --model doubao-seedream-5.0-lite --prompt "一只龙虾" --output ./lobster.png
19
+ ```
15
20
 
16
- # 语音合成(2 积分)
21
+ ### 语音合成(tts)
22
+ ```bash
17
23
  skillfree pilot --type tts --text "你好,龙虾" --output hello.mp3
24
+ ```
18
25
 
19
- # 视频生成(20 积分)
26
+ ### 视频生成(video)
27
+ ```bash
20
28
  skillfree pilot --type video --prompt "海浪拍打礁石" --output ./video.mp4
21
29
  ```
22
30
 
23
- ## 配置
31
+ ### 音乐生成(music)
32
+ ```bash
33
+ skillfree pilot --type music --prompt "轻松欢快的背景音乐" --output ./bgm.mp3
34
+ ```
24
35
 
36
+ ### 查看所有模型
25
37
  ```bash
26
- export SKILLFREE_API_KEY=sk-sf-xxxxxxxx
38
+ skillfree models
27
39
  ```
28
40
 
29
- 或通过登录:
41
+ ### 查看余额
42
+ ```bash
43
+ skillfree balance
44
+ ```
45
+
46
+ ## 积分参考(2026-03 定价)
47
+
48
+ | 类型 | 模型 | 积分/次 |
49
+ |------|------|---------|
50
+ | chat | DeepSeek V3.2 Fast | 1 |
51
+ | chat | Kimi K2.5 | 1 |
52
+ | chat | Gemini 2.5 Pro | 7 |
53
+ | chat | GPT-5.4 | 9 |
54
+ | chat | Claude Sonnet 4.6 | 12 |
55
+ | chat | Claude Opus 4.6 | 59 |
56
+ | image | 即梦 Seedream 5.0 Lite | 11 |
57
+ | image | Gemini 3 Pro Image | 54 |
58
+ | tts | MiniMax TTS 2.8 HD | 18 |
59
+ | video | 拍我 5.6 文生视频 | 160 |
60
+ | video | 可灵 2.6 文生视频 | 427 |
61
+ | music | MiniMax Music 2.5 | 80 |
62
+ | music | Suno V5 | 107 |
63
+ | ocr | 合合图文混排解析 | 3 |
64
+ | embedding | 豆包 Embedding Vision | 1 |
65
+
66
+ 最新定价以 https://skillfree.tech/app/models 为准。
67
+
68
+ ## 配置
30
69
 
31
70
  ```bash
71
+ # 方式一:登录(推荐)
32
72
  skillfree auth login
73
+
74
+ # 方式二:环境变量
75
+ export SKILLFREE_API_KEY=sk-sf-xxxxxxxx
76
+
77
+ # 方式三:直接调用 API
78
+ curl https://skillfree.tech/v1/chat/completions \
79
+ -H "Authorization: Bearer sk-sf-xxxxxxxx" \
80
+ -H "Content-Type: application/json" \
81
+ -d '{"model":"DeepSeek-V3.2-Fast","messages":[{"role":"user","content":"你好"}]}'
33
82
  ```
34
83
 
35
84
  ## 充值
36
85
 
37
- 充多少用多少,积分永不过期:https://skillfree.tech/billing
86
+ 充多少用多少,积分永不过期:https://skillfree.tech/app/billing
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "skillfree",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "🦞 一个 API,满足所有龙虾技能需求",
5
5
  "main": "bin/skillfree.js",
6
6
  "bin": {
7
7
  "skillfree": "./bin/skillfree.js"
8
8
  },
9
9
  "scripts": {
10
- "test": "node bin/skillfree.js --help"
10
+ "test": "node bin/skillfree.js --help",
11
+ "postinstall": "node postinstall.js"
11
12
  },
12
13
  "keywords": [
13
14
  "ai",
package/postinstall.js ADDED
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * postinstall.js
4
+ * npm install -g skillfree 后自动将技能文件部署到 ~/.agents/skills/skillfree/
5
+ */
6
+
7
+ const fs = require('fs')
8
+ const path = require('path')
9
+ const os = require('os')
10
+
11
+ const SKILL_DIR = path.join(os.homedir(), '.agents', 'skills', 'skillfree')
12
+ const PKG_DIR = __dirname // 本文件在包根目录
13
+
14
+ // 需要复制到 skill 目录的文件
15
+ const FILES = ['SKILL.md', 'package.json']
16
+ const DIRS = ['bin', 'scripts']
17
+
18
+ function copyDir(src, dest) {
19
+ fs.mkdirSync(dest, { recursive: true })
20
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
21
+ const srcPath = path.join(src, entry.name)
22
+ const destPath = path.join(dest, entry.name)
23
+ if (entry.isDirectory()) {
24
+ copyDir(srcPath, destPath)
25
+ } else {
26
+ fs.copyFileSync(srcPath, destPath)
27
+ }
28
+ }
29
+ }
30
+
31
+ try {
32
+ fs.mkdirSync(SKILL_DIR, { recursive: true })
33
+
34
+ // 复制文件
35
+ for (const f of FILES) {
36
+ const src = path.join(PKG_DIR, f)
37
+ if (fs.existsSync(src)) {
38
+ fs.copyFileSync(src, path.join(SKILL_DIR, f))
39
+ }
40
+ }
41
+
42
+ // 复制目录(排除 node_modules)
43
+ for (const d of DIRS) {
44
+ const src = path.join(PKG_DIR, d)
45
+ if (fs.existsSync(src)) {
46
+ copyDir(src, path.join(SKILL_DIR, d))
47
+ }
48
+ }
49
+
50
+ // 写一个 config 标记已安装
51
+ fs.writeFileSync(
52
+ path.join(SKILL_DIR, '.skillfree-installed'),
53
+ JSON.stringify({ installedAt: new Date().toISOString(), version: require('./package.json').version }, null, 2) + '\n'
54
+ )
55
+
56
+ console.log('✅ SkillFree skill 已安装到 ~/.agents/skills/skillfree/')
57
+ } catch (e) {
58
+ // 静默失败,不影响正常安装
59
+ }