← All skills
Tencent SkillHub · Developer Tools

NightPatch

自动检测并夜间修复工作流中的低风险问题,支持一键回滚且不影响生产环境。

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

自动检测并夜间修复工作流中的低风险问题,支持一键回滚且不影响生产环境。

⬇ 0 downloads ★ 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
SKILL.md, package.json, package-lock.json, RELEASE.md, manifest.json, SECURITY_GUIDE.md

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.2

Documentation

ClawHub primary doc Primary doc: SKILL.md 28 sections Open source page

NightPatch Skill - 夜间自动修补

基于虾聊社区热门帖子「试了一下「夜间自动修补」,Master 早上起来直接用上了」的理念开发。

🎯 功能概述

在夜间自动检测并修复工作流中的小摩擦点,提供「早上起来直接用上」的惊喜体验。

1. 智能问题检测

扫描工作流中的重复性任务 识别可优化的shell命令 检测散落的笔记和文档 分析数据获取需求

2. 安全自动修补

每晚只修复一个小问题 所有改动可一键回滚 不触碰生产环境 透明操作记录

3. 清晰报告系统

自动生成修补报告 说明改动内容和原因 提供回滚指令 记录安全审计日志

基础配置

# config/default.yaml schedule: enabled: true time: "03:00" # 执行时间(24小时制) timezone: "Asia/Shanghai" safety: max_changes_per_night: 1 # 每晚最多改动数 require_rollback: true # 必须可回滚 skip_production: true # 跳过生产环境

检测器配置

detectors: shell_alias: enabled: true min_usage_count: 3 # 最少使用次数才建议创建alias note_organization: enabled: true max_scattered_files: 5 # 最多允许的散落文件数 log_optimization: enabled: true common_patterns: ["error", "warning", "info"]

安装

# 在OpenClaw工作区中 cp -r night-patch ~/.openclaw/workspace/skills/

启用

# 在OpenClaw会话中 /skill night-patch

配置

编辑 config/custom.yaml 文件自定义设置。

多层防护

沙箱执行:在隔离环境中运行 变更审计:记录所有操作日志 自动回滚:异常时自动恢复 人工监督:重要操作需要确认

安全边界

❌ 不修改系统文件 ❌ 不删除用户数据 ❌ 不发送外部消息 ❌ 不访问生产环境

📊 报告示例

  • # 夜间修补报告 - 2026-02-19
  • ## 执行摘要
  • 检测到问题:3个
  • 执行修补:1个(低风险)
  • 跳过修补:2个(需要人工确认)
  • ## 详细内容
  • ### 已执行修补
  • 1. **创建shell alias**:`ll` → `ls -la`
  • - 原因:该命令每天使用5+次
  • - 回滚:`unalias ll`
  • ### 建议修补(需要确认)
  • 1. **整理笔记**:将5个散落笔记合并到 notes/ 目录
  • 2. **优化日志查询**:创建常用查询模板
  • ## 安全审计
  • 执行时间:03:05-03:07
  • 资源使用:内存12MB,耗时2分钟
  • 安全状态:✅ 所有安全检查通过

检测阶段(03:00-03:02)

扫描工作区文件 分析命令历史 识别重复模式 评估优化价值

执行阶段(03:02-03:05)

选择最优修补项 执行安全验证 应用改动 生成回滚脚本

报告阶段(03:05-03:07)

生成详细报告 保存操作日志 更新状态文件 准备晨间简报

渐进式信任

观察期:只检测,不执行 建议期:提供建议,需要确认 自动期:自动执行低风险修补 智能期:学习偏好,个性化服务

透明原则

所有操作可追溯 所有改动可回滚 所有决策可解释 所有风险可评估

资源占用

内存:< 50MB 存储:< 10MB 执行时间:< 5分钟

成功率

问题检测准确率:> 90% 安全执行成功率:100% 用户满意度:目标 > 95%

v1.0.0 (2026-02-18)

初始版本发布 基础问题检测功能 安全执行框架 报告生成系统

常见问题

技能未执行:检查cron配置和时间设置 报告未生成:检查日志文件权限 改动被拒绝:检查安全规则配置

日志位置

执行日志:logs/night-patch-execution.log 审计日志:logs/night-patch-audit.log 错误日志:logs/night-patch-error.log

安全设计原则

最小权限:只访问必要的文件,不触碰系统文件 透明操作:所有操作都有详细日志和审计 可回滚:每个修补都提供撤销方案 用户控制:需要明确确认才执行敏感操作

文件访问说明

技能会访问以下文件: ~/.bash_history - 只读,分析命令使用频率 ~/.bashrc - 读写,仅添加新别名到.bashrc文件(可回滚) 注意:写入.bashrc而非.bash_aliases是为了更好的兼容性 工作区文件 - 只读扫描,仅在用户确认后移动 日志文件 - 只读分析,仅删除过期的旧日志

安全使用建议

先测试后使用:始终先运行 ./start.sh dry-run 审查检测结果:检查报告确认无误 谨慎启用定时:仅在信任后使用cron集成 定期检查日志:监控 logs/night-patch-audit.log

详细安全指南

完整的安全使用指南请查看:SECURITY_GUIDE.md

📚 相关资源

灵感来源:https://xialiao.ai/p/10010000000005745 社区讨论:虾聊社区 #夜间修补 开发文档:OpenClaw Skill开发指南 安全指南:SECURITY_GUIDE.md ClawHub页面:https://clawhub.ai/teachers10086/night-patch 安全第一,惊喜第二 - NightPatch设计哲学

Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
3 Docs3 Config
  • SKILL.md Primary doc
  • RELEASE.md Docs
  • SECURITY_GUIDE.md Docs
  • manifest.json Config
  • package-lock.json Config
  • package.json Config