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

first-principles-cli

v2.0.0

Published

Install First Principles thinking rules, hooks, and skills for Claude Code

Downloads

568

Readme

first-principles-cli

Install First Principles thinking rules, hooks, and skills for Claude Code.

Forces Claude to decompose problems, challenge assumptions, and derive solutions from verified facts instead of pattern matching.

Install

pnpm add -g first-principles-cli

Installation automatically:

  • Copies rules to ~/.claude/rules/
  • Copies /fp skill to ~/.claude/skills/
  • Merges reminder hooks into ~/.claude/settings.json

What It Does

Three layers of enforcement

| Layer | Mechanism | When | |-------|-----------|------| | Rules (~/.claude/rules/) | Loaded into system context | Every conversation | | /fp skill | Wraps task with mandatory steps | When user invokes /fp <task> | | Hooks (UserPromptSubmit + PostCompact) | Injects short reminder | Every turn + after context compression |

The Three Steps

Every response follows:

  1. Decompose -- Break the problem down to basic facts and constraints. Read the code before acting.
  2. Challenge -- Separate verified facts from unverified assumptions. Verify or explicitly mark assumptions.
  3. Rebuild -- Derive the solution from verified facts alone, not from convention or pattern matching.

/fp skill (strongest enforcement)

/fp build a system architecture diagram

When invoked, Claude is forced to:

  • Read relevant project files before writing anything
  • Explicitly list verified facts vs assumptions
  • Only act on verified information

Rules installed

| File | Purpose | |------|---------| | first-principles.md | Core three-step thinking discipline | | code-standards.md | File headers, comments, package managers, git conventions | | prohibited.md | Hard prohibitions (no emoji, no npm, no fabrication, no workarounds) |

Uninstall

pnpm remove -g first-principles-cli

Automatically removes only the files this package installed. User-modified files are preserved.

Manual management

first-principles status     # Show what's installed
first-principles install    # Re-run installation
first-principles uninstall  # Remove components

Platform support

  • macOS
  • Linux
  • Windows (Claude Code uses Git Bash for hooks)

How it works

The npm postinstall script copies template files to ~/.claude/ and merges hook configurations into settings.json. No runtime dependencies. No background processes.

The /fp skill works by placing the three-step instructions before the user's task in the same message, so Claude processes the constraints before seeing the task. This is structurally stronger than hooks (which inject reminders after the user message).

Limitations

Rules and hooks are soft enforcement -- they increase compliance probability but cannot guarantee 100% adherence. The /fp skill provides the strongest enforcement because it restructures the prompt itself.

For hard enforcement of specific behaviors (e.g., blocking npm), use permissions.deny in settings.json.

License

MIT