← 返回 Skills 市场
bytesagain3

Cpu

作者 bytesagain3 · GitHub ↗ · v2.0.1 · MIT-0
cross-platform ✓ 安全检测通过
252
总下载
0
收藏
1
当前安装
5
版本数
在 OpenClaw 中安装
/install cpu
功能描述
Monitor CPU load, per-core usage, and rank top resource-consuming processes. Use when checking temperatures, ranking processes, tracking load.
使用说明 (SKILL.md)

Cpu

Cpu v2.0.0 — a sysops toolkit for scanning, monitoring, reporting, alerting, benchmarking, and managing system operations. Each command logs timestamped records locally, providing a lightweight operations journal for tracking system events, fixes, backups, and performance comparisons.

Commands

Command Description
cpu scan \x3Cinput> Record a scan result (or view recent scans with no args)
cpu monitor \x3Cinput> Log a monitoring observation (or view recent monitors)
cpu report \x3Cinput> Record a report entry (or view recent reports)
cpu alert \x3Cinput> Log an alert event (or view recent alerts)
cpu top \x3Cinput> Record a top-process snapshot (or view recent tops)
cpu usage \x3Cinput> Log a usage measurement (or view recent usage records)
cpu check \x3Cinput> Record a health check (or view recent checks)
cpu fix \x3Cinput> Log a fix or remediation (or view recent fixes)
cpu cleanup \x3Cinput> Record a cleanup action (or view recent cleanups)
cpu backup \x3Cinput> Log a backup event (or view recent backups)
cpu restore \x3Cinput> Record a restore operation (or view recent restores)
cpu log \x3Cinput> Add a general log entry (or view recent log entries)
cpu benchmark \x3Cinput> Record a benchmark result (or view recent benchmarks)
cpu compare \x3Cinput> Log a comparison (or view recent comparisons)
cpu stats Show summary statistics across all log files
cpu search \x3Cterm> Search all entries for a keyword (case-insensitive)
cpu recent Show the 20 most recent activity entries
cpu status Health check — version, entry count, disk usage, last activity
cpu help Display all available commands
cpu version Print version string

Each operations command (scan, monitor, report, alert, top, usage, check, fix, cleanup, backup, restore, log, benchmark, compare) works identically:

  • With arguments: saves a timestamped entry to ~/.local/share/cpu/\x3Ccommand>.log and logs to history.log
  • Without arguments: displays the 20 most recent entries from that command's log file

Data Storage

All data is stored locally in ~/.local/share/cpu/:

File Contents
scan.log System scan results
monitor.log Monitoring observations
report.log Report entries
alert.log Alert events
top.log Top-process snapshots
usage.log Usage measurements
check.log Health check records
fix.log Fix/remediation records
cleanup.log Cleanup action records
backup.log Backup event records
restore.log Restore operation records
log.log General log entries
benchmark.log Benchmark results
compare.log Comparison records
history.log Unified activity log for all commands

The stats command reads all .log files and reports line counts per file, total entries, data directory size, and the timestamp of the first recorded activity.

The export utility function can produce JSON, CSV, or TXT output files under the data directory.

Requirements

  • Bash (4.0+)
  • coreutilsdate, wc, du, head, tail, grep, basename, cat
  • No external dependencies, API keys, or network access required
  • Works on Linux and macOS

When to Use

  1. Tracking system operations — use scan, monitor, check, and alert to maintain a timestamped journal of system health events and observations
  2. Recording fixes and remediations — use fix and cleanup to document what was changed and when, creating an audit trail for incident response
  3. Benchmarking and comparing performance — use benchmark and compare to log performance results over time and track improvements or regressions
  4. Managing backup and restore history — use backup and restore to log when backups were taken and restores were performed, with searchable history
  5. Searching operational history — use search \x3Cterm> to find specific events across all log categories, or recent to view the latest 20 activities at a glance

Examples

# Record a scan finding
cpu scan "port 8080 open on web-server-01"

# Log a monitoring observation
cpu monitor "memory usage at 78% on db-primary"

