← 返回
AI智能 中文

PLS Agent Tools

Provides utilities for safe file handling, JSON/YAML editing, regex text processing, system commands, encoding, date/time, and validation tasks.
提供安全文件处理、JSON/YAML编辑、正则文本处理、系统命令、编码、日期时间和验证工具。
mattvalenta
AI智能 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 2,848
下载
💾 153
安装
1
版本
#latest

概述

Agent Tools - Universal Utility Belt

A collection of practical utilities for everyday agent operations.

File Operations

Safe File Manipulation

Always use trash instead of rm when possible:

trash /path/to/file  # Safer deletion (recoverable)

Bulk File Operations

# Rename files with pattern
for f in *.txt; do mv "$f" "${f/.txt/.md}"; done

# Find and delete files older than 7 days
find . -name "*.log" -mtime +7 -exec trash {} \;

# Copy with progress
rsync -av --progress src/ dest/

JSON/YAML Processing

JSON Operations (jq)

# Pretty print
jq '.' file.json

# Extract field
jq '.field' file.json

# Update field
jq '.field = "new_value"' file.json > tmp && mv tmp file.json

# Merge JSON files
jq -s 'add' file1.json file2.json

YAML Operations (yq)

# Read value
yq '.key' file.yaml

# Update value
yq '.key = "value"' -i file.yaml

# Convert YAML to JSON
yq -o=json '.' file.yaml

Text Processing

Common Patterns

# Search and replace in files
sed -i '' 's/old/new/g' file.txt

# Extract matches
grep -oP 'pattern' file.txt

# Count occurrences
grep -c 'pattern' file.txt

# Remove duplicate lines
sort file.txt | uniq > deduplicated.txt

# Extract column
awk '{print $2}' file.txt

System Utilities

Process Management

# Find process by name
ps aux | grep process_name

# Kill by port
lsof -ti:3000 | xargs kill -9

# Monitor resource usage
htop

Network Operations

# Check port availability
lsof -i :PORT

# Download with retry
curl --retry 3 -O URL

# Test endpoint
curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' URL

Encoding/Decoding

# Base64 encode/decode
echo "text" | base64
echo "dGV4dAo=" | base64 -d

# URL encode/decode
python3 -c "import urllib.parse; print(urllib.parse.quote('text'))"
python3 -c "import urllib.parse; print(urllib.parse.unquote('text%20here'))"

# JSON escape/unescape
jq -R . <<< 'string to escape'
jq -r . <<< '"escaped string"'

Date/Time Utilities

# Current timestamp
date +%s

# ISO format
date -u +"%Y-%m-%dT%H:%M:%SZ"

# Convert timestamp
date -r 1234567890

# Timezone conversion
TZ="America/Chicago" date

Validation Helpers

# Validate JSON
jq empty file.json && echo "Valid JSON"

# Validate YAML
python3 -c "import yaml; yaml.safe_load(open('file.yaml'))" && echo "Valid YAML"

# Check JSON schema
check-jsonschema --schemafile schema.json document.json

Quick Reference

TaskCommand
---------------
Safe deletetrash file
Find filesfind . -name "*.ext"
Search in filesgrep -r "pattern" .
Replace textsed -i '' 's/old/new/g'
JSON prettyjq '.'
YAML readyq '.key'
Port checklsof -i :PORT
Base64 decodebase64 -d

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 19:53 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 836 📥 213,222
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,922
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,359 📥 318,562