weather-data-lifecycle-management
Skill này làm gì
Quản lý vòng đời và quyền sở hữu của các tệp dữ liệu thời tiết đã tải xuống. Điều này đảm bảo tệp được xóa khi không còn cần, tránh chiếm dung lượng không cần thiết.
Khi nào nên dùng
- ✓Khi một tác vụ kết thúc và để lại các tệp tạm thời.
- ✓Khi một chương trình bị lỗi vì dữ liệu nó đang dùng bị xóa quá sớm.
- ✓Khi một chương trình bị hủy và để lại các tệp chưa hoàn chỉnh.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/weather-data-lifecycle-management/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Xóa dữ liệu tạm thời không còn cần thiết sau khi tác vụ của tôi hoàn thành.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ xác định ai ‘sở hữu’ mỗi tệp và tệp cần được giữ bao lâu. Nhờ vậy, chương trình biết chính xác khi nào có thể xóa một tệp mà không gây lỗi.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.
…
Câu hỏi thường gặp
Vì sao quản lý vòng đời dữ liệu lại quan trọng?
Để tránh các tệp không cần thiết chiếm dung lượng trên máy tính và đảm bảo các tệp cần thiết không bị xóa sớm.
Điều gì xảy ra nếu tôi không dùng công cụ này?
Bạn có thể có nhiều tệp tạm thời tích lũy, hoặc tệ hơn là các chương trình ngừng hoạt động vì dữ liệu cần thiết đã bị xóa.
Công cụ này có xóa các tệp cá nhân của tôi không?
Không, công cụ được thiết kế để quản lý dữ liệu tạm thời cho các tác vụ cụ thể và bộ nhớ đệm. Tệp cá nhân hoặc các tệp xuất của người dùng không bị xóa tự động.
Chi tiết
Mô tả gốc của tác giả
Manage ownership, retention, and cleanup of downloaded weather data across one-shot jobs, interactive viewers, caches, failures, and cancellation.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #6144
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
discrawl
394kCho phép agent của bạn tìm kiếm và tóm tắt kho lưu trữ tin nhắn Discord trên máy, kiểm tra độ mới của dữ liệu và đọc tin nhắn trực tiếp.
clickhouse-io
280kGiúp agent của bạn tối ưu truy vấn và schema trong ClickHouse theo thực hành tốt nhất cho phân tích dữ liệu hiệu năng cao khi truy vấn chậm.
scientific-db-pubmed-database
280kGiúp agent của bạn tìm bài báo khoa học trong lĩnh vực y sinh. Hữu ích cho nghiên cứu cần thông tin y khoa cụ thể.