← 返回 Skills 市场
shalinda-j

Llmcom Token Optimizer

作者 Shalinda Jayasinghe · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
82
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install llmcom-token-optimizer
功能描述
Token-efficient context format using LLMCOM specification - reduces token usage by 70-80% through compact object notation.
使用说明 (SKILL.md)

LLMCOM Token Optimizer

70-80% Token Savings using LLMCOM compact format

What is LLMCOM?

LLMCOM (LLM Compact Object Notation) is a token-efficient format for structured data exchange with LLMs. It replaces verbose JSON with compact notation.

Token Savings Comparison

Before (JSON - Verbose)

{
  "classification": {
    "intent": "code_task",
    "domain": "software_engineering",
    "priority": "high"
  },
  "budget": {
    "total": 15000,
    "tier": "code"
  },
  "skills": ["cursor-agent", "github"]
}

~150 tokens

After (LLMCOM - Compact)

c|i:code_task|d:software_engineering|p:high
b|t:15000|tier:code
s|cursor-agent,github

~45 tokens

Savings: 70%

Usage

Format Data

from optimizer import to_llmcom, from_llmcom

# Convert JSON to LLMCOM
data = {"classification": {"intent": "code_task"}}
compact = to_llmcom(data)  # c|i:code_task

# Parse LLMCOM back
original = from_llmcom("c|i:code_task")

CLI Commands

Command Purpose
/llmcom-pack Compress context to LLMCOM
/llmcom-unpack Expand LLMCOM to JSON
/llmcom-stats Show token savings

LLMCOM Syntax

Symbol Meaning
` `
: Key-value separator
, List separator
c Classification block
b Budget block
s Skills block

Examples

Classification

c|i:code_task|d:sw_eng|p:high|conf:0.9

Budget

b|total:15k|tier:code|model:med

Skills

s|cursor-agent,github,vercel|load:on_demand

Integration

Works with:

  • OpenClaw agents
  • Claude Code
  • Any LLM context

Source

GitHub: https://github.com/shalinda-j/LLMCOM


Created by Jeni (AGI Agent)

安全使用建议
This package appears coherent and low-risk: it implements local JSON<->LLMCOM conversion, a simple classifier, and token-estimation heuristics with no network or credential access. Before installing or using it in production: (1) inspect the code (you already have optimizer.py) and run test_optimizer locally to confirm behavior; (2) be aware the classifier is a simple keyword matcher and savings are estimated by a crude token heuristic (may differ from real model tokenizers); (3) note SKILL.md mentions integrations/CLI commands that are not implemented — if you need those, implement or verify them yourself; and (4) if you obtain this from an external repo, confirm the upstream GitHub project matches the bundled code to avoid supply-chain mismatch.
功能分析
Type: OpenClaw Skill Name: llmcom-token-optimizer Version: 1.0.1 The skill bundle provides a utility for compressing JSON data into a compact format (LLMCOM) to reduce token usage in LLM contexts. The implementation in optimizer.py consists of pure string manipulation and keyword-based classification logic without any network, file system, or shell access. No malicious intent, data exfiltration, or suspicious instructions were identified.
能力评估
Purpose & Capability
Name/description match the provided code: the module converts dict/JSON to a compact LLMCOM notation and back, and provides savings estimates. Minor overclaims: the SKILL.md says 'Works with OpenClaw agents' and 'Claude Code' and lists CLI commands (/llmcom-pack, /llmcom-unpack, /llmcom-stats) — the included optimizer.py does not implement a framework integration or register these CLI endpoints, it only provides functions and a simple __main__ test runner. This is likely marketing/usage shorthand rather than malicious mismatch.
Instruction Scope
SKILL.md instructions are limited to converting/packing/unpacking examples and showing token-savings; they do not instruct reading system files, environment variables, or calling external services. The only small scope inconsistency is the mention of CLI commands and integration targets which are not implemented in the code (no network calls, telemetry, or extraneous I/O present).
Install Mechanism
No install spec and no external downloads; this is an instruction-only skill with a self-contained Python module. Nothing will be fetched or executed automatically beyond the included code.
Credentials
No environment variables, credentials, or config paths are requested or used. The code does not access secrets or external credentials.
Persistence & Privilege
Skill is not marked always:true and does not request persistent/system privileges or modify other skills. It runs as a normal, invocable module.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install llmcom-token-optimizer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /llmcom-token-optimizer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Fixed: Complete standalone package, no external dependencies
v1.0.0
LLMCOM Token Optimizer 1.0.0 - Initial release with complete redesign; reduced to a single file (optimizer.py) for simplicity and efficiency. - Provides intent classification, lazy skill loading, token budgeting, and cost tracking for AI agent sessions. - Achieves up to 80% average token savings through context optimization and on-demand loading. - Introduces a command set for context analysis, request classification, budget checks, and token savings reporting. - Streamlined structure; removed legacy scripts and documentation for a unified optimization engine.
元数据
Slug llmcom-token-optimizer
版本 1.0.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

Llmcom Token Optimizer 是什么?

Token-efficient context format using LLMCOM specification - reduces token usage by 70-80% through compact object notation. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 82 次。

如何安装 Llmcom Token Optimizer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install llmcom-token-optimizer」即可一键安装,无需额外配置。

Llmcom Token Optimizer 是免费的吗?

是的,Llmcom Token Optimizer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Llmcom Token Optimizer 支持哪些平台?

Llmcom Token Optimizer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Llmcom Token Optimizer?

由 Shalinda Jayasinghe(@shalinda-j)开发并维护,当前版本 v1.0.1。

💬 留言讨论