简介
Panews Creator
原始描述
Create and manage articles on the PANews platform. All operations require a valid user session. Triggers: write and publish new articles, view / edit / delet...
通过你的 Agent 添加
安装目录:panews-creator/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: panews-creator description: PANews creator workflow — authenticate, manage column applications, upload images, and create or submit articles. Requires PA-User-Session. Use panews for public read-only access instead. metadata: author: Seven Du version: "2026.03.16"
Authenticated creator workflow via https://universal-api.panewslab.com. All endpoints require a PA-User-Session header.
When to Use
- The task needs an authenticated creator session
- The user wants to check creator eligibility, manage a column application, upload images, or create/update/delete an article
- The task changes PANews state
Do Not Use When
- The task is public read-only article or ranking lookup
- The user wants a rendered PANews webpage instead of creator API actions
- There is no valid
PA-User-Session and the request cannot proceed without one
Language
Language
Value
Simplified Chinese
zh
Traditional Chinese
zh-hant
English
en
Japanese
ja
Korean
ko
Standard Workflow
- Validate session →
get-current-user
- Get full context →
get-creator-context
- No approved column → run column application flow (
apply-column)
- Has approved column → search tags (
GET /tags) → convert Markdown to HTML → execute article operations
- The task is public read-only article or ranking lookup
- The user wants a rendered PANews webpage instead of creator API actions
- There is no valid
PA-User-Sessionand the request cannot proceed without one
Language
Language
Value
Simplified Chinese
zh
Traditional Chinese
zh-hant
English
en
Japanese
ja
Korean
ko
Standard Workflow
- Validate session →
get-current-user
- Get full context →
get-creator-context
- No approved column → run column application flow (
apply-column)
- Has approved column → search tags (
GET /tags) → convert Markdown to HTML → execute article operations
| Language | Value |
|---|---|
| Simplified Chinese | zh |
| Traditional Chinese | zh-hant |
| English | en |
| Japanese | ja |
| Korean | ko |
- Validate session →
get-current-user - Get full context →
get-creator-context - No approved column → run column application flow (
apply-column) - Has approved column → search tags (
GET /tags) → convert Markdown to HTML → execute article operations
Markdown to HTML command examples:
npx --yes md4x draft.md -t html -o draft.html
bunx md4x draft.md -t html -o draft.html
Use whichever package runner exists in the current environment.
Copy this checklist and work through it:
PANews Creator Progress:
- [ ] Step 1: Validate the session
- [ ] Step 2: Inspect creator context and approved columns
- [ ] Step 3: If needed, complete or resubmit the column application
- [ ] Step 4: Upload assets and gather tag IDs
- [ ] Step 5: Convert Markdown to HTML with the available package runner
- [ ] Step 6: Create or update the article
- [ ] Step 7: Verify the API response before finishing
Session
Resolve PA-User-Session from environment in order: PANEWS_USER_SESSION → PA_USER_SESSION → PA_USER_SESSION_ID. On 401, discard and re-resolve.
Rules
- Validate the session before any mutating action
- Never hand-write raw HTML article bodies; convert Markdown with a tool such as
md4x first
- Treat
401 as a hard stop: discard the session and re-resolve it
- Only submit to
PENDING when the user is ready to send the article for review; otherwise default to DRAFT
Scripts
node {Skills Directory}/panews-creator/scripts/get-current-user.mjs [--session <value>]
node {Skills Directory}/panews-creator/scripts/get-creator-context.mjs [--session <value>]
node {Skills Directory}/panews-creator/scripts/upload-image.mjs <file-path> [--watermark] [--session <value>]
node {Skills Directory}/panews-creator/scripts/apply-column.mjs --name <name> --desc <desc> --picture <url> --links <url,...> [--session <value>]
node {Skills Directory}/panews-creator/scripts/apply-column.mjs --column-id <id> [--name] [--desc] [--picture] [--links] [--session <value>]
node {Skills Directory}/panews-creator/scripts/search-tags.mjs <keyword> [--take 20] [--skip 0] [--lang zh]
node {Skills Directory}/panews-creator/scripts/list-articles.mjs --column-id <id> [--status DRAFT|PENDING|PUBLISHED|REJECTED] [--take 20] [--skip 0] [--session <value>]
node {Skills Directory}/panews-creator/scripts/create-article.mjs --column-id <id> --lang <lang> --title <title> --desc <desc> --content-file <path> [--status DRAFT|PENDING] [--cover <url>] [--tags <id,...>] [--session <value>]
node {Skills Directory}/panews-creator/scripts/update-article.mjs --column-id <id> --article-id <id> [fields...] [--session <value>]
node {Skills Directory}/panews-creator/scripts/delete-article.mjs --column-id <id> --article-id <id> [--session <value>]
Failure Handling
- If session validation fails with
401, stop and obtain a fresh session before retrying
- If there is no approved column, do not attempt article creation; complete the application flow first
- If content formatting looks wrong, re-render the Markdown and inspect the generated HTML before submitting
- If an article update or delete fails because the status is immutable, fetch the current article list and report the blocking state clearly
References
Topic
Description
Reference
Session
Resolve, validate, and handle session errors
session
Column Applications
Submit or resubmit a column application
columns
Tags
Search tags by keyword to get IDs for article tagging
tags
Articles
List, create, update, delete column articles
articles
Content Format
Write in Markdown, convert it to HTML, pass it via --content-file
content-format
Upload
Upload images to PANews CDN
upload
md4x first401 as a hard stop: discard the session and re-resolve itPENDING when the user is ready to send the article for review; otherwise default to DRAFTnode {Skills Directory}/panews-creator/scripts/get-current-user.mjs [--session <value>]
node {Skills Directory}/panews-creator/scripts/get-creator-context.mjs [--session <value>]
node {Skills Directory}/panews-creator/scripts/upload-image.mjs <file-path> [--watermark] [--session <value>]
node {Skills Directory}/panews-creator/scripts/apply-column.mjs --name <name> --desc <desc> --picture <url> --links <url,...> [--session <value>]
node {Skills Directory}/panews-creator/scripts/apply-column.mjs --column-id <id> [--name] [--desc] [--picture] [--links] [--session <value>]
node {Skills Directory}/panews-creator/scripts/search-tags.mjs <keyword> [--take 20] [--skip 0] [--lang zh]
node {Skills Directory}/panews-creator/scripts/list-articles.mjs --column-id <id> [--status DRAFT|PENDING|PUBLISHED|REJECTED] [--take 20] [--skip 0] [--session <value>]
node {Skills Directory}/panews-creator/scripts/create-article.mjs --column-id <id> --lang <lang> --title <title> --desc <desc> --content-file <path> [--status DRAFT|PENDING] [--cover <url>] [--tags <id,...>] [--session <value>]
node {Skills Directory}/panews-creator/scripts/update-article.mjs --column-id <id> --article-id <id> [fields...] [--session <value>]
node {Skills Directory}/panews-creator/scripts/delete-article.mjs --column-id <id> --article-id <id> [--session <value>]
Failure Handling
- If session validation fails with
401, stop and obtain a fresh session before retrying
- If there is no approved column, do not attempt article creation; complete the application flow first
- If content formatting looks wrong, re-render the Markdown and inspect the generated HTML before submitting
- If an article update or delete fails because the status is immutable, fetch the current article list and report the blocking state clearly
References
Topic
Description
Reference
Session
Resolve, validate, and handle session errors
session
Column Applications
Submit or resubmit a column application
columns
Tags
Search tags by keyword to get IDs for article tagging
tags
Articles
List, create, update, delete column articles
articles
Content Format
Write in Markdown, convert it to HTML, pass it via --content-file
content-format
Upload
Upload images to PANews CDN
upload
401, stop and obtain a fresh session before retrying| Topic | Description | Reference |
|---|---|---|
| Session | Resolve, validate, and handle session errors | session |
| Column Applications | Submit or resubmit a column application | columns |
| Tags | Search tags by keyword to get IDs for article tagging | tags |
| Articles | List, create, update, delete column articles | articles |
| Content Format | Write in Markdown, convert it to HTML, pass it via --content-file | content-format |
| Upload | Upload images to PANews CDN | upload |
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。