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

@skelm/integrations

v0.4.3

Published

Third-party integrations for skelm pipelines

Readme

@skelm/integrations

Typed third-party integrations for skelm pipelines — GitHub, Slack, Jira, IMAP, Telegram, with a uniform Integration interface and trigger types.

npm

Part of skelm.

This package contains the IntegrationBase class, the IntegrationRegistry, and a curated set of connector implementations + trigger types. New connectors land here as the framework matures.

Install

npm install @skelm/integrations

Quick Start

import { GitHubIntegration, IntegrationRegistry } from '@skelm/integrations'

const registry = new IntegrationRegistry()
registry.register(new GitHubIntegration({
  auth: { type: 'token', token: process.env.GITHUB_TOKEN! },
}))

const gh = registry.get<GitHubIntegration>('github')
const issue = await gh.getIssue({ owner: 'scottgl9', repo: 'skelm', number: 42 })

Drive integrations from a workflow via a code() step:

import { code, pipeline } from 'skelm'
import { GitHubIntegration } from '@skelm/integrations'

const gh = new GitHubIntegration({ auth: { type: 'token', token: process.env.GITHUB_TOKEN! } })

export default pipeline({
  id: 'label-issue',
  steps: [
    code({
      id: 'add-label',
      run: async (ctx) => {
        await gh.addLabel({ owner: 'scottgl9', repo: 'skelm', number: ctx.input.number, label: 'triaged' })
      },
    }),
  ],
})

GitHub REST helpers

For PR-review and webhook-management workflows the package also exports standalone REST helpers that take a plain GitHubAuth and don't require an integration instance. They are the recommended path for PR-review pipelines that previously shelled out to the gh CLI.

import {
  postPullRequestReview,
  postIssueComment,
  registerWebhook,
  deleteWebhook,
  getAuthenticatedUser,
  GitHubApiError,
} from '@skelm/integrations'

const auth = { token: process.env.GITHUB_TOKEN! }

// Post a review against a PR.
await postPullRequestReview({
  auth,
  owner: 'octo',
  repo: 'demo',
  number: 42,
  event: 'REQUEST_CHANGES',      // 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT'
  body: 'See inline comments.',
  comments: [{ path: 'src/x.ts', line: 12, body: 'nit: rename' }],
})

// Drop a follow-up issue comment.
await postIssueComment({ auth, owner: 'octo', repo: 'demo', number: 42, body: 'pong' })

// Register a webhook (returns the hook id for later cleanup).
const hook = await registerWebhook({
  auth, owner: 'octo', repo: 'demo',
  url: 'https://gateway.example/hooks/gh',
  secret: process.env.GITHUB_WEBHOOK_SECRET,
  events: ['pull_request', 'issue_comment', 'pull_request_review'],
})
await deleteWebhook({ auth, owner: 'octo', repo: 'demo', hookId: hook.id })

Failed calls raise GitHubApiError with status, method, path, and the parsed response body. The helpers warn to stderr when GitHub's X-RateLimit-Remaining drops below 10 % of the quota so operators see throttling coming before it bites.

The GitHubIntegration class wires the same helpers through performHealthCheck (GET /user), setupWebhook (POST /hooks), cleanupWebhook (DELETE /hooks/:id), and sendNotification (routes to POST /issues/:n/comments by default, or to POST /pulls/:n/reviews when options.kind === 'pr-review').

Built-in connectors

| Connector | Status | Trigger types | | --------------- | ---------- | ---------------------------------------------------------- | | GitHub | Implemented | GitHubIssueTrigger, generic webhook events | | Slack | Implemented | SlackWebhookEvent | | Jira | Types only | JiraIssueTrigger | | IMAP / Email| Types only | EmailTrigger | | Telegram | Types only | TelegramMessageTrigger, TelegramWebhookEvent |

"Types only" entries ship the trigger / config types so consumers can author handlers, but the runtime adapter is not yet shipped — implement against IntegrationBase and contribute it back.

Public exports

export { IntegrationBase } from './base.js'
export { GitHubIntegration } from './github.js'
export { SlackIntegration } from './slack.js'
export { IntegrationRegistry } from './registry.js'

export type {
  IntegrationConfig, WebhookConfig, RateLimitConfig,
  IntegrationCapabilities, Integration,
  GitHubConfig, GitHubWebhookEvent, GitHubIssueTrigger,
  SlackConfig, SlackWebhookEvent,
  JiraConfig, JiraIssueTrigger,
  IMAPConfig, EmailTrigger,
  TelegramConfig, TelegramWebhookEvent, TelegramMessageTrigger,
} from './types.js'

Writing a custom integration

import { IntegrationBase } from '@skelm/integrations'

export class MyServiceIntegration extends IntegrationBase {
  readonly id = 'myservice'
  readonly capabilities = { webhooks: true, polling: false }

  constructor(private readonly config: { auth: { apiKey: string } }) { super() }

  async ping() { /* health check */ }

  async doSomething(input: { foo: string }) {
    // call your API, validate inputs, return typed result
  }
}

Stability

0.x — APIs may change between minor versions until v1.

License

MIT