PerfectScale agent skill
Explore how to bring agentic workflows into your Kubernetes optimization process with the PerfectScale agent skill
What is PerfectScale CLI
PerfectScale CLI is a command-line tool that uses PerfectScale’s public APIs to access cluster cost and optimization data. It lets you work with AI agents such as Claude, Codex, and Antigravity to query clusters, workloads, namespaces, costs, waste, risks, and other metrics, and combine this data with information from other sources to get a more complete operational context.
When to use
PerfectScale CLI introduces various use cases to improve your optimization workflows:
Query clusters, workloads, namespaces, costs, waste, and risks from the command line
Aggregate and rank data, group by namespace, team label, workload type, risk severity
Access InfraFit node group utilization, costs, and optimization recommendations, and investigate unevictable pods and their remediation guidance
Export workload data to CSV for reporting and downstream analysis
Return list, summary, and grouped results as JSON or JSONL for programmatic consumption
Review automation audit logs with filtering by cluster, namespace, and time range
Pipe results into any workflow: dashboards, Slack bots, CI/CD pipelines, custom reports
Getting started
Download the skill
Use your Agent to install PerfectScale CLI skill with a single prompt:
Install the skill from https://github.com/doitintl/perfectscale-cliAlternatively, you can do it manually. Download and install the latest release for your platform from:
Generate an API Token
Open app.perfectscale.io
Click the user icon in the bottom-left corner
Go to Org Settings -> API Tokens
Click Generate Token and assign a Read Only role
Copy the
client_idandclient_secret
Authenticate
pscli auth login --client-id 'YOUR_CLIENT_ID' --client-secret 'YOUR_CLIENT_SECRET' The CLI validates the token and saves a local profile. Credentials are stored securely in your OS config directory with restricted file permissions.
Start Querying
pscli clusters list # List your clusters
pscli workloads list -c prod-a -s waste -r desc -T 10 # Top 10 wasteful workloads
pscli workloads summary -c prod-a # Cost summary for a cluster
pscli workloads export -c prod-a -F workloads.csv # Export to CSVWhat is PerfectScale CLI
PerfectScale CLI is a command-line tool that uses PerfectScale’s public APIs to access cluster cost and optimization data. It lets you work with AI agents such as Claude, Codex, and Antigravity to query clusters, workloads, namespaces, costs, waste, risks, and other metrics, and combine this data with information from other sources to get a more complete operational context.
When to use
PerfectScale CLI introduces various use cases to improve your optimization workflows:
Query clusters, workloads, namespaces, costs, waste, and risks from the command line
Aggregate and rank data, group by namespace, team label, workload type, risk severity
Access InfraFit node group utilization, costs, and optimization recommendations, and investigate unevictable pods and their remediation guidance
Export workload data to CSV for reporting and downstream analysis
Return list, summary, and grouped results as JSON or JSONL for programmatic consumption
Review automation audit logs with filtering by cluster, namespace, and time range
Pipe results into any workflow: dashboards, Slack bots, CI/CD pipelines, custom reports
Getting started
Installing PerfectScale CLI
Install the PerfectScale CLI using the option for your platform:
macOS/Linux (Homebrew):
Windows (Scoop):
Linux (.deb/.rpm): Download the package for your architecture and install it with
dpkg -iorrpm -Uvh.
Other platforms: Download the release archive and extract the
psclibinary onto yourPATH.
Generate an API Token
Open app.perfectscale.io
Click the user icon in the bottom-left corner
Go to Org Settings -> API Tokens
Click Generate Token and assign a Read Only role
Copy the
client_idandclient_secret
Authenticate
The CLI validates the token and saves a local profile. Credentials are stored securely in your OS config directory with restricted file permissions.
Installing the Agent skill (optional)
This skill ships with the CLI binary, so there’s no separate download needed. Use --all to install it for every agent whose config directory already exists.
Start Querying
Last updated
Was this helpful?