ClaudeMods
☰
EN
● 0 online · Views 0 times
SponsorsSubmit a project
GitHub repositories · by miyabi-satoh

disk-watch

A skill collection that watches free disk space and, when it drops below a configured line, tells each session to clean up its own repository.

miyabi-satoh@miyabi-satoh

miyabi-satoh/yorozuya/tree/main/.agents/skills/cleanup/mod

Translated

About this mod

Yorozuya

A place for skills to use with Claude Code.

The skills are written as procedures for Claude to judge and carry out in the moment, rather than scripts that run fixed commands in sequence. The only skill with scripts is restart-sessions, and those scripts are limited to irreversible chains and read-only work such as watching and extracting conversation logs. The commands actually used vary with the Claude Code version, permission settings, CLAUDE.md, and other factors. When something does not work, add an instruction on the spot or have Claude investigate it.

To use a skill, place .agents/skills/<skill>/ in the skill directory of the project that will use it(.claude/skills/ for Claude Code). A symlink to the cloned location makes pulled updates arrive automatically. If you copied it, add restart-sessions' config.local.json to the using project's .gitignore(the .gitignore in this repository does not apply). If the restart-sessions context watcher is loaded as a mod(mod/), each session watches itself. To watch from outside without the mod, add a SessionStart hook to the using project's .claude/settings.json(restart-sessions README)。Place the heavy-task hook in settings.json as well(heavy-task README)。

Skills

| skill | What it does | Requirements and real-device checks | | --- | --- | --- | | restart-sessions | Restarts sessions on Herdr while carrying over the conversation log. In a project with a SessionStart hook, it watches context usage and restarts sessions with notifications without asking for confirmation | Herdr. Watching requires a status line that reports usage and config.local.json. Real-device checks: macOS and Windows 11 | | weekly-pace | Estimates Claude and Codex weekly quota pace. restart-sessions uses it to add a note that work should go to Codex when Claude is running at a high pace | On the Claude side, Herdr and a status line that reports Weekly. On the Codex side, the codex CLI | | heavy-task | Measures CPU and memory before starting heavy work and decides whether to start or wait. Its hook stops heavy commands when CPU is constrained, and its mod tells the session when capacity is available again | The using project needs .claude/heavy-commands.json, listing what counts as heavy. The hook and mod are for Claude Code(the mod uses function hooks from 2.1.289). Real-device checks: macOS only | | cleanup | Investigates disk-trash candidates and reports them, then deletes only the selected ones. The mod watches free space and, when the line is crossed, asks each session to clean up its own repository | Deletion was completed only on Windows. The mod is for Claude Code, and real-device checks were done only on macOS | | machine-setup | Installs apps and tools on a new machine and imports configuration files | Claude Code. Completed end to end only on Ubuntu(Docker) |

Each skill's prerequisites, mechanics, and usage are in the linked README. Rules for changing skills are in AGENTS.md.

Installation

Check the author's README for the marketplace and plugin name first. Commands may change as the repository evolves.

claude plugin marketplace add miyabi-satoh/yorozuya
claude plugin install disk-watch
Original text / README

Yorozuya

Claude Code に持たせる skill の置き場。

skill は、決まったコマンドを順に叩くスクリプトではなく、Claude がその場で判断して進める手順として書いている(スクリプトを持つのは restart-sessions で、後戻りできない連鎖と、読むだけの処理(見張り・会話ログの抜き出し)にとどめている)。実際に打つコマンドは、Claude Code のバージョン・権限の設定・CLAUDE.md などで変わる。うまくいかないときは、その場で指示を足すか調べさせる。

使うには、.agents/skills/<skill>/ を使う側のプロジェクトの skill ディレクトリ(Claude Code なら .claude/skills/)に置く。clone した先への symlink にすると、pull した更新がそのまま届く。写したなら、restart-sessions の config.local.json を使う側の .gitignore に足す(このリポジトリの .gitignore は効かない)。restart-sessions のコンテキストの見張りは、mod(mod/)を読み込ませれば各セッションが自分を見張る。mod を使わずに外から見張るなら、使う側の .claude/settings.json に SessionStart の hook を置く(restart-sessions の README)。heavy-task の hook も settings.json に置く(heavy-task の README)。

skill 一覧

| skill | できること | 要るもの・実機確認 | | --- | --- | --- | | restart-sessions | Herdr 上のセッションを、会話ログを引き継いで再起動する。SessionStart の hook を置いたプロジェクトで起動すると、コンテキストの使用率を見張り、知らせの出たセッションを確認なしで再起動する | Herdr。見張りには、使用率を出すステータスラインと config.local.json。実機確認は macOS・Windows 11 | | weekly-pace | Claude と Codex の週次枠の使用ペースを概算する。restart-sessions が、Claude がハイペースのとき再起動した先に Codex へ作業を回すよう書き添えるのに使う | Claude 側は Herdr と、Weekly を出すステータスライン。Codex 側は codex CLI | | heavy-task | 重い処理を始める前に CPU とメモリを測り、始めるか待つかを決める。hook が CPU の厳しいときに重いコマンドを止め、mod が空いたらセッションに知らせる | 何が重いかを書く、使う側の .claude/heavy-commands.json。hook と mod は Claude Code 用(mod は 2.1.289 の function hooks)。実機確認は macOS のみ | | cleanup | ディスクのゴミの候補を調べてレポートし、選んだものだけ消す。mod が空きを見張り、ラインを切ったら各セッションに自分のリポジトリを片付けさせる | 削除まで通したのは Windows のみ。mod は Claude Code 用で、実機確認は macOS のみ | | machine-setup | 新しいマシンにアプリ・ツールを入れ、設定ファイルを取り込む | Claude Code。最後まで通したのは Ubuntu(Docker)のみ |

各 skill の前提・仕組み・使い方は、リンク先の README にある。skill に手を入れるときの決まりは AGENTS.md にある。

Similar projects