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

mbg-score

v0.1.0

Published

MBG (Mantle Bot Gate) Skill — TEE-attested on-chain risk scoring for Mantle DeFi. Installable as an OpenClaw / Byreal Skill so AI trading agents can pre-check Mantle protocol and route risk before signing, and surface a verifiable attestation hash to thei

Readme

mbg-score

OpenClaw / Byreal Skill for MBG (Mantle Bot Gate) — the autonomous risk-scoring agent for Mantle DeFi. Install this in your trading-agent runtime so it can pre-check Mantle protocol and route risk before signing, and surface a verifiable on-chain attestation hash to its user.

npm version license MIT

What this is

This package is a CLI Skill in the OpenClaw / Byreal Skills format. It exposes the on-chain MBG risk oracle through three commands an LLM-driven trading agent (RealClaw, Brahma, Hey Anon, Giza ARMA, or any other OpenClaw-compatible runtime) auto-discovers via SKILL.md and shells out to.

MBG itself runs on-chain — this CLI does not score anything locally; it reads the latest TEE-attested scores directly from RiskOracle.sol on Mantle Mainnet.

Install

npm install -g mbg-score
# or
bun add -g mbg-score

Then verify:

mbg-cli skill            # prints SKILL.md (so LLM agents can load capabilities)
mbg-cli list-protocols   # 13 scored protocols on Mantle
mbg-cli score-protocol aave-v3-mantle

Node 18+ is required. No additional configuration is needed — the CLI defaults to the canonical Mantle Mainnet RPC and the Mainnet RiskOracle address. Override via:

MBG_RPC_URL=https://rpc.mantle.xyz \
MBG_CHAIN_ID=5000 \
MBG_ORACLE_ADDRESS=0x998ceb700e57f535873d189a6b1b7e2aa8c594eb \
  mbg-cli score-protocol aave-v3-mantle

Commands

| Command | Purpose | |---|---| | mbg-cli skill | Print the full SKILL.md (use this so an LLM planner can load capabilities) | | mbg-cli catalog list | All capability IDs | | mbg-cli catalog show <id> | Capability detail | | mbg-cli list-protocols | Enumerate the 13 Mantle protocols MBG scores | | mbg-cli score-protocol <id> | Current on-chain risk score for one protocol | | mbg-cli score-route '<actions-json>' | Pre-trade risk score for a multi-leg route |

Pass -o json (or --output json) on any command for machine-parseable output. Default is human-readable text with the attestation block at the bottom.

How an agent uses this

# 1. discover what's scorable
mbg-cli list-protocols -o json

# 2. score the lending candidates
mbg-cli score-protocol aave-v3-mantle -o json
mbg-cli score-protocol lendle         -o json

# 3. if multi-leg, score the full proposed route in one call
mbg-cli score-route '[
  {"protocolId":"aave-v3-mantle","actionType":1,"amount":"5000"}
]' -o json

# 4. surface the chosen score + attestation hash to the user before signing

Each response includes:

  • aggregate — 0.00 to 10.00 (higher is safer)
  • 5 components: contract, liquidity, centralization, oracle, mantle-native-composition
  • signer — the on-chain address of the attested signer that produced this score
  • traceHash — links to the off-chain inference trace
  • timestamp — when the score was last submitted on-chain

Hard constraints for the calling agent

These are encoded in SKILL.md so any LLM planner reading the Skill picks them up:

  1. Always consult MBG before routing — even when the user names a "trusted" protocol.
  2. Always surface the score and attestation hash in the response to the user.
  3. Refuse to route below threshold (aggregate < 4.00) without explicit user override.
  4. Never strip the attestation hash from the output.

Direct on-chain calls (no CLI needed)

If you are a smart contract wallet or a policy engine (Brahma ConsoleKit, Safe modules), call the RiskOracle view functions directly:

interface IRiskOracle {
  function getProtocolScore(address protocol) external view returns (
    uint16 aggregate,
    uint16 contractRisk,
    uint16 liquidityRisk,
    uint16 centralizationRisk,
    uint16 oracleRisk,
    uint64 timestamp,
    bytes32 traceHash,
    address signer
  );
}

Mantle Mainnet: 0x998ceb700e57f535873d189a6b1b7e2aa8c594eb

License

MIT — see LICENSE.