Token导航 LogoToken导航TokenDH.com
图像处理敏感数据github未标认证来源可访问许可证需确认审计提醒

maliang-image马良图片

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

216

周安装

9

GitHub Stars

公开资料未说明

下载量

72
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:maliang-image(马良图片)
来源仓库:https://github.com/xexojay/maliang-image
仓库路径:skills/maliang-image
安装命令:
npx skills add https://github.com/xexojay/maliang-image --skill maliang-image
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/xexojay/maliang-image --skill maliang-image

简介

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。

  • 适合根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。
  • 使用时需确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时应额外核对授权、真实性和内容合规边界。
  • 安装命令:npx skills add https://github.com/xexojay/maliang-image --skill maliang-image。
  • 建议确认权限范围和维护状态,避免误改生产数据或触发不必要联网。

SKILL.md

Maliang Image — AI Image Generation & Editing

Provider: Maliang API (nano.djdog.ai) Model: Google Gemini (image generation & editing) Pricing: Returned dynamically by the API. Free credit on first use.

What it does

Generate images from text descriptions or edit existing images using AI.

  • No images provided → text-to-image generation
  • Images provided → AI image editing / inpainting (1–10 reference images, user-provided only)

Security & Data Handling

  • API Key: Auto-provisioned on first use and stored locally at ~/.config/maliang/. One account per machine (identified by hostname), persisted across all sessions. You can revoke it at any time.
  • Images: Only images explicitly provided by the user are sent to the API. The skill never reads files unless the user specifies the file path. All uploads go over HTTPS.
  • No data collection: The API processes your request and returns results. Images are not stored permanently on the server.

Inputs needed

InputSourceRequired
Text promptUser messageYES
Reference imagesUser provides file paths or URLsNO (if omitted, generates from text)
Aspect ratioUser preferenceNO (default: 1:1)

API Key Management (Persistent, One Account Per Machine)

The API key and short code are stored in persistent files so they survive across sessions. NEVER provision a new key if one already exists and is valid.

Step 0 — Load or provision API key

# 1. Check persistent key file first
CONFIG_DIR="$HOME/.config/maliang"
KEY_FILE="$CONFIG_DIR/api_key"
CODE_FILE="$CONFIG_DIR/short_code"

MALIANG_API_KEY=""
MALIANG_SHORT_CODE=""

if [ -f "$KEY_FILE" ]; then
  MALIANG_API_KEY=$(cat "$KEY_FILE")
fi
if [ -f "$CODE_FILE" ]; then
  MALIANG_SHORT_CODE=$(cat "$CODE_FILE")
fi

# 2. If no key exists, provision with machine_id for idempotency
if [ -z "$MALIANG_API_KEY" ]; then
  mkdir -p "$CONFIG_DIR"
  MACHINE_ID=$(hostname)
  PROVISION_RESULT=$(curl -s -X POST "https://nano.djdog.ai/api/v1/provision" \
    -H "Content-Type: application/json" \
    -d "{\"machine_id\": \"$MACHINE_ID\"}")
  MALIANG_API_KEY=$(echo "$PROVISION_RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['api_key'])")
  MALIANG_SHORT_CODE=$(echo "$PROVISION_RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['short_code'])")
  echo "$MALIANG_API_KEY" > "$KEY_FILE"
  echo "$MALIANG_SHORT_CODE" > "$CODE_FILE"
  chmod 600 "$KEY_FILE"
  # Show the user their short code and balance from PROVISION_RESULT
fi

IMPORTANT: Always read from ~/.config/maliang/api_key first. Only call /api/v1/provision if the file does not exist. The machine_id (hostname) ensures that even if the key file is lost, the same machine reconnects to the same account without getting extra credit.

Verify existing key (401 recovery)

If the key file exists but API returns 401, the key may be invalid. Re-provision with machine_id — this will reconnect to the existing account (no new credit):

# If 401 error, re-provision with machine_id
rm -f "$KEY_FILE" "$CODE_FILE"
MACHINE_ID=$(hostname)
PROVISION_RESULT=$(curl -s -X POST "https://nano.djdog.ai/api/v1/provision" \
  -H "Content-Type: application/json" \
  -d "{\"machine_id\": \"$MACHINE_ID\"}")
MALIANG_API_KEY=$(echo "$PROVISION_RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['api_key'])")
MALIANG_SHORT_CODE=$(echo "$PROVISION_RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['short_code'])")
echo "$MALIANG_API_KEY" > "$KEY_FILE"
echo "$MALIANG_SHORT_CODE" > "$CODE_FILE"
chmod 600 "$KEY_FILE"

Balance Check

After each task, check remaining balance:

curl -s "https://nano.djdog.ai/api/v1/balance" \
  -H "Authorization: Bearer ${MALIANG_API_KEY}"

