← 返回 Skills 市场
del-zhenwu

PostMe Deploy

作者 del-zhenwu · GitHub ↗ · v1.0.3 · MIT-0
cross-platform ✓ 安全检测通过
156
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install postme-deploy
功能描述
Deploy local HTML/frontend files to PostMe (dele.fun) and get a live URL
使用说明 (SKILL.md)

PostMe Deploy Skill

Overview

This skill allows AI Agents (OpenClaw, Cursor, Claude, etc.) to automatically deploy generated HTML files or frontend project folders to PostMe (https://www.dele.fun) — a static site hosting platform. It returns a live URL that can be shared with the user.

Required Environment Variables

Variable Description
POSTME_API_KEY Required. Your PostMe API key for authentication. Get one at https://www.dele.fun/api-keys
POSTME_API_URL Optional. Defaults to https://www.dele.fun/api/upload

Prerequisites

  1. PostMe API Key: Generate an API key at https://www.dele.fun/api-keys, then set it as an environment variable:

    POSTME_API_KEY="your-secret-agent-key"
    
  2. Python Dependencies: The skill requires the requests library.

    pip install requests
    

Usage Instructions for the Agent

When a user asks you to deploy, publish, or share a web application (like an HTML file or a frontend project folder) that you have just created, you should use this skill.

  1. Determine the absolute path to the generated folder or file (target_path).
  2. Invent a suitable, URL-friendly name for the application (app_name). It must contain only lowercase letters, numbers, and hyphens.
  3. Call the postme_deploy skill with these parameters.
  4. Present the resulting URL to the user.

Example

If you generated a project in /tmp/workspace/my-app, you would call the skill with:

  • target_path: /tmp/workspace/my-app
  • app_name: my-app-v1

The skill will return a success message containing the live URL, e.g., Deployment successful! URL: https://www.dele.fun/app/my-app-v1/.

Tool Definition

{
  "name": "postme_deploy",
  "description": "Deploy a local folder or HTML file to the PostMe system to get a live web URL.",
  "parameters": {
    "type": "object",
    "properties": {
      "target_path": {
        "type": "string",
        "description": "The local path to the folder or HTML file you want to deploy."
      },
      "app_name": {
        "type": "string",
        "description": "A unique, URL-friendly name for the application (lowercase letters, numbers, hyphens only)."
      },
      "api_url": {
        "type": "string",
        "description": "The full URL to the PostMe /api/upload endpoint. Defaults to https://www.dele.fun/api/upload"
      },
      "api_key": {
        "type": "string",
        "description": "The API key for authentication (POSTME_API_KEY)."
      },
      "app_desc": {
        "type": "string",
        "description": "A short description of what the application does."
      }
    },
    "required": [
      "target_path",
      "app_name"
    ]
  }
}

Python Implementation (postme_deploy.py)

import os
import requests
import re
from typing import Optional

def execute(
    target_path: str, 
    app_name: str, 
    api_url: str = "https://www.dele.fun/api/upload", 
    api_key: Optional[str] = None,
    app_desc: Optional[str] = None
) -> str:
    """
    Deploy a local folder or HTML file to the PostMe system.
    """
    if not os.path.exists(target_path):
        return f"Error: Target path '{target_path}' does not exist."
        
    if not re.match(r'^[a-z0-9-]+$', app_name):
        return "Error: app_name must contain only lowercase letters, numbers, and hyphens."

    files_to_upload = []
    
    if os.path.isfile(target_path):
        files_to_upload.append((target_path, os.path.basename(target_path)))
    elif os.path.isdir(target_path):
        for root, _, files in os.walk(target_path):
            for file in files:
                file_path = os.path.join(root, file)
                rel_path = os.path.relpath(file_path, target_path).replace(os.sep, '/')
                files_to_upload.append((file_path, rel_path))
    else:
        return f"Error: '{target_path}' is neither a file nor a directory."

    if not files_to_upload:
        return "Error: No files found to upload."

    multipart_data = [('appName', (None, app_name))]
    if app_desc:
        multipart_data.append(('appDesc', (None, app_desc)))
        
    file_handles = []
    try:
        for file_path, rel_path in files_to_upload:
            f = open(file_path, 'rb')
            file_handles.append(f)
            multipart_data.append(('files', (os.path.basename(file_path), f)))
            multipart_data.append(('paths', (None, rel_path)))

        headers = {}
        if api_key:
            headers['Authorization'] = f"Bearer {api_key}"
            headers['x-agent-user'] = "openclaw-agent"

        response = requests.post(api_url, files=multipart_data, headers=headers)
        
        if response.status_code in (200, 201):
            data = response.json()
            base_url = api_url.replace('/api/upload', '')
            return f"Deployment successful! URL: {base_url}{data.get('url', f'/app/{app_name}/')}"
        else:
            try:
                err_msg = response.json().get('error', response.text)
            except:
                err_msg = response.text
            return f"Deployment failed (Status {response.status_code}): {err_msg}"
            
    except Exception as e:
        return f"Error during deployment: {str(e)}"
    finally:
        for f in file_handles:
            f.close()
安全使用建议
This skill does what it says: it will read files under whatever path you pass it and upload them to the PostMe API using a POSTME_API_KEY. Before installing or enabling it: (1) confirm the skill's source/trustworthiness (homepage is missing), (2) only provide a target_path that contains non-sensitive files (do not point it at your home directory), (3) store the POSTME_API_KEY in a secure place and consider using a scoped/temporary key if PostMe supports it, (4) be aware the registry metadata incorrectly lists no required env vars — rely on the SKILL.md, and (5) if you want extra safety, test with a dummy key and non-sensitive sample content first and rotate the API key afterwards.
功能分析
Type: OpenClaw Skill Name: postme-deploy Version: 1.0.3 The skill is a legitimate deployment tool designed to upload HTML or frontend project files to the PostMe hosting service (dele.fun). The Python implementation (postme_deploy.py) correctly handles file traversal and multipart uploads using the requests library, and the SKILL.md instructions provide clear, non-malicious guidance for the AI agent to assist users with web deployment.
能力评估
Purpose & Capability
The skill declares and implements a deploy-to-PostMe workflow: it reads local files, bundles them, and POSTs them to a PostMe upload endpoint. Requiring a POSTME_API_KEY and optionally POSTME_API_URL is proportionate for that purpose. One inconsistency: the registry metadata above says "Required env vars: none" while SKILL.md explicitly requires POSTME_API_KEY — this appears to be a metadata oversight.
Instruction Scope
The SKILL.md instructs the agent to determine an absolute target_path and upload every file found under it. That scope is appropriate for deploying a project folder, but the allowed-tools (read(*), glob(*)) and the implementation mean the agent could read and upload any path the caller supplies. The instructions do not attempt to read unrelated system configuration or credentials.
Install Mechanism
This is an instruction-only skill with no install spec and no remote downloads. It mentions a normal Python dependency (requests) which the README asks the operator to pip install; there is no embedded/install-time network fetch of arbitrary code.
Credentials
The skill requires a single service credential (POSTME_API_KEY) and optionally a custom API URL — both are expected for an API-based deployer. The required secret is proportional, but because it is sensitive, you should only set it for a trusted agent and consider scoping or rotating the key. Also note the registry metadata does not reflect this required env var, which could confuse users.
Persistence & Privilege
The skill does not request permanent/always-on presence (always: false) and does not modify other skills or system-wide config. Autonomous invocation is permitted by default (disable-model-invocation: false) which is normal for skills; combine this with the fact the skill can read local paths only when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install postme-deploy
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /postme-deploy 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
- Added a skill metadata header (YAML frontmatter) specifying name, description, allowed-tools, and environment variables. - No changes made to the code or usage instructions. - Environment variable requirements now clearly listed in the metadata section at the top. - No functional changes in this version; documentation and metadata update only.
v1.0.2
No user-facing or code changes in this release. - Version bumped to 1.0.2 with no file changes detected.
v1.0.1
- Renamed the main skill file from "skill.md" to "SKILL.md". - Migrated branding and endpoint references from "ClawSync" to "PostMe", updating API names, key variables, and default URLs. - Changed the skill and tool names from "clawsync_deploy" to "postme_deploy". - Updated documentation and code samples to reflect the new service (PostMe) and its configuration. - Set the default API endpoint to "https://www.dele.fun/api/upload".
v1.0.0
Initial release of the ClawSync Deploy Skill. - Deploys local HTML files or frontend project folders to the ClawSync platform, returning a live URL. - Includes validation of file paths and URL-friendly app names. - Supports deployment via configurable API endpoint and API key authentication. - Allows optional project description. - Handles both files and full directories, with clear error messages for invalid operations.
元数据
Slug postme-deploy
版本 1.0.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

PostMe Deploy 是什么?

Deploy local HTML/frontend files to PostMe (dele.fun) and get a live URL. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 156 次。

如何安装 PostMe Deploy?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install postme-deploy」即可一键安装,无需额外配置。

PostMe Deploy 是免费的吗?

是的,PostMe Deploy 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

PostMe Deploy 支持哪些平台?

PostMe Deploy 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 PostMe Deploy?

由 del-zhenwu(@del-zhenwu)开发并维护,当前版本 v1.0.3。

💬 留言讨论