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

project-capture

v0.1.0

Published

Codex skill and standalone Playwright toolkit for discovering web app routes, selecting capture scope, handling login flows, and generating screenshot reports.

Readme

Project Capture

Project Capture banner

한국어 README

npm License: MIT

Project Capture is a Codex skill for analyzing a web project, discovering candidate screens, asking for capture scope and authentication details, then capturing the selected screens with Playwright.

It is designed for guided screenshot collection, not for claiming that every possible state in an application can be captured automatically. Dynamic routes, authenticated screens, role-specific views, feature flags, and hidden UI states may require user confirmation or sample URLs.

What It Does

  • Inspects project structure and framework hints.
  • Discovers candidate routes from Next.js, Remix, React Router, and common SPA patterns.
  • Detects login and protected-route indicators before capture.
  • Asks which screens to capture: all static routes, core domains, a specific domain, or a manual list.
  • Handles dynamic routes with sample URLs when available.
  • Supports manual login, environment-based login, or public-only capture.
  • Captures screenshots with Playwright.
  • Supports full-page screenshots or visible-viewport screenshots.
  • Writes a Markdown report and JSON result file.

Repository Structure

project-capture/
├── package.json
├── bin/
│   └── cli.js
├── SKILL.md
├── README.md
├── README.ko.md
├── LICENSE
├── assets/
│   └── project-capture-banner-simple.png
├── references/
│   ├── auth-handling.md
│   └── route-discovery.md
└── scripts/
    ├── capture_pages.mjs
    └── discover_routes.py

Install

With npx

Install the skill into the current project:

npx project-capture init

This copies the skill into:

.codex/skills/project-capture/
.claude/skills/project-capture/

It also updates an existing AGENTS.md, CLAUDE.md, GEMINI.md, or .cursorrules file with a short project-capture instruction. If none exists, it creates AGENTS.md.

Install globally for Codex:

npx project-capture init --global-codex

Install for only one local agent directory:

npx project-capture init --agent codex
npx project-capture init --agent claude

Manual Codex Install

Copy this directory into your Codex global skills directory:

cp -R project-capture ~/.codex/skills/project-capture

Then start a new Codex session so the skill metadata can be loaded.

Use Outside Codex

Project Capture is packaged as a Codex skill, but the core functionality is implemented as standalone scripts. Other AI coding agents such as Claude Code, Gemini CLI, or custom terminal agents can use this repository by reading the workflow in SKILL.md and running the scripts directly.

Recommended agent instruction:

Use this repository as a project screen capture toolkit. First run scripts/discover_routes.py to inspect the target web project, summarize candidate routes, ask me which capture scope to use, ask about login if protected routes are detected, then run scripts/capture_pages.mjs with Playwright to save screenshots and a report.

Minimal script flow:

npx project-capture discover /path/to/project \
  --output /path/to/project/output/playwright/project-capture-routes.json

npx project-capture capture \
  --base-url http://localhost:3000 \
  --routes /path/to/project/output/playwright/project-capture-routes.json \
  --scope core \
  --screenshot-mode viewport \
  --viewport 1440x900 \
  --output-dir /path/to/project/output/playwright/project-capture

For non-Codex agents, treat SKILL.md as the operating guide, references/ as supporting policy, and scripts/ as the executable implementation.

Typical Workflow

  1. Ask Codex to use project-capture, /capture, or to capture project screens.
  2. Codex inspects the project and discovers route candidates.
  3. Codex asks for the capture scope.
  4. Codex asks for login handling if protected routes are detected.
  5. Codex asks whether screenshots should be fullpage or viewport.
  6. Codex captures the selected screens.
  7. Codex summarizes the generated report.

Capture Scope

The skill asks the user to choose one scope before taking screenshots:

  • all: discovered static routes.
  • core: inferred core product screens such as home, login, dashboard, settings, list/detail/create/edit screens.
  • domain: routes under a specific prefix such as /admin, /users, or /settings.
  • manual: user-provided URL or path list.
  • custom: any other user-defined condition.

Screenshot Mode

Project Capture supports two screenshot modes:

--screenshot-mode fullpage

Captures the full scrollable page.

--screenshot-mode viewport --viewport 1440x900

Captures only the visible viewport at the selected size.

Authentication

When login is detected, the skill asks for one mode:

  • manual: opens a headed browser so the user can log in directly.
  • env: uses CAPTURE_USER, CAPTURE_PASSWORD, and optional selector variables.
  • none: captures public screens only.

Manual login is recommended for OAuth, SSO, WebAuthn, CAPTCHA, SMS OTP, and email OTP.

Script Usage

Discover routes:

npx project-capture discover /path/to/project --output output/playwright/project-capture-routes.json

Capture core routes:

npx project-capture capture \
  --base-url http://localhost:3000 \
  --routes output/playwright/project-capture-routes.json \
  --scope core \
  --screenshot-mode viewport \
  --viewport 1440x900 \
  --output-dir output/playwright/project-capture

Manual login:

npx project-capture capture \
  --base-url http://localhost:3000 \
  --routes output/playwright/project-capture-routes.json \
  --scope static \
  --auth-mode manual \
  --login-path /login \
  --headed \
  --output-dir output/playwright/project-capture

Output

output/playwright/project-capture/
├── screenshots/
├── capture-report.md
├── capture-results.json
└── storage-state.json

storage-state.json may contain sensitive session data. Do not commit it.

Limitations

  • Route discovery is best-effort static analysis.
  • Runtime-only menus and feature-flagged screens may not be discovered.
  • Dynamic routes need sample values.
  • The skill does not automatically cycle through multiple roles or accounts.
  • It does not perform visual regression testing.

Banner

The banner in assets/project-capture-banner-simple.png was generated with the imagegen skill for this repository. It is intended to communicate the workflow visually: route discovery, browser capture, and screenshot output.