Response includes short_code for recharge reference. If balance is low, remind the user:

Your balance is $X.XX. To recharge, visit: https://nano.djdog.ai/recharge/{short_code}

View status

To show the user their account status at any time:

echo "Key prefix: ${MALIANG_API_KEY:0:11}..."
echo "Short code: $MALIANG_SHORT_CODE"
# Then call the balance endpoint above to show current balance

Workflow

Step 1 — Determine mode

  • If the user provides one or more images (file paths, URLs, or pasted base64): edit mode
  • Otherwise: generate mode

Step 2 — Prepare images (edit mode only)

For each image the user provides:

  1. If it is a local file path, read and base64-encode it.
  2. If it is a URL, download it first, then base64-encode.
  3. Strip any data:image/...;base64, prefix — the API accepts raw base64.
  4. Verify each image is under 10 MB after decoding.
  5. Maximum 10 images total.

Step 3 — Submit task

Generate mode — call:

curl -s -X POST "https://nano.djdog.ai/api/v1/generate" \
  -H "Authorization: Bearer ${MALIANG_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "<user prompt>",
    "aspect_ratio": "<ratio, default 1:1>"
  }'

Edit mode — call:

curl -s -X POST "https://nano.djdog.ai/api/v1/edit" \
  -H "Authorization: Bearer ${MALIANG_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "<user editing instruction>",
    "image": "<base64 string or array of base64 strings>",
    "aspect_ratio": "<ratio, optional>"
  }'

Both return:

{
  "success": true,
  "data": {
    "task_id": "...",
    "status": "pending",
    "created_at": "..."
  }
}

Extract task_id from the response.

Step 4 — Poll for result

Poll every 3 seconds, up to 120 seconds max:

curl -s "https://nano.djdog.ai/api/v1/tasks/${TASK_ID}" \
  -H "Authorization: Bearer ${MALIANG_API_KEY}"

Response data.status values:

StatusMeaningAction
pendingQueuedKeep polling
processingGeneratingKeep polling
completedDoneGet image from image_url or image_base64
failedErrorShow error.message to user
deadMax retries exceededShow error, suggest retry

Step 5 — Deliver result

When status is completed:

  • If image_url is present: show the URL to the user (preferred).
  • If only image_base64 is present: save to a local file and show the path.

Output format

Image generated successfully!
URL: https://...
Aspect ratio: 1:1
Prompt: "<original prompt>"

Guardrails

  • NEVER provision a new key if ~/.config/maliang/api_key already exists and is valid. One machine = one account.
  • Never fabricate task IDs or image URLs. Only use values from API responses.
  • Never poll more than 40 times (120 seconds). If not completed, tell the user it is still processing and provide the task ID for manual checking.
  • Do not send images larger than 10 MB to the edit endpoint.
  • Do not send more than 10 images to the edit endpoint.
  • If the API returns 402 (INSUFFICIENT_BALANCE), tell the user their balance is low and they need to recharge.
  • Prompt max length is 4000 characters. If the user's prompt is longer, ask them to shorten it.

Failure handling

ErrorAction
401 UnauthorizedKey may be invalid. Re-provision with machine_id (see "Verify existing key" above). This reconnects to the same account — no extra credit.
402 Insufficient BalanceTell user to recharge via https://nano.djdog.ai/recharge/{short_code} (get short_code from balance endpoint or ~/.config/maliang/short_code)
400 IMAGE_TOO_LARGETell user the image exceeds 10 MB limit
400 TOO_MANY_IMAGESTell user max 10 images allowed
Network errorRetry once, then report failure
Timeout (120s)Report task ID, suggest checking later

Examples

Text-to-image:

User: Generate a cute orange cat sitting on a windowsill at sunset, anime style
→ Load key from ~/.config/maliang/api_key (or provision if first use)
→ POST /api/v1/generate with prompt → poll for result → return image URL

Image editing:

User: Change the background of this photo to a beach scene [attaches photo]
→ Base64-encode the photo
→ POST /api/v1/edit with prompt + image, poll for result, return image URL

Multi-image editing:

User: Combine these character designs into one group portrait [attaches 3 images]
→ Base64-encode all 3 images
→ POST /api/v1/edit with prompt + image array, poll for result, return image URL

适合场景

01

文本生成图片

02

图片风格化

03

产品图和创意图

04

需要 FLUX 模型时

能力概览

能力 1

调用 FLUX 图像模型

能力 2

支持文本生图和图像改写

能力 3

覆盖 LoRA 或风格适配

能力 4

适合创意视觉生成

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.47%
按下载量换算26

Claude

27.84%
按下载量换算20

Cursor

18.53%
按下载量换算13

Gemini CLI

8.18%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills