npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pn-data/ai-translation

v0.0.1

Published

Cursor Agent Skill for pn_mid_v2 AI translation service (OpenClaw proxy)

Downloads

104

Readme

PN 中台 AI 翻译服务

Cursor Agent Skill — 通过 OpenClaw 协议访问 AI 翻译服务(上游 t1.17995api.net):拉取待翻译条目(next)回写翻译结果(writeback)。支持脚本直接请求(不经过中台)或经 pn_mid_v2 中台代理SkillManager::aiTranslation)。

Skill 版本:与 ai-translation/SKILL.md 顶部及 package.jsonversion 一致。
完整约定与示例ai-translation/SKILL.md

何时使用

  • 用户提到:翻译服务、OpenClaw、拉取待翻译、回写翻译、ai-translation、AI 翻译接口
  • 需要调用 next(拉取一条待翻译)或 writeback(回写译文/错误)

脚本直接调用(不经过中台)

本 Skill 提供 openclaw_cli.py,直接请求翻译服务(默认 https://t1.17995api.net),不经过 pn_mid_v2,无需 token。

脚本路径:<SKILL_DIR>/openclaw_cli.py(本仓库为 .cursor/skills/ai-translation/ai-translation/openclaw_cli.py)。

命令行概要

# 拉取一条待翻译(方式 A:project_id + task_id)
python3 <SKILL_DIR>/openclaw_cli.py next --project-id=1001 --task-id=<task_id>

# 拉取(方式 B:完整任务参数 JSON 文件)
python3 <SKILL_DIR>/openclaw_cli.py next --body-file=task.json

# 回写译文
python3 <SKILL_DIR>/openclaw_cli.py writeback --project-id=1001 --task-id=<task_id> \
  --sheet-row-num=18 --original="原文" --job-token=<token> \
  --translations='{"en":"Welcome to Cloudrealm."}'

# 错误回写
python3 <SKILL_DIR>/openclaw_cli.py writeback ... --error="术语冲突,需人工确认。"

选项

| 选项 | 说明 | |------|------| | --base-url=URL | 翻译服务根地址;或环境变量 OPENCLAW_BASE_URL | | --json | 输出原始 JSON |

经中台代理

  • 入口POST /service/ai_translationPOST /service/3037
  • 请求体:JSON,必传 actionnext | writeback),其余字段按 OpenClaw 文档原样透传

| action | 说明 | |-------------|--------------------| | next | 拉取一条待翻译条目 | | writeback | 回写翻译结果或错误 |

安装

npm install @pn-data/ai-translation
# 将 node_modules/@pn-data/ai-translation/ 下 ai-translation/ 复制或链接到 .cursor/skills/ai-translation/

安装后 Cursor 会读取 .cursor/skills/ai-translation/ai-translation/SKILL.md 作为 Skill 内容。

在 Cursor 中触发

  • 「调用翻译服务拉取一条待翻译」
  • 「用 ai-translation 回写翻译结果」
  • 「OpenClaw next / writeback」

API

  • 脚本直连:默认 https://t1.17995api.netPOST /openclaw/nextPOST /openclaw/writeback
  • 经中台https://pnv2.17995api.net(或当前中台域名)+ /service/ai_translation,body 含 action 及 OpenClaw 约定字段

更新 Skill

npm view @pn-data/ai-translation version --registry https://registry.npmjs.org/

若与 ai-translation/SKILL.md 顶部版本号不一致,则更新本 Skill 后重新读取 ai-translation/SKILL.md

依赖

  • Python 3.9+(脚本仅用标准库,无第三方依赖)

License

MIT