Skip to content

LeoYeAI/agent-master-skills / skills/awesome-poetize-open-blog-automation

poetize-blog-automation

Verified

专为开源版 awesome-poetize-open 设计的 POETIZE 博客自动化技能。通过 `/api/api/*` 接口完成文章发布、更新、隐藏、分类标签维护、主题切换、数据分析和 SEO 运维。Use only when the task explicitly targets a POETIZE site or POETIZE admin API workflow. Do not use for generic writing, generic SEO advice, or non-POETIZE CMS work.

scripts/openclaw_smoke_test.py

View on GitHub
#!/usr/bin/env python3
"""Run a read-only smoke test for the Poetize OpenClaw skill runtime contract."""

from __future__ import annotations

import argparse
import json
import os
from typing import Any

from manage_blog import build_url
from publish_post import normalize_base_url, request_json


def parse_args() -> argparse.Namespace:
    parser = argparse.ArgumentParser(
        description="Validate the Poetize OpenClaw skill wiring with a read-only API call."
    )
    parser.add_argument(
        "--base-url",
        default=os.getenv("POETIZE_BASE_URL"),
        help="Poetize base URL. Defaults to POETIZE_BASE_URL.",
    )
    parser.add_argument(
        "--api-key",
        default=os.getenv("POETIZE_API_KEY"),
        help="Poetize API key. Defaults to POETIZE_API_KEY.",
    )
    parser.add_argument(
        "--size",
        type=int,
        default=1,
        help="How many articles to request in the read-only list call.",
    )
    parser.add_argument(
        "--search-key",
        help="Optional search filter passed to list-articles.",
    )
    return parser.parse_args()


def die(message: str, code: int = 1) -> None:
    print(message, file=sys.stderr)
    raise SystemExit(code)


def extract_records(response: dict[str, Any]) -> list[dict[str, Any]]:
    data = response.get("data")
    if isinstance(data, dict):
        records = data.get("records")
        if isinstance(records, list):
            return [item for item in records if isinstance(item, dict)]
    return []


def main() -> None:
    args = parse_args()
    base_url = normalize_base_url(str(args.base_url or ""))
    api_key = str(args.api_key or "").strip()

    if not base_url:
        die("Missing --base-url or POETIZE_BASE_URL.")
    if not api_key:
        die("Missing --api-key or POETIZE_API_KEY.")

    params: dict[str, Any] = {"current": 1, "size": args.size}
    if args.search_key:
        params["searchKey"] = args.search_key

    checked_endpoint = build_url(base_url, "/api/api/article/list", params)
    response = request_json(
        "GET",
        checked_endpoint,
        api_key,
    )
    if response.get("code") != 200:
        die(
            "Smoke test API call did not return code 200:\n"
            + json.dumps(response, ensure_ascii=False, indent=2)
        )

    records = extract_records(response)
    summary = {
        "status": "ok",
        "checkedEndpoint": checked_endpoint,
        "baseUrl": base_url,
        "recordsReturned": len(records),
        "responseCode": response.get("code"),
        "responseMessage": response.get("message"),
    }
    print(json.dumps(summary, ensure_ascii=False, indent=2))


if __name__ == "__main__":
    main()
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall