Performance Budget Enforcer for Openclaw

A CI-ready performance monitoring tool that measures asset sizes, flags budget violations, and tracks historical build trends to prevent web bloat.

charlie-morrison
v1.0.1
May 1, 2026
0
795
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install performance-budget-enforcer

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install performance-budget-enforcer using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Performance Budget Enforcer?

Performance Budget Enforcer is a specialized utility designed to keep web projects lean and fast. By integrating into your development workflow, it proactively monitors JavaScript and CSS bundle sizes, image weights, font files, and third-party script counts. This Openclaw Skills tool ensures that every build stays within defined performance constraints, preventing the gradual 'feature creep' that often leads to slow page loads and poor user experiences.

Unlike complex browser-based auditing tools, this skill focuses on fast, deterministic static asset analysis. It provides immediate feedback during the build process, making it an essential component for teams practicing continuous integration. By measuring both raw and gzipped sizes, it offers a realistic view of what users actually download, allowing developers to catch performance regressions before they ever reach production.

Performance Budget Enforcer Use Cases

  • Enforcing strict bundle size limits in GitHub Actions or other CI/CD pipelines.
  • Auditing third-party script bloat and external domain dependencies during development.
  • Tracking the historical growth of asset sizes across different git branches and commits.
  • Identifying unoptimized images or outdated font formats (like TTF or OTF) that should be converted to WebP or WOFF2.
  • Providing automated performance reports as markdown comments in Pull Requests.

How Performance Budget Enforcer Works

  1. The skill scans common build output directories (like dist, build, or .next) to locate generated assets.
  2. It performs detailed measurements of file sizes, applying actual gzip compression to calculate realistic transfer weights.
  3. It compares these current metrics against the thresholds defined in a project-specific configuration file.
  4. If any metrics exceed the predefined limits, the skill triggers a non-zero exit code to fail the CI build.
  5. Measurement data is appended to a history file to generate trend visualizations and growth alerts over time.

Performance Budget Enforcer Setup

To start using this Openclaw Skills asset, ensure your project is built, then initialize your budget configuration:

# Generate the initial .perfbudget.json file
# This defines your JS, CSS, and image limits
performance-budget-enforcer budget

# Run a measurement and check against the budget
performance-budget-enforcer check

Performance Budget Enforcer Data Schema & Taxonomy

The skill manages performance data through two primary JSON files to ensure transparency and version control:

File Purpose Key Metrics
.perfbudget.json Configuration js_total_gzip_kb, img_total_kb, total_transfer_mb
.perfbudget-history.json Trend Tracking date, commit, branch, js_total_gzip_kb

Budget presets can be configured for different project types, such as mobile, strict, or e-commerce settings.

Performance Budget Enforcer Advanced Features

  • Multi-format output support including JSON for machines, Markdown for PR comments, and GitHub Annotations for workflow UI.
  • Automated optimization suggestions for code splitting, tree shaking, and asset compression.
  • Third-party script auditing to identify and categorize external dependencies like analytics, ads, and chat widgets.
  • Historical trend analysis with visual bar charts in the terminal to flag sudden spikes in bundle size.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*