Communitygithub.com

baronguyen001/ai-automation-skills

使用自帶的儲存桶和環境變數憑證,從與 S3 相容的儲存服務上傳和下載執行程式產出物。當使用者要求儲存爬蟲輸出、封存報告、將產出物發佈到物件儲存、擷取先前執行檔案,或使用 MinIO/R2/Spaces/S3 而不硬編碼憑證時使用。

ai-automation-skills 是什麼?

此技能提供了一個通用的 S3 上傳器,讓 AI 代理(如 Claude Code、Cursor、Codex)能夠將檔案永續儲存到任何與 S3 相容的物件儲存服務(例如 AWS S3、MinIO、Cloudflare R2、DigitalOcean Spaces)。它完全透過環境變數來設定儲存桶、端點以及存取金鑰,無需將任何機敏資訊寫入程式碼中。當使用者需要將爬蟲輸出、報告、檢查點或日誌等產出物封存到外部儲存時,代理會叫用此技能。它會自動將 `assets/s3.py` 輔助程式碼整合到專案中,並產生確定性的物件金鑰(例如 `reports/YYYY-MM-DD/name.csv`),讓重新執行時易於尋找。此技能對於需要可靠且可攜帶的產出物儲存,卻又不想將雲端憑證寫死在程式碼中的自動化流程特別有價值。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/baronguyen001/ai-automation-skills/tree/HEAD/skills/s3-uploader

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

S3 上傳器

當自動化執行需要持久化的產出物儲存時使用此技能:CSV 報表、PDF、JSON 檢查點、螢幕截圖、模型輸出或日誌,這些資料應存在於本機之外。此輔助程式針對通用的 S3 相容儲存服務,並僅從環境變數讀取儲存桶、端點和憑證。

何時叫用

  • 使用者說:「將這份報表上傳到 S3」、「將產出物儲存到物件儲存」、「下載最後一次執行的檔案」、「使用 MinIO/R2/Spaces」。
  • 對話中的程式碼會在本機寫入檔案,但需要一個可攜帶的傳遞或封存位置。

何時不應叫用

  • 產出物僅需在同一行程內使用;保留在磁碟上即可。
  • 使用者需要一個具有快取失效和簽署 URL 功能的公開網站 CDN 工作流程。

具體範例

使用者輸入:

爬蟲完成後,將產生的 CSV 上傳到我的 S3 相容儲存桶。

輸出:

# 將 assets/s3.py 複製到你的專案中,然後:
from s3 import upload_file

key = upload_file("out/daily_report.csv", key="reports/daily_report.csv")
print("已上傳:", key)

輔助程式會從環境變數讀取 S3_BUCKET、S3_ACCESS_KEY_ID、S3_SECRET_ACCESS_KEY、可選的 S3_ENDPOINT_URL 以及可選的 S3_REGION。不會提交任何特定於目標或機密的內容。

要套用的模式

  1. 將儲存桶名稱、端點、存取金鑰和秘密金鑰僅保留在環境變數中。
  2. 使用確定性的物件金鑰,例如 reports/YYYY-MM-DD/name.csv,以便重新執行時易於尋找。
  3. 僅在本機檔案完成後才上傳;絕不串流傳輸尚未寫完的產出物。
  4. 透過傳遞 endpoint_url 來支援 S3 相容端點,而不是硬編碼 AWS。
  5. 當缺少環境變數或用戶端函式庫時,以明確的設定錯誤訊息終止。

參考資料:assets/s3.py。

來源

萃取自作者自動化專案中的實際使用經驗。v1.0.0。 另請參閱:[[csv-report-writer]]、[[playwright-pdf-snapshot]]、[[pipeline-orchestrator]]。

→ 使用 Trawlkit 構建完整的可執行機器人。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

baronguyen001/ai-automation-skills

Schedule any script to run on a recurring schedule on Windows (Task Scheduler) or Linux (cron) - register, list, and remove jobs from one command, with logging to a file and a guard against overlapping runs. Use for schedule a script, run nightly, set up a cron job, windows task scheduler, or run on a timer.

baronguyen001/ai-automation-skills

Turn a run's list of result dicts into a schema'd CSV and a Markdown table from one column spec - declare columns once, emit both, with stable ordering and safe escaping, stdlib only, no pandas. Use when the user asks to write results to CSV, export a report, make a markdown summary table, or save a run's output as a spreadsheet.

baronguyen001/ai-automation-skills

Strip HTML to clean plain text with the standard library only (no BeautifulSoup/lxml): drops script/style, turns block tags into line breaks, and collapses whitespace. Use when the user wants readable text from an HTML page/email, to clean scraped HTML before sending it to an LLM, or to build a text index from web content.

baronguyen001/ai-automation-skills

Persist records between scheduled runs as append-only JSON Lines (one object per line) with streaming reads and optional key-based dedup, stdlib only. Use when the user wants to log run results to JSONL, append events to a file, dedup records by id across runs, or keep a simple durable history without a database.

baronguyen001/ai-automation-skills

Extract text and simple table-like rows from a PDF for downstream AI without OCR binaries. Use when the user asks to read a PDF, turn a PDF into text, pull simple tables from statements/reports, or feed PDF content into an LLM pipeline.

baronguyen001/ai-automation-skills

Rotate a pool of HTTP/SOCKS proxies with round-robin selection, failure tracking, and a cooldown that benches dead proxies before retrying. BYO proxy list via env - none are shipped. Use for rotate proxies, spread requests across proxies, avoid IP bans, retry through a different proxy, or proxy health check.

baronguyen001/ai-automation-skills

Parse an RSS 2.0 or Atom feed into normalized item dicts (title, link, id, published, summary) with the standard library only - no feedparser. Use when the user asks to read an RSS/Atom feed, poll a blog/news feed, extract feed entries, or watch a site that publishes a feed.

baronguyen001/ai-automation-skills

Draft a short-form TikTok/Reels/Shorts or long-form video script from a topic and creator persona file - hook variants, beat-structured body, CTA, b-roll cues, caption overlays, and [STORY]/[NUMBER] slots so the model never fabricates personal facts. Use for write a video script, tiktok script, youtube script, or /shortform-script.

baronguyen001/ai-automation-skills

Give scheduled scripts memory between runs with one SQLite file - a seen-set for dedup, a key/value cursor to resume where you left off, and order-preserving new-item filtering. Use for dedup across runs, don't re-alert the same item, remember the last id, resume a scraper, or persist state between cron runs.

相關技能