360 Secure SkillHub
360 安全技能中心

Sort

该 Skill 通过 shell 脚本提供 lines、csv、json、dedup、shuffle、rank、top、freq、stats 等子命令,对本地文本、CSV 与 JSON 文件做排序、去重、洗牌、列排序、频次统计和 Top N 分析,依赖 python3,jq 为可选项,结果输出到标准输出。

ckchzh
ckchzh
热度 55.87
最近更新 2026-05-17 14:49:18
分类:效率依赖:代码执行 / 读写文件应用场景:数据处理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add sort
Metadata
name
sort
version
3.0.2
author
BytesAgain
homepage
https://bytesagain.com
source
https://github.com/bytesagain/ai-skills
license
MIT-0
tags
["sort","tool","utility"]
description
Sort files, lines, and columns with custom ordering and dedup. Use when scanning duplicates, monitoring changes, reporting results, alerting anomalies.

sort

File & Text Sorting Tool.

Commands

lines

Sort lines (flags: -r reverse, -n numeric, -u unique)

scripts/script.sh lines <file> [-r] [-n] [-u]

csv

Sort CSV file by column number (1-based)

scripts/script.sh csv <file> <column>

json

Sort JSON array by a key

scripts/script.sh json <file> <key>

dedup

Remove duplicate lines (preserving order)

scripts/script.sh dedup <file>

shuffle

Randomly shuffle lines

scripts/script.sh shuffle <file>

rank

Rank/sort tabular data by a numeric column

scripts/script.sh rank <file> <column>

top

Show top N entries by column value

scripts/script.sh top <file> <column> [n]

freq

Frequency analysis — count occurrences of each line

scripts/script.sh freq <file>

stats

Show basic stats about the file content

scripts/script.sh stats <file>

Requirements

  • python3
  • jq (optional)

Powered by BytesAgain | bytesagain.com | hello@bytesagain.com

Data Storage

Operation history is logged to ~/.local/share/sort/history.log for audit purposes.