com um clique
ktuner
内核参数自动调优。分析系统配置,输出调优建议并可一键应用,支持自动回滚。使用场景:系统性能优化、安全加固、内核参数诊断。
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
内核参数自动调优。分析系统配置,输出调优建议并可一键应用,支持自动回滚。使用场景:系统性能优化、安全加固、内核参数诊断。
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Use when troubleshooting Linux server performance or stability issues — CPU saturation, high load, scheduling delay, memory pressure, OOM events, high RSS, page cache / shared memory growth, memory cgroup residue, Java heap issues, disk IO saturation or latency, packet loss, network jitter, or a server that is slow, stuck, or unstable. Performs diagnosis and surfaces recommendations; does not apply fixes automatically.
Install and configure OpenClaw non-interactively with Alibaba Cloud Model Studio. Use when the user asks to install OpenClaw, configure Aliyun Bailian/Model Studio/DashScope credentials, choose pay-as-you-go, Coding Plan, or Token Plan billing, set Base URL/model config, optionally configure DingTalk, start the local gateway service, or troubleshoot OpenClaw model/auth/channel setup.
Skill 安全状态查看、风险暴露审查、用户决策、快速扫描认证与可选深度扫描。支持用户主动查看或扫描单个/全部 Skill;当用户要求 agent 安装 Skill 且安装成功后,必须自动对最终本地目录执行快速扫描认证。
工作区快照管理。用户说"保存一下"、"存个快照"时创建 checkpoint,仅限 Linux; 说"回滚"、"撤销"、"恢复到之前"时 rollback;说"删掉快照"时 delete; 说"对比快照"、"快照改了什么"时 diff; 说"看看快照"、"有哪些快照"时 list;说"查看快照状态"、"查看快照剩余空间"时 status。
Help users configure, mount, and unmount a skillfs FUSE virtual filesystem on their local machine (e.g. for openclaw). Covers analyzing existing skill usage to suggest view configuration, generating skillfs-views.toml, mounting, and graceful unmount. Use this skill when the user asks to: set up skillfs, configure skill views, mount or unmount skillfs, check if skillfs is running, or get help organizing their skills directory (especially for openclaw users).
Use this skill when the user asks about ANOLISA, Alibaba Cloud Linux 4 Agentic Edition, cosh, Copilot Shell, AgentSecCore, AgentSight, Tokenless, ws-ckpt, OS Skills, or any component of ANOLISA. This includes questions about usage, configuration, commands, free quota, billing, pricing, authentication, or how to use specific features like switching to bash, token optimization, checkpoint rollback, security features, or deploying OpenClaw/Claude Code.
| name | ktuner |
| version | 0.1.0 |
| description | 内核参数自动调优。分析系统配置,输出调优建议并可一键应用,支持自动回滚。使用场景:系统性能优化、安全加固、内核参数诊断。 |
| layer | core |
| lifecycle | production |
| allowedTools | ["run_shell_command"] |
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 <参数名>
⚠️ 重要: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) |
sudo)kernel.core_pattern、kernel.modprobe 等代码执行参数被禁止写入sudo ktuner rollback 恢复