agentsop-trajectory-to-semantic-ops

agentsop-trajectory-to-semantic-ops is a skill for Claude Code, Codex from agentsope/SkillAlchemy. It costs 126 tokens per session (3,380 once invoked), scanned A, original, MIT.

A procedure for turning agent execution records into reusable rules for data operations. It examines actions, observations, exit codes, scores, and failure reasons to identify the decision constraints behind mistakes.

In plain words
What is it for?
Use it to study trajectory files and results, classify failures, and create or refine skills for data-science operations while preserving input meaning and output checks.
Why use it?
It avoids copying a whole agent run into a prompt and instead records why an operation failed. This helps an agent avoid repeating the same kind of error across different tasks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to study trajectory files and results, classify failures, and create or refine skills for data-science operations while preserving input meaning and output checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentsope/skillalchemy/agentsop-trajectory-to-semantic-ops
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add agentsope/SkillAlchemy --skill agentsop-trajectory-to-semantic-ops
Clone the repo
git clone --depth 1 https://github.com/agentsope/SkillAlchemy

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agentsop-trajectory-to-semantic-ops

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentsope/skillalchemy/agentsop-trajectory-to-semantic-ops/github.svg)](https://agentmods.dev/skills/agentsope/skillalchemy/agentsop-trajectory-to-semantic-ops)
Your own site
<a href="https://agentmods.dev/skills/agentsope/skillalchemy/agentsop-trajectory-to-semantic-ops"><img src="https://agentmods.dev/badge/skills/agentsope/skillalchemy/agentsop-trajectory-to-semantic-ops/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agentsop-trajectory-to-semantic-ops

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentsope/skillalchemy/agentsop-trajectory-to-semantic-ops"><img src="https://agentmods.dev/badge/skills/agentsope/skillalchemy/agentsop-trajectory-to-semantic-ops.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,380 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00126 $0.03380
Opus 5.5 $0.00050 $0.01352
Sonnet 5.5 $0.00025 $0.00676
Haiku 4.5 $0.00013 $0.00338

Measured 1mo ago against content hash 1201b4ba3499, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agentsop-trajectory-to-semantic-ops scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agentsop-trajectory-to-semantic-ops/SKILL.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.

执行轨迹 → 语义算子 提炼 SOP

一句话:把 agent 的一次运行轨迹(动作 + 观察 + 退出码 + 分数)压成「失败证据」,再把它翻译成带数据语义约束的可复用算子——不是把轨迹原样塞回提示词,而是提炼出「为什么这一步会错」的跨任务决策规则。

1. 何时激活本技能

下列任一情形成立时,按本 SOP 进入「轨迹提炼」工作模式:

  • 你手里有一批 agent 运行产物:trajectory.json(结构化动作流)、agent_trace.txt(可读的「动作 → 观察」)、results.jsonl(逐题分数/失败原因)。
  • 你要从失败里长出新技能,或让一个现有数据科学技能在某类操作上不再重复犯错。
  • 你在跑 SkillOpt(或类似轨迹优化器),需要把历史轨迹喂进去,但不希望污染技能正文。
  • 你关心的是跨任务可复用的操作知识,而不是某一题的具体答案。

不应激活的反面信号:见 §6 反模式与边界。

2. 核心心智模型

2.1 先分清三个「技能/算子」概念

概念 作用 你该提取的是哪一层
LOTUS 式语义算子 用自然语言描述数据变换,交由执行计划实现 不能因名字叫 sem_join 就继承其语义模型
任务能力分类(AgenticDataBench skills) 用操作模式标注/组织任务 是能力标签,不等于可直接加载的运行时技能
SKILL.md 运行时技能 执行时提供流程、知识、代码与资源 这是承载形式;贡献来自其中的机制

一句话:语义算子的价值,是保存「跨任务可复用的决策约束」,并让相邻操作能检查它们——不是把某条管线的实现代码当知识。

2.2 执行轨迹的真实结构

一条轨迹是 agent 动作的时间序列表(AgenticDataBench 实测格式):

{"kind":"message","content":"..."}
{"kind":"command","command":"bash -lc 'python3 - ...'","exit_code":0,"output":"..."}
{"kind":"command","command":"bash -lc '...'","exit_code":1,"output":"SyntaxError: ..."}

三个铁律:

  • exit_code 是失败信号,不是全部。exit≠0 的步是「哪里断了」;但 exit=0 的步也可能错在语义(算对但口径错)。
  • message 是 agent 的自我叙述,不是事实。它说「已完成」不等于产物正确;要拿命令/观察/分数交叉核对。
  • output 是观察:WROTE output.csv ROWS 10 这种回读自检,比一句「完成」可信得多。

2.3 语义算子的五字段模板

每个算子至少记录这五样(缺一不可):

组成 具体内容
适用条件 什么输入/状态下该用这个算子
输入语义 每行代表什么、连接键、键是否唯一、时间粒度、缺失键策略
操作决策 是否确需模糊匹配、阈值从哪来、一对多是否允许、未匹配如何处理
输出约束 输出粒度、键关系、连接覆盖率、行数变化、新增缺失值
验证与修复 键碰撞、多对多扩增、错误匹配;按失败类别读取对应修复说明

2.4 八类「容易出错」的操作族

先只挑 6–10 个高频且确实易错的操作族做原型:entity alignment(实体对齐)、join cardinality(连接基数)、grouped/window statistics(分组/窗口统计)、time alignment(时间对齐)、missingness(缺失)、unit handling(量纲)、train/test transformation(训练/测试转换)、artifact validation(产物校验)。

反例:join 后行数变化本身不能判错——一对多可能正是任务要求。检查器必须对照事先绑定的期望关系;没证据时给出「未验证」,不套统一规则。

3. SOP 工作流(轨迹 → 算子)

Phase 1 — 收料(collect)

收集最近 N 轮的 results.jsonl(分数/失败原因)+ 每条轨迹。只收,不改。缺了分数只剩轨迹,等于只有症状没有诊断。

Phase 2 — 压迹(trajectory → text)

Read the full file on GitHub · 205 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 205 lines · 126 tokens per session scan A 1201b4ba3499

Subscribe to this mod's changes

agentsop-trajectory-to-semantic-ops is a skill published in the GitHub repository agentsope/SkillAlchemy (513 stars, last pushed 22d ago), licensed MIT. It adds 126 tokens to every session and 3,380 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-25.

Related

agentsop-trajectory-to-semantic-ops compared with skills from other repositories

agentsop-trajectory-to-semantic-ops next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentsop-trajectory-to-semantic-opsagentsope/SkillAlchemySkill51322d agoMITA126Claude Code, Codex
kaggleshepsci/kaggle-skillSkill116todayMITA100Claude Code
karpathy-llm-wikiAstro-Han/karpathy-llm-wikiSkill2.8k4mo agoMITA67Claude Code, Codex
shellgamesMemTensor/skills-voteSkill3092mo agoMITA103Claude Code, Codex
local-ai-modelsmintuz/skillsSkill385d agoMITA97Claude Code
curl-searchMemTensor/skills-voteSkill3092mo agoMITA55Claude Code, Codex
skills-vote-localMemTensor/skills-voteSkill3092mo agoMITA28Claude Code, Codex