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

webwork-ability

v1.0.2

Published

WebWork abilities for opencode

Readme

webwork-ability

WebWork abilities for opencode — 提供内容提取(extract)、内容创作(revise)等技能与代理,让 opencode 具备从网页提取结构化内容、基于素材二次创作等能力。

安装

cd ~/.config/opencode
npm install webwork-ability

引入方式

本包提供两种引入方式,按需选择一种:

| 方式 | 配置 | 提供内容 | 适用 | |------|------|---------|------| | A. 插件模式(仅技能) | 在 ~/.config/opencode/opencode.jsonc 注册插件 | 仅 extract/revise 技能 | 只需要技能能力 | | B. 环境变量模式(完整,推荐) | 设置 OPENCODE_CONFIG_DIR 指向包目录 | 代理 + 技能(原生扫描 agents/skills/) | 需要代理完整能力 |

方式 A:插件模式(仅技能)

~/.config/opencode/opencode.jsonc 中注册插件:

{
  "plugin": ["node_modules/webwork-ability"]
}

该模式仅注册技能(extract/revise)。opencode 不支持通过插件注册代理(agents.paths 字段不存在),因此方式 A 不含代理

方式 B:环境变量模式(完整,推荐)

OPENCODE_CONFIG_DIR 指向包的安装目录,opencode 会把它当作配置目录,原生发现其中的 agents/skills/

echo 'export OPENCODE_CONFIG_DIR="$HOME/.config/opencode/node_modules/webwork-ability"' >> ~/.zshrc

说明:

  • 需在启动 opencode 前设置环境变量;
  • 与用户原有配置目录是叠加关系,不覆盖已有代理/技能;
  • 该变量为单一路径,同时只能指向一个目录;
  • 若之前注册过插件(方式 A),改用方式 B 时请移除 opencode.jsonc 中的 plugin 项,避免技能重复扫描。

功能

Agents(代理)

| Agent | 作用 | |-------|------| | extract | 从网页 HTML/文本/JSON 提取结构化内容(列表/详情/纯文本/导航),写入输出文件 | | revise | 基于原始素材二次创作(问题/文章/图集/动态),写入输出文件 | | query | 根据 prompt 生成内容,支持 source/language/output |

Skills(技能)

| Skill | 作用 | |-------|------| | extract | 按 format(list/detail/text/navi)从 HTML/文本/JSON 提取内容 | | revise | 按 format(question/status/gallery/article)二次创作内容 |

使用方式

# 使用 extract agent:从 HTML 或文本提取列表
opencode run --agent extract '{"format": "list", "source": "<html/文本或路径>", "output": "/tmp/list.json"}'

# 使用 extract agent:提取单条详情
opencode run --agent extract '{"format": "detail", "source": "<html或路径>", "output": "/tmp/result.json"}'

# 使用 revise agent:基于素材创作文章
opencode run --agent revise '{"format": "article", "source": "<素材>", "output": "/tmp/article.json"}'

# 使用 query agent:直接生成内容
opencode run --agent query '{"prompt": "写一篇关于AI的文章"}'

未提供 output 时,结果直接输出到 stdout。