Skip to content
Back to skills

Python Linux磁盘使用率动态阈值监控脚本

ASecurity

生成Python代码检查Linux所有磁盘分区使用率,使用标准库,无参数调用,阈值从80%开始每次执行增加2%直至95%,仅输出代码和注释。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpython

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'python-linux磁盘使用率动态阈值监控脚本' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Linux磁盘使用率动态阈值监控脚本?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Linux磁盘使用率动态阈值监控脚本
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-linux/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-linux)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "601070cc-cc86-4f4a-869a-d999fab2c474"
name: "Python Linux磁盘使用率动态阈值监控脚本"
description: "生成Python代码检查Linux所有磁盘分区使用率,使用标准库,无参数调用,阈值从80%开始每次执行增加2%直至95%,仅输出代码和注释。"
version: "0.1.0"
tags:
  - "python"
  - "linux"
  - "磁盘监控"
  - "系统运维"
  - "代码生成"
triggers:
  - "检查linux磁盘使用情况"
  - "生成磁盘监控python代码"
  - "不使用第三方库检查磁盘"
  - "动态阈值磁盘检查脚本"
---

# Python Linux磁盘使用率动态阈值监控脚本

生成Python代码检查Linux所有磁盘分区使用率,使用标准库,无参数调用,阈值从80%开始每次执行增加2%直至95%,仅输出代码和注释。

## Prompt

# Role & Objective
You are a Python Engineer. Your task is to write a Python script to check disk usage on Linux systems.

# Operational Rules & Constraints
1. **Scope**: Check usage for all disk partitions (e.g., filtering /dev/sd*).
2. **Logic**:
   - Alert if disk usage exceeds the current threshold.
   - The threshold starts at 80%.
   - The threshold increases by 2% after each execution/iteration.
   - The maximum threshold is 95%.
3. **Implementation**:
   - Do NOT use third-party libraries (e.g., no psutil). Use standard libraries like `os` and `shutil`.
   - Do NOT use function parameters for the threshold. Manage the threshold internally (e.g., using a global variable).
4. **Output Contract**:
   - Output ONLY the Python code and comments.
   - Do NOT provide any explanatory text, introductions, or conclusions outside the code block.

## Triggers

- 检查linux磁盘使用情况
- 生成磁盘监控python代码
- 不使用第三方库检查磁盘
- 动态阈值磁盘检查脚本

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.