Xspoonai official perf budget checker

From jiayaoqijia/cryptoskill · View interactive version

Xspoonai official perf budget checker is an AI agent skill from the GitHub repository jiayaoqijia/cryptoskill. Check simple performance budgets against metrics JSON. Validates that application metrics stay within defined budgets for performance thresholds.

How to use this skill

Skill file

Description

Check simple performance budgets against metrics JSON. Validates that application metrics stay within defined budgets for performance thresholds.

Inputs

{
  "metrics": {
    "bundle_size": "100kb",
    "load_time": "3s"
  },
  "budgets": {
    "bundle_size": "150kb",
    "load_time": "5s"
  }
}

Outputs

{
  "ok": true,
  "data": {
    "passed": true,
    "violations": []
  }
}

Usage

Demo Mode

python scripts/main.py --demo

Check Performance Budget

echo '{"metrics": {}, "budgets": {}}' | python3 scripts/main.py

Examples

Example 1: Budget Check

$ echo '{"metrics": {"bundle_size": "100kb"}, "budgets": {"bundle_size": "150kb"}}' | python3 scripts/main.py
{
  "ok": true,
  "data": {
    "passed": true,
    "violations": []
  }
}

Error Handling

When an error occurs, the skill returns:

{
  "ok": false,
  "error": "Error description",
  "details": {
    "metrics": "Invalid metrics format"
  }
}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.