weather-data-lifecycle-management
できること
ダウンロードした気象データファイルの寿命と所有者を管理します。不要になったファイルは削除されるようにし、無駄に容量を占有しないようにします。
使う場面
- ✓ジョブが終わった後に一時ファイルが残ったとき。
- ✓データが早く削除されすぎて、プログラムがクラッシュしたとき。
- ✓プログラムが途中でキャンセルされ、不完全なファイルが残ったとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/weather-data-lifecycle-management/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ジョブの完了後に不要になった一時データを削除してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
各ファイルの「所有者」と、保持すべき期間を定めます。これにより、プログラムは何も壊さずに、いつファイルを削除してよいかを正確に把握できます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Weather Data Lifecycle Management
Overview
Keep downloaded and derived weather data for exactly as long as its consumer needs it. Make ownership explicit so one-shot jobs clean promptly, interactive views retain their inputs until close, and shared caches are never deleted as request cleanup.
This skill governs lifetime and ownership. It does not choose a provider, decode scientific data, or define a cache eviction policy by itself.
When to Use This Skill
- A completed render leaves large temporary files behind.
- An interactive view fails because its backing data was deleted too early.
- Cancellation or exceptions leak partial downloads and derived files.
- Request-owned files and a shared user cache are mixed together.
- Background workers transfer ownership of data to a UI or later processing stage.
Classify Every Path
Assign each file or directory one owner and one lifetime:
| Class | Owner | Delete when |
|---|---|---|
| Request workspace | One operation | Operation finishes or fails after durable outputs are saved |
| Interactive-session data | Viewer or session | Final consumer closes or display creation fails |
| Shared cache | Cache manager | Explicit eviction policy permits it |
| User export | User | Never as automatic request cleanup |
| Partial file | Active writer | Failure, cancellation, or successful atomic promotion |
If ownership cannot be stated, do not delete the path. Resolve ownership first.
One-Shot Workflow
Use a request-specific temporary directory, keep all transient downloads and intermediate products inside it, and copy or atomically move only the requested artifact to its durable destination.
from pathlib import Path
from tempfile import TemporaryDirectory
def render_once(destination):
destination = Path(destination)
destination.parent.mkdir(parents=True, exist_ok=True)
with TemporaryDirectory(prefix="weather-job-") as workspace:
workspace = Path(workspace)
source = fetch_into(workspace)
temporary_output = render(source, workspace / "result.png")
temporary_output.replace(destination)
return destination
The final artifact must live outside the temporary directory. If replacement across filesystems is not atomic, copy to a temporary file beside the final destination, verify it, then replace locally.
Interactive Workflow
An interactive consumer outlives the worker that created its data. Transfer ownership only after the viewer or session is successfully created:
- The worker owns the request workspace during acquisition.
- If acquisition or display creation fails, the worker cleans it immediately.
- On successful display, attach one idempotent cleanup callback to the real consumer close or destroyed event.
- The consumer becomes the owner; the worker must not also delete the data in
its ordinary
finallypath. - If multiple consumers share the same data, release it only after the final lease closes.
Do not tie cleanup to a temporary dialog, local variable, or signal that can fire before the actual consumer is finished.
Failure and Cancellation Rules
- Keep incomplete downloads under a distinct suffix or directory so they cannot be mistaken for valid data.
- Close datasets, file handles, and memory maps before removing their paths.
- Put request-owned cleanup in
finally, but exclude resources whose ownership was successfully transferred. - Make cleanup idempotent; a cancellation signal and a close event may race.
- Preserve a durable partial-result manifest when the user can retry remaining work.
- On cleanup failure, report the exact owned path without deleting broader parent directories.
Shared Cache Boundary
- A request may read or populate a shared cache but does not own the cache root.
- Promote validated entries atomically; never expose a partial file as a hit.
- Use cache identity and eviction metadata rather than deleting files by age or filename guesswork inside request code.
- Do not place user exports inside a directory that normal cache cleanup owns.
- Test that two concurrent consumers do not remove data still leased by the other.
Verification Checklist
- Every created path has a named owner and deletion event.
- One-shot operations retain only requested durable outputs.
- Interactive data remains available until the final consumer closes.
- Display-creation failure cleans immediately.
…
よくある質問
データの寿命を管理することがなぜ重要なのですか?
不要なファイルがコンピューターの容量を圧迫するのを防ぎ、必要なファイルが早まって削除されないようにするためです。
このツールを使わなかったらどうなりますか?
一時ファイルがたまっていくか、さらに悪い場合には、必要なデータが削除されてプログラムが動かなくなることがあります。
このツールは私の個人ファイルを削除しますか?
いいえ。特定のジョブやキャッシュ用の一時データを管理するためのものです。個人のファイルやユーザーがエクスポートしたファイルは、自動では削除されません。
詳細
作者による元の説明
Manage ownership, retention, and cleanup of downloaded weather data across one-shot jobs, interactive viewers, caches, failures, and cancellation.
人気
- GitHubのスター
- 48k
- ランキング
- #6144
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
discrawl
394k保存済みのローカルなDiscordメッセージのアーカイブを検索して要約し、その新しさを確認し、ダイレクトメッセージを読めるようエージェントを支援します。
clickhouse-io
280kエージェントがClickHouseデータベースのクエリとスキーマを最適化できるようにします。高性能な分析処理向けのベストプラクティスを適用します。分析クエリが遅すぎるときに使います。
scientific-db-pubmed-database
280kエージェントが生物医学分野の科学論文を検索するのに役立ちます。特定の医療情報が必要な研究に便利です。