简介
Hash
原始描述
Generate MD5 and SHA checksums, verify integrity, and compare hash values. Use when computing checksums, verifying downloads, or comparing hash outputs.
通过你的 Agent 添加
安装目录:hash/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: hash
version: "3.0.0"
author: BytesAgain
homepage: https://bytesagain.com
source: https://github.com/bytesagain/ai-skills
license: MIT-0
tags: [hash, tool, utility]
description: "Generate MD5 and SHA checksums, verify integrity, and compare hash values. Use when computing checksums, verifying downloads, or comparing hash outputs."
Hash
Sysops toolkit — a thorough command-line tool for system operations logging, monitoring, alerting, benchmarking, backup/restore, and data management. Each command records timestamped entries to local log files for full traceability.
Commands
All commands are run via hash <command> [args]. When called without args, each command shows recent entries from its log. When called with args, it records a new timestamped entry.
| Command | Description |
|---|---|
hash scan <input> |
Record a scan entry (system scan, security scan, etc.) |
hash monitor <input> |
Record a monitoring entry (service health, uptime, etc.) |
hash report <input> |
Record a report entry (incident report, status report, etc.) |
hash alert <input> |
Record an alert entry (threshold breach, warning, etc.) |
hash top <input> |
Record a top-level metric or process entry |
hash usage <input> |
Record resource usage data (CPU, memory, disk, etc.) |
hash check <input> |
Record a check result (health check, config check, etc.) |
hash fix <input> |
Record a fix applied (patch, hotfix, remediation, etc.) |
hash cleanup <input> |
Record a cleanup action (temp files, old logs, etc.) |
hash backup <input> |
Record a backup operation |
hash restore <input> |
Record a restore operation |
hash log <input> |
Record a general log entry |
hash benchmark <input> |
Record a benchmark result (performance test, etc.) |
hash compare <input> |
Record a comparison entry (before/after, A/B test, etc.) |
hash stats |
Show summary statistics across all log files |
hash export <fmt> |
Export all data in json, csv, or txt format |
hash search <term> |
Search across all log files for a term |
hash recent |
Show the 20 most recent activity entries |
hash status |
Health check — version, data dir, entry count, disk usage |
hash help |
Show all available commands |
hash version |
Show version (v2.0.0) |
Data Storage
- Data directory:
~/.local/share/hash/
- Per-command logs:
$DATA_DIR/{command}.log — each command type gets its own log file (e.g., scan.log, monitor.log, backup.log)
- History log:
$DATA_DIR/history.log — unified activity log with timestamps for all commands
- Export files:
$DATA_DIR/export.{json|csv|txt} — generated by the export command
- Format: Each entry is stored as
YYYY-MM-DD HH:MM|value (pipe-delimited)
- All directories are auto-created on first run
Requirements
- Bash 4.0+ (uses
set -euo pipefail for strict error handling)
- No external dependencies — pure bash, runs on any Linux/macOS system
- Standard Unix tools:
date, wc, du, grep, tail, head, basename
When to Use
- Daily sysops logging — Record system scans, health checks, and monitoring results throughout the day for an auditable trail
- Incident response tracking — Log alerts, fixes, and reports during an incident to maintain a timeline of actions taken
- Backup/restore documentation — Track when backups and restores happen, what was included, and verify completion
- Performance benchmarking — Record benchmark results over time and use
compare to track improvements or regressions
- Data export and reporting — Export all recorded data as JSON, CSV, or plain text for external analysis, dashboards, or compliance audits
Examples
System Monitoring Workflow
# Record a system scan result
hash scan "Full port scan completed - 3 open ports found"
# Monitor a service
hash monitor "nginx: running, 234 active connections"
# Check system health
hash check "Disk usage: /dev/sda1 at 72%"
# View all recent activity
hash recent
Incident Response
# Log an alert
hash alert "CPU usage exceeded 95% on web-prod-03"
# Record the fix
hash fix "Restarted nginx worker processes, cleared cache"
# Create a report
hash report "Incident #1042 resolved - root cause: memory leak in v2.3.1"
# Search for related entries
hash search "nginx"
Backup and Export
# Record backup operations
hash backup "Full DB backup to s3://backups/db-2025-03-18.sql.gz"
hash backup "Config backup: /etc/nginx → config-backup-20250318.tar"
# View statistics across all logs
hash stats
# Export everything for external analysis
hash export json
hash export csv
# Check overall health
hash status
Benchmarking and Comparison
~/.local/share/hash/$DATA_DIR/{command}.log — each command type gets its own log file (e.g., scan.log, monitor.log, backup.log)$DATA_DIR/history.log — unified activity log with timestamps for all commands$DATA_DIR/export.{json|csv|txt} — generated by the export commandYYYY-MM-DD HH:MM|value (pipe-delimited)- Bash 4.0+ (uses
set -euo pipefailfor strict error handling) - No external dependencies — pure bash, runs on any Linux/macOS system
- Standard Unix tools:
date,wc,du,grep,tail,head,basename
When to Use
- Daily sysops logging — Record system scans, health checks, and monitoring results throughout the day for an auditable trail
- Incident response tracking — Log alerts, fixes, and reports during an incident to maintain a timeline of actions taken
- Backup/restore documentation — Track when backups and restores happen, what was included, and verify completion
- Performance benchmarking — Record benchmark results over time and use
compare to track improvements or regressions
- Data export and reporting — Export all recorded data as JSON, CSV, or plain text for external analysis, dashboards, or compliance audits
Examples
System Monitoring Workflow
# Record a system scan result
hash scan "Full port scan completed - 3 open ports found"
# Monitor a service
hash monitor "nginx: running, 234 active connections"
# Check system health
hash check "Disk usage: /dev/sda1 at 72%"
# View all recent activity
hash recent
Incident Response
compare to track improvements or regressionsSystem Monitoring Workflow
# Record a system scan result
hash scan "Full port scan completed - 3 open ports found"
# Monitor a service
hash monitor "nginx: running, 234 active connections"
# Check system health
hash check "Disk usage: /dev/sda1 at 72%"
# View all recent activity
hash recent
# Log an alert
hash alert "CPU usage exceeded 95% on web-prod-03"
# Record the fix
hash fix "Restarted nginx worker processes, cleared cache"
# Create a report
hash report "Incident #1042 resolved - root cause: memory leak in v2.3.1"
# Search for related entries
hash search "nginx"
Backup and Export
# Record backup operations
hash backup "Full DB backup to s3://backups/db-2025-03-18.sql.gz"
hash backup "Config backup: /etc/nginx → config-backup-20250318.tar"
# View statistics across all logs
hash stats
# Export everything for external analysis
hash export json
hash export csv
# Check overall health
hash status
# Record benchmark results
hash benchmark "API response time: avg 142ms, p99 380ms"
hash benchmark "DB query performance: 1200 QPS sustained"
# Record comparisons
hash compare "Before optimization: 3.2s — After: 0.8s (75% improvement)"
# Log resource usage
hash usage "Memory: 12.4GB/16GB (77.5%)"
hash top "Process: java PID 1234 using 4.2GB RSS"
How It Works
Hash stores all data locally in ~/.local/share/hash/. Each command creates or appends to its own log file with pipe-delimited timestamps. The unified history.log tracks all activity across commands. Use stats to see entry counts per log file and total disk usage, search to find entries across all logs, or export to back up everything in JSON, CSV, or plain text format.
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。