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

@agentwebskills/web-skills

v0.4.0

Published

Browser skill execution engine for AI agents

Downloads

72

Readme

@agentwebskills/web-skills

A browser skill execution engine for AI agents. Define skills in AgentSkills.io format and execute them in the browser — HTTP requests, DOM interactions, and semantic element targeting.

Install

npm install @agentwebskills/web-skills

Quick start

Define a skill in a SKILL.md file with embedded JSON:

---
name: github-skill
description: Create GitHub issues via the GitHub API.
---

# GitHub Skill

## createGithubIssue

Create a GitHub issue in a repository.

Parameters:
- owner (string): Repository owner
- repo (string): Repository name
- title (string): Issue title
- token (string): GitHub personal access token

```json
{
  "name": "createGithubIssue",
  "type": "http",
  "parameters": {
    "owner": "string",
    "repo": "string",
    "title": "string",
    "token": "string"
  },
  "request": {
    "method": "POST",
    "url": "https://api.github.com/repos/{owner}/{repo}/issues",
    "headers": {
      "Authorization": "Bearer {token}"
    },
    "body": {
      "title": "{title}"
    }
  }
}
```

Build the skill bundle:

npx web-skills build ./my-skill

This produces scripts/skill-bundle.js — a self-contained IIFE that can be injected into any browser page via Playwright or similar. Once injected, skills are available at window.webSkill:

const result = await window.webSkill.execute("createGithubIssue", {
  owner: "myorg",
  repo: "myrepo",
  title: "Bug report",
  token: "ghp_..."
})

Creating a skill

A skill follows the AgentSkills.io format:

my-skill/
├── SKILL.md              # Metadata + instructions + JSON definitions
└── scripts/
    └── skill-bundle.js   # Generated by `npx web-skills build`

The SKILL.md must include:

  • A ## How to execute section that tells the agent to use the browser (prevents curl execution)
  • A Target URL for each function — where the agent should navigate before calling it
    • about:blank for HTTP-only skills (API calls work from any page)
    • The actual site URL for DOM/semantic skills (e.g. https://www.paknsave.co.nz/login)

Each JSON definition can include an optional target_url field for programmatic access.

See examples/github-skill/SKILL.md for a complete example.

Skill types

http — API requests

Make HTTP requests with interpolated parameters in URLs, headers, and body.

{
  "name": "fetchUser",
  "type": "http",
  "target_url": "about:blank",
  "parameters": { "id": "string" },
  "request": {
    "method": "GET",
    "url": "https://api.example.com/users/{id}"
  }
}

dom — DOM interactions

Click, type, wait, select, and extract data using CSS selectors.

{
  "name": "login",
  "type": "dom",
  "target_url": "https://example.com/login",
  "parameters": { "email": "string", "password": "string" },
  "steps": [
    { "action": "type", "selector": "#email", "value": "{email}" },
    { "action": "type", "selector": "#password", "value": "{password}" },
    { "action": "click", "selector": "#login-button" }
  ]
}

semantic_dom — Semantic element targeting

Target elements by description instead of CSS selectors. Uses ARIA labels and text content to find elements.

{
  "name": "addToCart",
  "type": "semantic_dom",
  "target_url": "https://example.com/products",
  "parameters": { "product": "string" },
  "steps": [
    { "action": "click", "description": "Add to cart button for {product}" }
  ]
}

API

SkillEngine.fromMarkdown(md: string): SkillEngine

Create an engine from a SKILL.md file. Parses all JSON code blocks as skill definitions.

new SkillEngine({ skills, executors? })

Create an engine from raw skill definition objects. Optionally pass custom executors.

engine.execute(name: string, args?: Record<string, unknown>): Promise<ExecutionResult>

Execute a skill by name with the given arguments.

engine.getSkillNames(): string[]

List all registered skill names.

engine.registerExecutor(type: string, executor: Executor)

Register a custom executor for a new skill type.

Development

npm run build       # Build with tsup
npm test            # Run tests
npm run typecheck   # Type-check without emitting

License

MIT