简介
专为LLM多智能体协作设计的极简通信协议,通过压缩指令语法将token消耗降低70-80%,支持跨Agent高效指令传输与解析。
原始描述
Parse and generate MLSCP (Micro LLM Swarm Communication Protocol) commands. Use when communicating with other agents efficiently, parsing compressed commands, or generating token-efficient instructions. Reduces token usage by 70-80% compared to natural language.
通过你的 Agent 添加
安装目录:mlscp/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
MLSCP(Micro LLM Swarm Communication Protocol)是一项专为多智能体系统设计的 token 高效通信协议。本 Skill 提供完整的协议规范文档,帮助开发者理解并使用 MLSCP 语法进行 Agent 间指令的压缩与解析。核心功能包括:使用 ./scripts/mlscp.sh parse 解析压缩命令、./scripts/mlscp.sh compress 将自然语言转为紧凑指令、以及通过 Python API 进行程序化调用。协议支持文件操作(F+增、F改、F-删、F?查)、变量操作(V+增、V改、V-删、V?查)等核心语义,并可通过上下文块 CTX 传递意图与优先级。
显著优点
极致压缩效率:相比自然语言,MLSCP 可减少 70-80% 的 token 消耗,大幅降低 LLM API 调用成本。示例显示,"修改 src/chain_orchestrator.py 第 47 行添加重试逻辑" 可被压缩为 F+ s/co > ln47 + 'retry logic',节省约 75% tokens。结构化语义清晰:操作码(F/V)+ 修饰符(+/~/-/?)的语法设计使指令意图明确,易于机器解析。跨 Agent 互操作:标准化协议格式确保不同厂商、不同架构的 Agent 能够高效协同,特别适用于 LLM Swarm 集群场景。
潜在缺点与局限性
纯文档性质:当前 Skill 仅包含协议规范文档,未提供实际的 mlscp.sh、vocab.py 等脚本实现,用户需自行开发或从引用的 GitHub 仓库获取。学习成本陡峭:缩写语法(如 s/co 代指 src/chain_orchestrator)需要预先构建词汇表,新用户需要适应期。生态成熟度存疑:作为个人开发者项目,GitHub 仓库活跃度、社区支持及长期维护均无法直接验证。调试困难:压缩后的指令可读性大幅降低,排查通信故障时需额外工具支持。
适合的目标群体
- 多 Agent 系统架构师:设计 LLM Swarm、智能体集群通信协议的开发者
- 成本敏感型团队:需大规模调用 LLM API 且希望优化 token 支出的企业
- 边缘计算/IoT 场景:带宽受限环境下需极简通信协议的技术团队
- 协议研究人员:研究 LLM 通信效率、探索结构化指令优化的学术人员
使用风险
实现缺失风险:Skill 描述的 CLI 工具和 Python API 未包含在分发包中,实际使用前需确认能否获取可运行代码。来源可信度:T3 级个人开发者维护,无企业背书,建议生产环境使用前审查 GitHub 仓库代码。协议兼容性:MLSCP 为社区提案协议,非行业标准,与第三方系统集成可能存在互操作障碍。维护不确定性:个人项目存在维护中断风险,建议关键业务场景考虑自研或fork维护。
技能正文
name: mlscp
description: Parse and generate MLSCP (Micro LLM Swarm Communication Protocol) commands. Use when communicating with other agents efficiently, parsing compressed commands, or generating token-efficient instructions. Reduces token usage by 70-80% compared to natural language.
MLSCP Skill
MLSCP (Micro LLM Swarm Communication Protocol) is a token-efficient command language for agent-to-agent communication. This skill lets you parse, validate, and generate MLSCP commands without any LLM overhead.
Why Use MLSCP?
Natural Language
MLSCP
Savings
"Please modify the file src/chain_orchestrator.py by adding retry logic at line 47"
F+ s/co > ln47 + 'retry logic'
~75%
"Read the contents of utils/file_manager.py from lines 10 to 50"
F? u/fm > ln10-50
~80%
"Delete the variable 'temp_cache' from config.py"
V- c/c > 'temp_cache'
~70%
Quick Start
Parse a Command
./scripts/mlscp.sh parse "F+ s/co > ln47 + 'retry logic'"
Validate Syntax
| Natural Language | MLSCP | Savings |
|---|---|---|
| "Please modify the file src/chain_orchestrator.py by adding retry logic at line 47" | F+ s/co > ln47 + 'retry logic' |
~75% |
| "Read the contents of utils/file_manager.py from lines 10 to 50" | F? u/fm > ln10-50 |
~80% |
| "Delete the variable 'temp_cache' from config.py" | V- c/c > 'temp_cache' |
~70% |
Parse a Command
./scripts/mlscp.sh parse "F+ s/co > ln47 + 'retry logic'"
./scripts/mlscp.sh validate "F+ s/co > ln47 + 'retry logic'"
Generate Vocabulary
./scripts/mlscp.sh vocab /path/to/project
Compress Natural Language
./scripts/mlscp.sh compress "Add error handling to the main function in app.py"
Command Reference
Operations
Code
Meaning
Example
F+
File add/insert
F+ s/app > ln10 + 'new code'
F~
File modify
F~ s/app > ln10-20 ~ 'updated code'
F-
File delete
F- s/app > ln10-15
F?
File query/read
F? s/app > ln1-100
V+
Variable add
V+ s/app + 'new_var = 42'
V~
Variable modify
V~ s/app > 'old_var' ~ 'new_value'
V-
Variable delete
V- s/app > 'temp_var'
V?
Variable query
V? s/app > 'config_*'
Location Specifiers
ln47 - Single line
ln10-50 - Line range
fn:main - Function name
cls:MyClass - Class name
Context Blocks
CTX{"intent":"resilience","priority":"high","confidence":0.9}
Scripts
mlscp.sh - Main CLI tool
vocab.py - Vocabulary generator (Python)
Integration
With Other Agents
./scripts/mlscp.sh vocab /path/to/project
./scripts/mlscp.sh compress "Add error handling to the main function in app.py"
Command Reference
Operations
| Code | Meaning | Example |
|---|---|---|
F+ |
File add/insert | F+ s/app > ln10 + 'new code' |
F~ |
File modify | F~ s/app > ln10-20 ~ 'updated code' |
F- |
File delete | F- s/app > ln10-15 |
F? |
File query/read | F? s/app > ln1-100 |
V+ |
Variable add | V+ s/app + 'new_var = 42' |
V~ |
Variable modify | V~ s/app > 'old_var' ~ 'new_value' |
V- |
Variable delete | V- s/app > 'temp_var' |
V? |
Variable query | V? s/app > 'config_*' |
Location Specifiers
ln47 - Single line
ln10-50 - Line range
fn:main - Function name
cls:MyClass - Class name
Context Blocks
CTX{"intent":"resilience","priority":"high","confidence":0.9}
Scripts
mlscp.sh - Main CLI tool
vocab.py - Vocabulary generator (Python)
Integration
With Other Agents
ln47 - Single lineln10-50 - Line rangefn:main - Function namecls:MyClass - Class nameCTX{"intent":"resilience","priority":"high","confidence":0.9}
Scripts
mlscp.sh - Main CLI tool
vocab.py - Vocabulary generator (Python)
Integration
With Other Agents
mlscp.sh - Main CLI toolvocab.py - Vocabulary generator (Python)With Other Agents
When receiving commands from MLSCP-enabled agents:
./scripts/mlscp.sh parse "$INCOMING_COMMAND"
Sending Commands
Generate compact commands for other agents:
./scripts/mlscp.sh compress "Your natural language instruction"
API (Python)
from mlscp import parse, MLSCPParser
# Quick parse
cmd = parse("F+ s/co > ln47 + 'retry logic'")
print(cmd.operation) # OperationType.FILE_ADD
print(cmd.target) # "s/co"
# With vocabulary
parser = MLSCPParser(vocab_lookup)
cmd = parser.parse("F+ s/co > ln47 + 'code'")
full_path = vocab_lookup.get("s/co") # "src/chain_orchestrator.py"
Resources
- GitHub: https://github.com/sirkrouph-dev/mlcp
- Grammar Spec: See
references/grammar.abnf
- Protocol Definition: See
references/protocol.md
from mlscp import parse, MLSCPParser
# Quick parse
cmd = parse("F+ s/co > ln47 + 'retry logic'")
print(cmd.operation) # OperationType.FILE_ADD
print(cmd.target) # "s/co"
# With vocabulary
parser = MLSCPParser(vocab_lookup)
cmd = parser.parse("F+ s/co > ln47 + 'code'")
full_path = vocab_lookup.get("s/co") # "src/chain_orchestrator.py"
- GitHub: https://github.com/sirkrouph-dev/mlcp
- Grammar Spec: See
references/grammar.abnf - Protocol Definition: See
references/protocol.md
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。