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

clawgov-enforcer

v1.0.0

Published

OpenClaw Agent Governance Toolkit – SURGE × OpenClaw Hackathon

Readme

🦀 ClawGov — OpenClaw Agent Governance Toolkit

"Turn chaotic agent skills into a governed, community-owned ecosystem"

Built for the SURGE × OpenClaw Hackathon — Track 3: Developer Infrastructure + Community Incentives & Governance

License: MIT Node.js OpenClaw


What is ClawGov?

ClawGov is a governance-as-a-plugin system for OpenClaw agents. It scans community platforms (Moltbook) for risky skills, enables SURGE-backed community voting on governance proposals, compiles decisions into enforceable policy files, and enforces them at the OpenClaw Gateway level — blocking banned skills before they execute.

Governance Lifecycle

Moltbook Posts
     │
     ▼
┌─────────────┐    ┌──────────────┐    ┌─────────────┐
│  clawgov    │───▶│  clawgov     │───▶│  clawgov    │
│   scan      │    │   propose    │    │    vote     │
└─────────────┘    └──────────────┘    └─────────────┘
                                              │
                                              ▼
┌─────────────┐    ┌──────────────┐    ┌─────────────┐
│  Gateway    │◀───│  clawgov     │◀───│  clawgov    │
│  Enforces  │    │   compile    │    │   tally     │
└─────────────┘    └──────────────┘    └─────────────┘

Quick Start

# Clone and install
git clone https://github.com/Aadthiyan/Clawgov.git
cd Clawgov/clawgov
npm install
npm run build

# Run the full demo (no API keys needed)
node dist/cli/index.js demo

CLI Commands

clawgov scan [options]          # Scan Moltbook for risky skills
clawgov propose [options]       # Create governance proposals from scan results
clawgov vote [options]          # Cast or tally votes on proposals
clawgov compile [options]       # Compile decisions into policy.json
clawgov enforce-test [options]  # Test gateway enforcement against a skill
clawgov registry [options]      # View and query the skill registry
clawgov log [options]           # View governance event history
clawgov status                  # System health check
clawgov demo                    # Full end-to-end demo (all steps)

Scan

# Mock scan (offline demo)
clawgov scan --mock --limit 8 --save

# Live scan from Moltbook lablab submolt (requires MOLTBOOK_API_KEY)
clawgov scan --limit 50 --submolt lablab --save

Propose

# Generate proposals from latest scan
clawgov propose --scan data/scans/scan_abc123.json

# Manual proposal
clawgov propose --skill wallet-drainer --action BAN --bounty 100

Vote

# Add simulated votes (demo)
clawgov vote --proposal P-ABC123 --mock

# Cast a real vote
clawgov vote --proposal P-ABC123 --side yes --voter 0xYourAddress --balance 144

# Tally votes and determine outcome
clawgov vote --proposal P-ABC123 --tally

Compile & Enforce

# Compile passed proposal into policy
clawgov compile --proposal P-ABC123

# Test enforcement (will BLOCK banned skills)
clawgov enforce-test --skill wallet-drainer   # → ❌ BLOCKED
clawgov enforce-test --skill file-organizer   # → ✅ ALLOWED

Registry

clawgov registry --list     # All skills with statuses
clawgov registry --banned   # Banned skills only
clawgov registry --skill wallet-drainer  # Skill details

Architecture

src/
├── cli/
│   ├── index.ts              # Commander.js entry point
│   └── commands/
│       ├── scan.ts           # Moltbook scanner + risk scorer
│       ├── propose.ts        # Proposal generator
│       ├── vote.ts           # Quadratic voting engine
│       ├── compile.ts        # Policy compiler
│       ├── enforce-test.ts   # Gateway enforcement tester
│       ├── registry.ts       # Skill registry viewer
│       ├── log.ts            # Governance event log
│       ├── status.ts         # System health
│       └── demo.ts           # Full E2E demo orchestrator
├── db/
│   └── index.ts              # JSON file-based DB (zero native deps)
├── enforcement/
│   └── gateway-hook.ts       # OpenClaw Gateway plugin
├── utils/
│   ├── logger.ts             # Winston structured logging
│   └── events.ts             # Governance event system
└── config.ts                 # Zod-validated configuration

Environment Variables

Copy .env.example to .env:

# OpenClaw
OPENCLAW_HOME=~/.openclaw
OPENCLAW_GATEWAY_URL=http://localhost:3000

# SURGE (testnet)
SURGE_WALLET_ADDRESS=0xYourAddress
SURGE_PRIVATE_KEY=0xTestnetPrivateKey
SURGE_NETWORK=testnet

# Moltbook (optional — use --mock flag without it)
MOLTBOOK_API_KEY=your_key_here
MOLTBOOK_SUBMOLT=lablab

# ClawGov config
LOG_LEVEL=info
VOTING_MODEL=quadratic
QUORUM_PERCENTAGE=50
PASS_THRESHOLD=60

Tech Stack

| Component | Technology | |-----------|-----------| | Runtime | Node.js 22 + TypeScript | | CLI | Commander.js | | Logging | Winston (file + console) | | Database | JSON file store (zero native compilation) | | Config | Zod schema validation | | Gateway Hook | OpenClaw GatewayPlugin API | | Voting | Quadratic weighted voting | | HTTP | Axios |


Full Setup Guide

See docs/ENVIRONMENT_SETUP.md for complete installation instructions including Ollama/Llama 3 setup, SURGE wallet configuration, and Moltbook integration.


Governance Data

All governance data is stored locally in data/clawgov.json. After running the demo:

  • data/scans/ — JSON scan reports per run
  • data/policies/current.policy.json — Active enforcement policy
  • logs/combined.log — Full event log
  • governance-history.md — Exported human-readable history

License

MIT © 2026 AADHITHAN