system-commander

Convert user tasks to optimal Linux/Python commands. Use when user needs file processing, data extraction, text manipulation, or any task that can be solved with system-level tools instead of AI inference.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "system-commander" with this command: npx skills add nelohenriq/system-commander

System Commander

When to Use

Activate this skill when:

  • User asks for file processing, text manipulation, or data extraction
  • Task can be solved with Linux/Python commands
  • Goal is to minimize AI inference and maximize efficiency
  • Keywords: "system command", "linux", "bash", "one-liner", "file processing"

Core Philosophy: System First, AI Last

Before any AI reasoning, try these in order:

  1. Pure Linux tools - awk, sed, grep, cut, tr, sort, uniq
  2. Linux + file tools - find, xargs, parallel, jq, csvkit
  3. Python one-liners - Quick scripts for complex logic
  4. AI subordinate - Only when above won't suffice

Command Patterns by Task Type

File Operations

TaskSystem SolutionAI Solution
List large filesfind . -size +100M -ls❌ Don't delegate
Count lineswc -l file.txt❌ Don't delegate
Search textgrep -r "pattern" .❌ Don't delegate
Replace textsed -i 's/old/new/g' file❌ Don't delegate
Extract columnawk -F',' '{print $2}' file.csv❌ Don't delegate

Data Processing

TaskSystem SolutionAI Solution
JSON queryjq '.key.subkey' file.json❌ Don't delegate
CSV manipulationcsvcut -c 1,3 file.csv❌ Don't delegate
Sort & uniquesort file uniq -c❌ Don't delegate
Join filesjoin -t',' file1 file2❌ Don't delegate

Text Processing

TaskSystem SolutionAI Solution
Line extractionsed -n '5,10p' file❌ Don't delegate
Word counttr ' ' '\n' sort uniq -c❌ Don't delegate
Format conversioniconv -f UTF-8 -t ASCII❌ Don't delegate

Response Format

When generating commands:

  1. Provide the command (ready to copy-paste)
  2. Explain what it does (brief)
  3. Show expected output (example)
  4. Note alternatives (if applicable)

Examples

Example 1: Extract Email Addresses

User: "Extract all email addresses from this log file"

System Commander Response:

# Extract emails using grep with regex
grep -oE '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}' logfile.txt | sort -u

# What it does:
# - -o: output only matching parts
# - -E: extended regex
# - Sorts and removes duplicates

Example 2: Count Files by Extension

User: "Count how many files of each type are in this directory"

System Commander Response:

# Count files by extension
find . -type f | sed 's/.*\.//' | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -rn

# What it does:
# - Find all files
# - Extract extension (last . to end)
# - Normalize case
# - Count and sort by frequency

Example 3: Parse JSON Values

User: "Get all 'status' values from this JSON file"

System Commander Response:

# Using jq (install with apt-get install jq)
jq -r '.[].status' data.json | sort | uniq -c

# Alternative using grep (if jq unavailable):
grep -oP '"status": "\K[^"]+' data.json | sort | uniq -c

Example 4: Batch Rename Files

User: "Rename all .txt files to .bak"

System Commander Response:

# Dry run first (see what would happen)
ls *.txt | sed 's/\.txt$//' | xargs -I {} echo mv {}.txt {}.bak

# Execute if looks correct
ls *.txt | sed 's/\.txt$//' | xargs -I {} mv {}.txt {}.bak

# One-liner alternative:
for f in *.txt; do mv "$f" "${f%.txt}.bak"; done

Advanced Patterns

Parallel Processing

# Process files in parallel (4 jobs)
find . -name '*.log' | xargs -P 4 -I {} grep 'ERROR' {}

# Using GNU parallel (apt-get install parallel)
find . -name '*.json' | parallel 'jq .name {}'

Complex Text Extraction

# Extract text between markers
sed -n '/START/,/END/p' file.txt

# Multi-line pattern replacement
sed '/pattern/{n;s/old/new/}' file.txt

# Process only matching files
grep -l 'pattern' *.txt | xargs sed -i 's/old/new/g'

Data Transformation

# CSV to JSON (requires csvkit)
csvjson data.csv > data.json

# JSON to CSV
jq -r '.[] | [.key1, .key2] | @csv' data.json > output.csv

# Column statistics
awk -F',' '{sum+=$3} END {print "Sum:", sum, "Avg:", sum/NR}' data.csv

Python One-Liners

When pure Linux isn't enough, use Python:

# Complex JSON processing
python3 -c "
import json,sys
data=json.load(open('file.json'))
print([x['name'] for x in data if x['active']])
"

# Text processing with regex
python3 -c "
import re,sys
for line in sys.stdin:
    m=re.search(r'pattern', line)
    if m: print(m.group(1))
" < input.txt

When NOT to Use System Commands

Don't suggest system commands when:

  • Task requires natural language understanding
  • Contextual analysis of meaning
  • Creative writing or content generation
  • Complex multi-step reasoning
  • Security-sensitive operations needing verification

Token Efficiency Rules

  1. Never rewrite command output - Use §§include() instead
  2. Prefer pipes over loops - | chains are more efficient
  3. Use built-in tools - awk, sed vs Python imports
  4. Batch operations - Process all files at once with xargs

Installation Prerequisites

Some commands need packages:

# JSON processing
apt-get install jq

# CSV processing
apt-get install csvkit

# Parallel execution
apt-get install parallel

# Text processing
apt-get install silversearcher-ag  # ag command

Skill Integration

This skill works with:

  • agent-orchestrator: System commands become subtask solutions
  • a0-token-optimizer: Minimal tokens for maximum utility
  • toon-adoption: Store command patterns in TOON format

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

System Monitor

跨平台系统监控工具,支持 Linux 和 Windows,监控硬盘、内存、CPU 使用情况,记录历史数据,支持变化对比和预警。**适合定时任务**。触发场景:(1) 定时系统健康检查(推荐每6小时),(2) 用户询问系统状态、资源使用情况,(3) 资源异常预警,(4) 查看历史监控数据对比。

Registry SourceRecently Updated
044
Profile unavailable
Automation

Prompt Engineering Mastery

Convert vague instructions into clear AI prompts using structures, techniques, and templates for reliable, precise, and measurable outputs.

Registry SourceRecently Updated
0385
Profile unavailable
Coding

Self-Hosting Mastery

Complete self-hosting and homelab operating system. Deploy, secure, monitor, and maintain self-hosted services with production-grade reliability. Use when se...

Registry SourceRecently Updated
0243
Profile unavailable