xskill-dev

Development guidance for xskill, a project whose agents use tools described by Python function documentation. It explains how to edit those descriptions and inspect the tool schema sent to the model.

In plain words
What is it for?
Updating tool docstrings or signatures, exporting and reviewing the generated schema, checking the expected tool count, and diagnosing context management in agent entry points.
Why use it?
It helps keep the model-facing tool descriptions and parameter definitions accurate after code changes, and helps detect context-handling problems in streaming agent runs.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/skillnerds/xskill/xskill-dev
Any agent
npx skills add SkillNerds/xskill --skill xskill-dev
Clone the repo
git clone --depth 1 https://github.com/SkillNerds/xskill

Made for: Claude Code, Codex.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 695 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00050 $0.00695
Opus 5 $0.00025 $0.00347
Sonnet 5 $0.00010 $0.00139
Haiku 4.5 $0.00005 $0.00069

Measured 2d ago against content hash b3bc5962312c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

xskill-dev 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 2d 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/xskill-dev/SKILL.md · 55 lines

What it actually says

Developing xskill

工具描述从哪来

Agno 框架直接把 @tool 装饰的 Python 函数 docstring 当作发给模型的工具描述, 参数说明也从 docstring 里解析。也就是说 docstring 就是模型上下文的一部分:

  • 写给模型看,不写内部实现细节(内部细节放代码注释)。
  • 系统提示词里不要再抄一遍工具清单,框架会自动注入 schema,抄了会漂移。
  • generate 代理的轨迹工具在 src/xskill/agents/traj_tools.py, 通用工具在 src/xskill/agents/agent_tools.py, wiki 工具在 src/xskill/agents/llm_wiki.py

改完 docstring 必跑:dump_schema

改任何工具的 docstring 或签名之后,跑一次导出脚本,看 Agno 实际生成的 schema 是什么样,确认模型看到的和你想的一致:

/home/admin/xskill/.venv/bin/python \
  scratch/standalone-generate/tool_surface/dump_schema.py

输出写在同目录 SCHEMA.txt。对照检查:

  • 每个工具的 description 是否完整、有没有被截断或混进实现细节;
  • 参数名、类型、必填项是否与函数签名一致;
  • 新增或删除工具后,工具总数是否符合预期(generate 面当前是 16 个)。

SCHEMA.txt 可以进 code review diff,reviewer 能直接看到模型侧的变化。

上下文预算的流式陷阱

_wrap_with_context_mgmt 只包 model.invoke。任何用 stream=True 跑 agent 的路径都会走 invoke_stream,完全绕过 compact、spill 和超长兜底,模型跑在 后端原生窗口里(DeepSeek 是 1M),而且日志里一条 CONTEXT 事件都不会有。 产品 GenerateAgent 用非流式 agent.run() 所以没事;写实验脚本、demo、 新 agent 入口时必须非流式,或先给 invoke_stream 补包装。判断预算机制 是否真在跑,看 agent.log 里有没有 CONTEXT 事件(Compacted context、 Spilled、Compact was not needed 任意一种)。

llm_cfg 里开剪裁的键名是 enable_spill,不是 spill

相关材料

  • 工具面设计与取舍:docs/plans/2026-08-27-generate-tool-surface.md
  • 独立实验台(Phoenix 观测、变体对比):scratch/standalone-generate/, 入口 run_experiment.pyproduct 变体加载产品 traj_tools 与产品 SYSTEM_PROMPT,是验证产品行为的首选变体。
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. 2d ago First seen · 55 lines · 50 tokens per session scan A b3bc5962312c

Subscribe to this mod's changes

xskill-dev is a skill published in the GitHub repository SkillNerds/xskill (121 stars, last pushed 3d ago), licensed MIT. It adds 50 tokens to every session and 695 once invoked, about $0.0003 per session on Opus 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-08-30.