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

claude-ground

v0.4.0

Published

Opinionated rules, skills & project templates for Claude Code

Readme

claude-ground

A minimal rule system for Claude Code. Gives Claude the structural discipline it lacks by default — phase tracking, decision logging, honest pushback, debug discipline, language-specific best practices, and reusable skills.


The problem

Claude Code is capable. But left to its own defaults it tends to:

  • Lose track of the original plan mid-implementation
  • Silently simplify or pivot when blocked, without asking
  • Agree with you when it should push back
  • Brute-force the same failed approach instead of stopping to think
  • Modify existing code without understanding it first
  • Skip tests or write superficial ones
  • Use inline styles, hardcoded colors, and generic AI aesthetics

These aren't model failures — they're defaults that go unchallenged without explicit rules.


What this does

rules/common/ — Always active, every project:

| Rule file | What it does | |-----------|-------------| | core.md | Phase management, approval gates, honest opposition, time estimates, periodic analysis | | decisions.md | Decision log format and rules | | git.md | Branch strategy, conventional commits, commit discipline, versioning | | testing.md | When to test, naming, structure, mocks vs integration, coverage | | debug.md | Two-attempt rule, structured analysis, no error masking | | existing-code.md | Read before touch, follow existing patterns, separate refactoring from features | | frontend.md | Theme-first, no inline styles, intentional design (UI projects only) | | security.md | Input validation, auth, secrets, headers, rate limiting essentials (production) | | deploy.md | Server hardening, TLS, systemd, monitoring essentials (production) | | observability.md | Structured logging, health checks, external monitoring essentials (production) | | oss-hygiene.md | Branch protection, tag immutability, signing, governance (open source) |

rules/[language]/ — Language-specific best practices:

| Language | Key rules | |----------|-----------| | Go | Goroutine lifecycle, error wrapping, interface design, package structure, table-driven tests | | Swift | MVVM structure, async/await + actors, memory management, error handling, testable ViewModels | | TypeScript | Component granularity, API layer separation, strict types, state discipline, RTL testing | | Kotlin | Coroutine scopes, sealed UI state, Compose theming, repository pattern, coroutine testing | | Flutter | Widget granularity, state management, AppTheme, platform isolation, widget/golden tests | | Rust | Ownership patterns, thiserror/anyhow, tokio consistency, unsafe discipline, proptest | | Python | Type hints, project structure, custom exceptions, dependency management, pytest | | .NET | Constructor DI, layered architecture, async + CancellationToken, Result pattern, Testcontainers | | Spring | Constructor injection, layered architecture, exception handling, transactions, Testcontainers |

commands/ — Reusable skills (slash commands):

| Skill | What it does | |-------|-------------| | cg-mac-release | Build, sign, notarize, and publish a macOS app as a GitHub release with a professional DMG | | cg-devplan | Generate structured development plans for Claude Code to follow | | cg-store-listing | Generate ASO-optimized App Store / Google Play listing metadata | | cg-security-hardening | Full security hardening guide — OWASP-aligned, multi-language, with validation tests | | cg-indie-deploy | Deploy to a single VPS — Caddy/nginx, systemd, TLS, backups, rollback | | cg-indie-observability | Structured logging, error tracking, uptime monitoring, alerting | | cg-oss-git-hygiene | OSS repo setup — rulesets, signing, templates, Dependabot, triage |

All rules use MUST / SHOULD / RECOMMENDED severity levels so Claude knows what is a hard rule vs a best practice.

templates/ — Starting point for new projects:

  • CLAUDE.md — Project context file. Tech stack, architecture, active rules.
  • DECISIONS.md — Empty decisions log, ready to fill.
  • phases/PHASE-01.md — First phase template.

Install

Three things get installed — they go to different places:

| What | Where | Effect | |------|-------|--------| | Rules | ~/.claude/rules/ (global) | Active in every project, every session | | Skills | ~/.claude/commands/ (global) | Slash commands available everywhere | | Templates | Current working directory | CLAUDE.md, DECISIONS.md, phases/ for one project |

Rules and skills are always global. Templates are always local to whatever directory you run the command from.

npm install -g claude-ground

No dependencies — uses only Node.js built-ins.

