mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-06-06 05:50:41 +08:00
## Summary
- 将所有技能文件中的硬编码 `~/.desirecore/` 和 `$HOME/.desirecore/` 路径替换为
`${DESIRECORE_ROOT}/` 变量
- 递增 manifest.json version 至 1.2.1
## Why
dev 模式下 `DESIRECORE_HOME=~/.desirecore-dev`,硬编码路径导致技能读取错误的端口文件和目录。主仓库的
`variable-substitutor.ts` 会在运行时将 `${DESIRECORE_ROOT}` 替换为实际根目录。
## Test plan
- [ ] `npm run dev` 启动后触发任意技能,确认端口路径解析为
`~/.desirecore-dev/agent-service.port`
- [ ] prod 模式确认路径为 `~/.desirecore/agent-service.port`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
5.1 KiB
5.1 KiB
name, description, license, version, type, risk_level, status, disable-model-invocation, provider, tags, requires, metadata, market
| name | description | license | version | type | risk_level | status | disable-model-invocation | provider | tags | requires | metadata | market | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| minimax-image-gen | Use this skill when the user wants to generate images using MiniMax's image-01 model. Supports text-to-image and subject reference for character consistency. Use when 用户提到 生成图片、画图、文生图、创建图片、 AI 绘画、生成插图、画一张、帮我画、设计图片、MiniMax 画图。 | Complete terms in LICENSE.txt | 1.3.1 | procedural | low | enabled | true | minimax |
|
|
|
|
minimax-image-gen Skill
Mandatory Rules (violations will cause feature failure)
- Must use
"response_format": "url"—"base64"is forbidden, base64 will cause output truncation - Must access agent-service over HTTPS —
https://127.0.0.1:${PORT}with-kto skip certificate verification - Must upload to media-store via
/api/media/upload— saving to local paths is forbidden - Must use the
dc-media://protocol to display images — the only way the frontend can render correctly - Use Bash curl throughout — do not use the HttpRequest tool or Python
Complete Execution Flow (strictly follow these three steps)
Step 1: Call the API to generate the image
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
-d '{
"providerId": "provider-minimax-media-001",
"endpoint": "/image_generation",
"body": {
"model": "image-01",
"prompt": "这里替换为英文图片描述",
"aspect_ratio": "1:1",
"response_format": "url",
"n": 1
},
"responseType": "json"
}'
Extract data.data.image_urls[0] from the JSON response to obtain the image URL.
Step 2: Download and upload to media-store
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
IMAGE_URL="第一步拿到的图片URL"
curl -sL "$IMAGE_URL" -o /tmp/minimax-gen.png && \
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media/upload" \
-F "file=@/tmp/minimax-gen.png;type=image/png"
Extract the mediaId field from the JSON response (format like xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.png).
Step 3: Display the image with the dc-media protocol
Write Markdown image syntax directly in your reply text:

For example: 
The frontend will automatically convert dc-media:// into an accessible image URL and render it.
Parameter Mapping
| User Intent | aspect_ratio |
|---|---|
| Square / avatar | "1:1" |
| Landscape / scenery / wallpaper | "16:9" |
| Portrait / phone / poster | "9:16" |
| Standard photo | "4:3" |
| Portrait photo | "3:4" |
Subject Reference (character consistency)
Add subject_reference in the body:
"subject_reference": [
{ "type": "character", "image_file": { "url": "参考图片URL" } }
]
Error Handling
"error": "未找到匹配的供应商": MiniMax Media Provider not configuredstatusCode: 401: Invalid API KeystatusCode: 429: Rate limited, retry later