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

pattern-principal

v1.4.1

Published

AI Agent skills for writing clean, principled production code — GoF, SOLID, YAGNI, DRY

Downloads

852

Readme

pattern-principal

AI Agent skills for writing clean, principled production code.

Installable skill collection enforcing GoF Design Patterns, SOLID, YAGNI, and DRY — across every major AI IDE and coding agent.

Languages: TypeScript · Python · Dart · Rust · Go · Java · C++


Quick Start

# Auto-detect your installed IDEs and install
npx pattern-principal install clean-code-agent

# Install for a specific IDE
npx pattern-principal install clean-code-agent --ide cursor
npx pattern-principal install clean-code-agent --ide cursor,windsurf

# Install for ALL supported IDEs at once
npx pattern-principal install clean-code-agent --ide all

# See all supported IDEs and their rule file locations
npx pattern-principal ides

# List available skills
npx pattern-principal list

# Uninstall
npx pattern-principal uninstall clean-code-agent

Supported IDEs

| IDE | Rule File Location | Scope | --ide flag | |-----|-------------------|-------|-------------| | 🤖 Claude Code | ~/.claude/skills/<skill>/ | global | claudecode | | ⬛ Cursor | .cursor/rules/<skill>.mdc | project | cursor | | 🌊 Windsurf | .windsurf/rules/<skill>.md | project | windsurf | | 🌊 Windsurf (global) | ~/.codeium/windsurf/memories/global_rules.md | global | windsurf | | 🐙 GitHub Copilot | .github/copilot-instructions.md | project | copilot | | 🔷 Cline | .clinerules/<skill>.md | project | cline | | 🔷 Cline (global) | ~/.cline/rules/<skill>.md | global | cline | | ⚡ Zed | AGENTS.md / ~/.config/zed/AGENTS.md | both | zed | | ▶️ Continue.dev | .continue/rules/<skill>.md | project | continue | | 🌐 AGENTS.md | AGENTS.md (universal standard) | project | agentsmd |


Available Skills

clean-code-agent

| Category | Coverage | |----------|----------| | GoF Design Patterns | Top 10 patterns with "when to use" signals | | SOLID | All 5 principles — violation detection & fixes | | YAGNI | Over-engineering detection with pragmatic exceptions | | DRY | 4 duplication types with extraction strategies | | Anti-Pattern Detection | 15 common anti-patterns — God Class, Spaghetti, Feature Envy, Shotgun Surgery, and more | | Language Deep Guides | TypeScript, Python, Dart, Rust, Go, Java, C++ — idiomatic patterns per language |

Two modes: WRITE (inline annotations while coding) · REVIEW (structured reports with severity ratings)


How Auto-Detection Works

Running npx pattern-principal install <skill> without --ide will:

  1. Scan your machine for installed IDEs (checks config dirs, app paths)
  2. Install to every detected IDE automatically
  3. Print exactly what was installed and where

Decision Comment Format

// [PATTERN: Strategy] — behavior varies by type; avoids if/else chain
// [SOLID: SRP] — extracted PaymentProcessor; was mixed with OrderService
// [DRY] — extracted to validateEmail(); was repeated in 3 places
// [YAGNI] — removed caching layer; not required by current spec

Folder Structure

pattern_principal/
├── package.json
├── bin/
│   └── cli.js                      ← multi-IDE installer CLI
└── clean-code-agent/
    ├── SKILL.md                    ← main skill file
    └── references/
        ├── gof-patterns.md         ← top 10 GoF patterns, 7 languages
        ├── solid-checklist.md      ← SOLID audit checklist + fixes
        ├── yagni-dry-rules.md      ← YAGNI/DRY heuristics + examples
        └── review-template.md      ← structured review report format

Contributing

PRs welcome for:

  • Additional GoF patterns (remaining 13)
  • New language examples
  • More skills (testing-agent, api-design-agent, security-agent)
  • Support for new IDEs

Author

Built by chiggosVikash · ParivartanX