Step 1 — Install rules + skills globally (once)

claudeground                       # interactive — pick languages + skills
claudeground install go typescript # non-interactive — specify languages directly

This installs common rules + your chosen language rules to ~/.claude/rules/, and selected skills to ~/.claude/commands/. Done once, works everywhere.

Step 2 — Set up a project (per project)

From your project directory:

cd your-project
claudeground init                  # interactive — pick languages, skills, UI
claudeground init go swift         # non-interactive — specific languages

This asks if the project has a UI (to enable frontend rules), then creates:

your-project/
├── CLAUDE.md                        ← fill this in
├── DECISIONS.md                     ← log your first stack decision
└── .claude/
    ├── commands/                    ← project-level skills (if selected)
    │   └── cg-mac-release.md
    └── phases/
        └── PHASE-01-active.md       ← define your first phase

Step 3 — Fill in CLAUDE.md

Open CLAUDE.md and fill in:

  • What the project does
  • Your tech stack and why
  • Uncomment the language rules that apply
  • Any project-specific constraints for Claude

Updating

When you update the package (npm update -g claude-ground), re-apply your rules and skills:

claudeground update                # re-installs using your saved preferences

Your language and skill selections are saved to ~/.claude/.claude-ground.json on first install — no need to re-select every time.


Phase workflow

Long implementations use phase files to survive context resets:

.claude/phases/
├── PHASE-01-done.md       ← completed
├── PHASE-02-done.md       ← completed
├── PHASE-03-active.md     ← Claude reads this when context fills
└── PHASE-04-pending.md    ← not started

Each phase file contains: goal, task list, acceptance criteria. No code snippets — phases are goals, not implementations.

Claude checks the active phase file before continuing work. It will not start the next phase without your approval.


Folder structure

claude-ground/
├── cli.js
├── package.json
├── rules/
│   ├── common/
│   │   ├── core.md            # phase management, approval gates, honest pushback
│   │   ├── decisions.md       # decision log format and rules
│   │   ├── git.md             # branch strategy, commits, versioning
│   │   ├── testing.md         # test discipline, naming, coverage
│   │   ├── debug.md           # two-attempt rule, structured analysis
│   │   ├── existing-code.md   # read before touch, pattern respect
│   │   ├── frontend.md        # theme-first, intentional design (UI only)
│   │   ├── security.md        # security essentials → refs full guide
│   │   ├── deploy.md          # deploy essentials → refs full guide
│   │   ├── observability.md   # observability essentials → refs full guide
│   │   └── oss-hygiene.md     # OSS repo essentials → refs full guide
│   ├── go/
│   │   └── go.md
│   ├── swift/
│   │   └── swift.md
│   ├── typescript/
│   │   └── typescript.md
│   ├── kotlin/
│   │   └── kotlin.md
│   ├── flutter/
│   │   └── flutter.md
│   ├── rust/
│   │   └── rust.md
│   ├── python/
│   │   └── python.md
│   ├── dotnet/
│   │   └── dotnet.md
│   └── spring/
│       └── spring.md
├── commands/
│   ├── cg-mac-release.md         # macOS app release pipeline
│   ├── cg-devplan.md             # development plan generator
│   ├── cg-store-listing.md       # app store listing generator
│   ├── cg-security-hardening.md  # full security hardening guide
│   ├── cg-indie-deploy.md        # VPS deployment guide
│   ├── cg-indie-observability.md # production observability guide
│   └── cg-oss-git-hygiene.md     # OSS repository setup guide
└── templates/
    ├── CLAUDE.md
    ├── DECISIONS.md
    └── phases/
        └── PHASE-01.md

Contributing

Rules should be:

  • Specific enough to change behavior, not just remind Claude of good practices
  • Language-idiomatic — written from the perspective of someone who knows the ecosystem well
  • Free of code snippets that Claude would write anyway
  • Tagged with severity: MUST (hard rule), SHOULD (best practice), RECOMMENDED (nice to have)

Skills should be:

  • Generic — no hardcoded user-specific values, use placeholders
  • Self-contained — one .md file per skill in commands/
  • Production-focused — real workflows, not demos

New language rules, skills, corrections, and improvements are welcome.