From moonbeam-engineering
Analyzes weight file diffs after benchmarks to flag significant regressions in ref_time, proof_size, and DB reads. Use when updating weights, running benchmarks, or reviewing weight changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/moonbeam-engineering:analyzing-weightsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyzes weight file changes between the current branch and a base branch to detect significant regressions or anomalies introduced by benchmark updates.
Analyzes weight file changes between the current branch and a base branch to detect significant regressions or anomalies introduced by benchmark updates.
perm-runtime-NNNN if the branch name or commits suggest a release.master.Run the analysis script piping the git diff of weight files:
git diff $(git merge-base <base-branch> HEAD)..HEAD -- '*/weights/*' \
| python3 scripts/analyze-weight-diff.py --threshold 50
The script accepts:
--file <path> or stdin (piped diff)--threshold <N> percentage threshold for flagging (default: 50)The script produces 7 sections:
| Section | What it flags |
|---|---|
| 1 | Base ref_time increases above threshold |
| 2 | Base ref_time decreases above threshold |
| 3 | Per-variable ref_time multiplier changes (critical for parametric weights) |
| 4 | Minimum execution time changes above threshold |
| 5 | proof_size per-variable changes above 100% |
| 6 | Per-runtime summary (moonbase, moonbeam, moonriver) |
| 7 | Full sorted table of all minimum execution time changes |
After reviewing the script output, flag:
x or per-y coefficient grows by 10x+, compute the charged weight at mainnet parameters (see reference values below) and check whether it exceeds block limits.proof_size at mainnet parameters. If it exceeds 10 MB (PoV limit), flag it as a blocker.Use these for impact calculations:
| Parameter | Moonbeam | Moonriver | Moonbase |
|---|---|---|---|
| Block ref_time limit | 2,000,000,000,000 (2T) | 2T | 2T |
| Block PoV limit | 10,485,760 (10 MB) | 10 MB | 10 MB |
| TotalSelected (collators) | ~64 | ~24 | ~16 |
| MaxTopDelegationsPerCandidate | 300 | 300 | 300 |
| MaxDelegationsPerDelegator | 100 | 100 | 100 |
| MaxBottomDelegationsPerCandidate | 50 | 50 | 50 |
Summarize to the user:
npx claudepluginhub moonsong-labs/knowledge-work-plugins --plugin moonbeam-engineeringDetects performance regressions across git versions by comparing benchmarks for latency (p50/p95/p99), throughput, memory, CPU/I/O, with statistical tests and reports.
Performs security-focused differential review of PRs, commits, and diffs. Analyzes code for security regressions, calculates blast radius, checks test coverage, and adapts depth to codebase size.
Analyzes changesets from git diffs, configs, APIs, or schemas; categorizes by type/impact, scores risks, and prepares release notes for reviews and migrations.