ktuner

ktuner is a skill for Claude Code, Codex from alibaba/anolisa. It costs 46 tokens per session (768 once invoked), scanned B, original, Apache-2.0.

A rule-based system tuner that checks Linux kernel settings and reports diagnostic results and recommendations in JSON. The Linux kernel is the core software that manages a computer's hardware and system resources.

In plain words
What is it for?
Use it to inspect kernel settings, filter recommendations by category or confidence, ask why a parameter matters, preview changes, apply approved changes as root, and roll them back.
Why use it?
It highlights settings that may affect network, memory, storage, CPU, or security performance and explains why a change is suggested.

Skill for Claude CodeCodex ✓ vendor

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

Good fit Use it to inspect kernel settings, filter recommendations by category or confidence, ask why a parameter matters, preview changes, apply approved changes as root, and roll them back.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alibaba/anolisa/ktuner
About the project

ANOLISA is a server-side operating layer for AI agent workloads that provides terminal access, token-saving tool-output compression, runtime controls, security, observability, skills, memory, and sandbox management. It is for running and supervising agents from a Linux terminal while retaining an existing shell, agent framework, and sandbox. The catalogue add-ons are components of its agent operating environment and workflows.

alibaba/anolisa · 603 stars · on GitHub · agentic-os.sh

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 alibaba/anolisa --skill ktuner
Clone the repo
git clone --depth 1 https://github.com/alibaba/anolisa

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 ktuner

README.md
[![agentmods](https://agentmods.dev/badge/skills/alibaba/anolisa/ktuner/github.svg)](https://agentmods.dev/skills/alibaba/anolisa/ktuner)
Your own site
<a href="https://agentmods.dev/skills/alibaba/anolisa/ktuner"><img src="https://agentmods.dev/badge/skills/alibaba/anolisa/ktuner/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 ktuner

Your own site · 80×15
<a href="https://agentmods.dev/skills/alibaba/anolisa/ktuner"><img src="https://agentmods.dev/badge/skills/alibaba/anolisa/ktuner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 768 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 71
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 76
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 81
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 87
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 108
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
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.00046 $0.00768
Opus 5.5 $0.00018 $0.00307
Sonnet 5.5 $0.00009 $0.00154
Haiku 4.5 $0.00005 $0.00077

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

Security

Grade B, and why

ktuner scanned grade B with 1 finding 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 2mo 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo ktuner tune --dry-run
src/os-skills/system-admin/ktuner/SKILL.md · 109 lines

What it actually says

ktuner — 内核参数自动调优

核心能力

ktuner 是确定性规则引擎(非 LLM),评估 207 条内核调优规则,输出 JSON 格式的诊断结果和建议。

所有输出在 stdout,格式为 JSON。错误输出在 stderr,格式也是 JSON。

使用流程

第一步:诊断

ktuner check

输出示例:

{
  "score": 30,
  "predicted_score": 100,
  "total_checked": 196,
  "recommendations": [
    {
      "param": "net.ipv4.tcp_rfc1337",
      "current": "0",
      "recommended": "1",
      "reason": "防止 TIME_WAIT 状态下的 RST 攻击",
      "confidence": "high",
      "category": "security",
      "writable": true
    }
  ],
  "system": { "kernel": "6.6.102+", "cpu_cores": 2, "memory_gb": 8 },
  "workload": "mixed",
  "services": ["Nginx", "PostgreSQL"]
}

根据 score 判断是否需要调优:90+ 优秀,70-89 良好,低于 70 建议调优。

可选参数:

  • --category net|mem|io|cpu|security — 只看某一类
  • --conservative — 只看高置信度建议

第二步:向用户解释建议

遍历 recommendations 数组,用中文向用户解释每条建议的 reason 和影响。

如果用户想了解某个具体参数:

ktuner why <参数名>

第三步:应用(需要 root,必须用户确认后才执行)

⚠️ 重要:tune 和 fix 会修改内核参数,必须先向用户展示建议内容,得到明确确认后再执行。

预览模式(不修改):

sudo ktuner tune --dry-run

应用全部建议:

sudo ktuner tune

只修一个参数:

sudo ktuner fix <参数名>

第四步:回滚(如果需要)

sudo ktuner rollback

输出:

{ "restored": 5, "failed": 0, "skipped": 0, "status": "Full" }

退出码

退出码 含义
0 成功(check 时表示系统已最优)
1 check 发现有建议(不是错误,表示可以优化)
2 错误(详见 stderr 的 JSON)

约束

  • tune / fix / rollback 需要 root 权限(使用 sudo)
  • check / why 不需要 root
  • kernel.core_pattern、kernel.modprobe 等代码执行参数被禁止写入
  • 调优后如发现性能劣化,使用 sudo ktuner rollback 恢复
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. 2mo ago First seen · 109 lines · 46 tokens per session scan B c0c1d58220a2

Subscribe to this mod's changes

ktuner is a skill published in the GitHub repository alibaba/anolisa (603 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 46 tokens to every session and 768 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

ktuner compared with skills from other repositories

ktuner next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ktuneralibaba/anolisaSkill6031mo agoApache-2.0B46Claude Code, Codex
appsdesplega-ai/agent-swarmSkill1.0ktodayMITA43Claude Code
kapso-whatsappdesplega-ai/agent-swarmSkill1.0ktodayMITA156Claude Code
swarm-scriptsdesplega-ai/agent-swarmSkill1.0ktodayMITA100Claude Code
composiodesplega-ai/agent-swarmSkill1.0ktodayMITA128Claude Code
motion-design-video-analysisdesplega-ai/agent-swarmSkill1.0ktodayMITA107Claude Code
open-prompt-showreeldesplega-ai/agent-swarmSkill1.0ktodayMITA181Claude Code