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

@sean-sunagaku/tespec

v0.2.0

Published

CLI for validating YAML-based screen specs and generating Playwright test skeletons.

Readme

tespec

tespec は、YAML で定義した画面仕様とクラス単位の Unit 仕様を検証し、テストスケルトンを生成する TypeScript CLI です。画面ごとの操作と期待値、メソッドごとのユースケースを先に整理し、テスト漏れを減らすことを目的にしています。

インストール

グローバルに使う場合:

npm install -g @sean-sunagaku/tespec

単発で使う場合:

npx @sean-sunagaku/tespec validate -c docs/tespec/config.yaml

使い方

YAML のサンプルは docs/tespec/ にあります。

npx tespec validate -c docs/tespec/config.yaml
npx tespec generate -c docs/tespec/config.yaml --dry-run

ビューアー(ノードグラフ付き)

npx tespec view -c docs/tespec/config.yaml

ブラウザで http://localhost:3737 が開き、ダッシュボードに画面遷移のノードグラフが表示されます。 YAML を編集・保存すると、グラフがリアルタイムで更新されます。

開発時は pnpm view でビルド + 起動を一発で実行できます。

generate をファイル出力で使うと、既定では tests/ 配下に Screen Spec 用の Playwright スケルトンと Unit Spec 用の Vitest スケルトンを生成します。

出力先を変えたい場合は --out-dir を使えます。

npx tespec generate -c docs/tespec/config.yaml --out-dir tests/generated

Unit Spec の生成ターゲットを切り替えたい場合は --unit-target を使えます。

npx tespec generate -c docs/tespec/config.yaml --unit-target xctest

YAML の書き方

YAML の仕様と記述ガイドは docs/tespec-design.md を参照してください。

Claude Code Skill

Claude Code で tespec の YAML を自動生成・検証するための Skill を提供しています。

インストール

npx skills add https://github.com/sean-sunagaku/tespec/tree/main/skills/tespec-yaml-gen

リポジトリから直接インストール(開発者向け)

このリポジトリをクローンしている場合、スキーマから最新のルールを生成してインストールできます:

pnpm skill:install

これは以下を実行します:

  1. src/core/schema.ts から最新の rules を生成
  2. ~/.claude/skills/tespec-yaml-gen/ に同期

更新

npx skills add https://github.com/sean-sunagaku/tespec/tree/main/skills/tespec-yaml-gen

同じコマンドで最新版に上書きインストールされます。リポジトリ開発者は pnpm skill:install で最新化できます。

使い方

Claude Code で以下のように呼び出せます:

  • 「画面仕様を作りたい」
  • 「tespec YAML を書きたい」
  • 「画面の操作を洗い出したい」

Skill が画面・操作・遷移の洗い出しをガイドし、正しいフォーマットの YAML を生成します。

License

MIT