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

@haasstefan/skills-lint

v0.1.2

Published

Token budget linter for agent skill files

Readme

skills-lint

Token budget linter for agent skill files. Validates that your markdown skill files stay within per-model token limits so they work reliably across LLMs.

Install

npm install skills-lint

Or run directly:

npx skills-lint

Usage

# Lint all files matched by .skills-lint.config.json
skills-lint

# Lint a single file
skills-lint --file path/to/SKILL.md

# Use a custom config
skills-lint --config my-config.json

# Suppress the ASCII banner (useful in CI)
skills-lint --quiet

# Disable token-count caching
skills-lint --no-cache

Configuration

Create a .skills-lint.config.json in your project root:

{
  "patterns": ["./.github/**/SKILL.md"],
  "rules": {
    "token-limit": {
      "models": {
        "gpt-4o": {
          "warning": 8000,
          "error": 16000
        },
        "gpt-4": {
          "warning": 2000,
          "error": 4000
        }
      }
    }
  }
}

Supported models

| Model | Context | Max Input | Encoding | Recommended Warning | Recommended Error | |---|---|---|---|---:|---:| | gpt-5 | 400K | 272K | o200k_base | 16,000 | 32,000 | | gpt-4o | 128K | 112K | o200k_base | 8,000 | 16,000 | | gpt-4o-mini | 128K | 112K | o200k_base | 8,000 | 16,000 | | gpt-4-turbo | 128K | 124K | cl100k_base | 8,000 | 16,000 | | gpt-4 | 8K | 4K | cl100k_base | 2,000 | 4,000 | | gpt-3.5-turbo | 16K | 12K | cl100k_base | 4,000 | 8,000 |

Skill files are loaded lazily into the model's context window. The recommended budgets keep skill files to roughly 5–10% of the model's effective input capacity. Encoding is auto-selected from the model name.

Fields

| Field | Description | |---|---| | patterns | Glob patterns to discover skill files | | rules.token-limit.models | Per-model token counting configuration | | models.<name>.warning | Token count threshold for warnings | | models.<name>.error | Token count threshold for errors | | models.<name>.encoding | (Optional) override the default tokenizer encoding |

Per-file overrides

Override thresholds for specific files:

{
  "patterns": ["./.github/**/SKILL.md"],
  "rules": {
    "token-limit": {
      "models": {
        "gpt-4o": { "warning": 8000, "error": 16000 }
      }
    }
  },
  "overrides": [
    {
      "files": [".github/skills/large-skill/SKILL.md"],
      "rules": {
        "token-limit": {
          "models": {
            "gpt-4o": { "warning": 16000, "error": 32000 }
          }
        }
      }
    }
  ]
}

Caching

Token counts are cached to .skills-lint-cache/tokens.json by default. Subsequent runs skip tokenization for unchanged files. Disable with --no-cache or set "cache": false in the config. Add .skills-lint-cache/ to your .gitignore.

Exit codes

| Code | Meaning | |---|---| | 0 | All checks passed | | 1 | One or more files exceed the error threshold | | 2 | One or more files exceed the warning threshold (no errors) | | 3 | Configuration or runtime error |

Supported platforms

Pre-built binaries are available for:

| OS | Architecture | |---|---| | macOS | ARM64, x64 | | Linux | ARM64, x64 | | Windows | ARM64, x64 |

License

MIT