# Record an alert
cpu alert "disk /var/log at 92% capacity"

# Log a fix
cpu fix "rotated nginx logs, freed 2.3GB on web-01"

# Record a benchmark result
cpu benchmark "sysbench cpu run: 1847 events/sec"

# Compare two environments
cpu compare "prod latency 45ms vs staging 62ms"

# Log a backup
cpu backup "full backup of postgres completed 14.2GB"

# Search all logs for a keyword
cpu search "disk"

# View summary statistics
cpu stats

# Check system status
cpu status

# View recent activity
cpu recent

How It Works

Cpu uses a simple append-only log architecture. Every command writes a pipe-delimited record (timestamp|value) to its dedicated log file. The history.log file captures a unified timeline of all operations with the format MM-DD HH:MM command: value.

This design makes Cpu:

  • Fast — pure bash, no database overhead
  • Transparent — all data is human-readable plain text
  • Portable — works anywhere bash runs, no install needed
  • Auditable — every action is timestamped and traceable

Powered by BytesAgain | bytesagain.com | [email protected]

安全使用建议
This skill is essentially a local audit/journal helper — it records whatever text you provide into logs under ~/.local/share/cpu. It does not automatically sample CPU metrics or contact remote services. Before installing: 1) Confirm you are okay with the skill creating and appending plain-text logs in your home directory; 2) If you expected automatic CPU sampling or process-ranking, this skill won't do that — you'd need tools like top/ps/sysstat and a different integration; 3) Review the included scripts (they are simple bash) if you want to be certain no extra commands are executed; 4) Consider file permissions for the data directory if logs may contain sensitive operational details. Overall the package is internally consistent and low-risk.
功能分析
Type: OpenClaw Skill Name: cpu Version: 2.0.1 The 'cpu' skill is a straightforward Bash-based journaling utility designed for logging system operations. It provides commands to record timestamped entries for various categories (e.g., scans, alerts, benchmarks) into local log files within the user's home directory (~/.local/share/cpu/). The implementation in 'scripts/script.sh' is transparent, lacks any network or sensitive file access, and does not execute arbitrary code. While the 'SKILL.md' description is slightly misleading by suggesting it actively monitors CPU load (it only records provided strings), the code is functionally safe and contains no indicators of malicious intent or significant security vulnerabilities.
能力评估
Purpose & Capability
The name/description implies active monitoring (per-core usage, ranking top processes), but the provided SKILL.md and script implement a manual append-only logging/journal: you must supply the observations (cpu top/usage/monitor <input>). This is coherent if the intent is an operations journal, but could be misleading if you expected automatic metric collection.
Instruction Scope
Runtime instructions and the script only read/write files under the user's data directory (~/.local/share/cpu) and use standard coreutils (date, grep, wc, tail, head, du). There are no instructions to read unrelated system files, exfiltrate data, or call external endpoints.
Install Mechanism
No install spec; the skill is instruction-only with an included bash script. Nothing is downloaded or written outside the user's home directory by the script itself.
Credentials
The skill requires no environment variables, credentials, or config paths. The single resource it uses (HOME for the data directory) is appropriate for its stated local logging purpose.
Persistence & Privilege
always is false and the skill does not request system-wide configuration changes. It only writes to its own data directory and does not modify other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cpu
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cpu 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.1
update
v2.0.0
v2.5 standard: Use-when desc, homepage, source, security fix
v1.0.2
retry-fix-token
v1.0.1
old template -> domain-specific v2.0.0
v1.0.0
Initial release
元数据
Slug cpu
版本 2.0.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 5
常见问题

Cpu 是什么?

Monitor CPU load, per-core usage, and rank top resource-consuming processes. Use when checking temperatures, ranking processes, tracking load. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 252 次。

如何安装 Cpu?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cpu」即可一键安装,无需额外配置。

Cpu 是免费的吗?

是的,Cpu 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cpu 支持哪些平台?

Cpu 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cpu?

由 bytesagain3(@bytesagain3)开发并维护,当前版本 v2.0.1。

💬 留言讨论