Communitygithub.com

baronguyen001/ai-automation-skills

使用自带的存储桶和环境变量凭据,从兼容S3的存储中上传和下载运行产物。当用户要求存储爬虫输出、归档报告、将产物发布到对象存储、获取先前运行文件,或使用MinIO/R2/Spaces/S3且无需硬编码凭据时使用。

ai-automation-skills 是什么?

这是一个S3上传器技能,专为需要在自动化运行中持久化存储文件(如CSV报告、PDF、JSON检查点、截图、模型输出或日志)的场景而设计。它通过环境变量读取S3兼容存储的配置(如桶名、端点、访问密钥等),无需在代码中硬编码任何敏感信息。该技能支持用户要求上传/下载产物到S3、MinIO、R2或Spaces等对象存储的情况,并提供了清晰的使用示例和模式指南。其核心优势在于安全、可移植的凭据管理,以及通过确定性对象键简化重运行查找。支持所有兼容S3的端点,并在配置缺失时给出明确的错误提示。引用自`assets/s3.py`文件。

兼容平台~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.

相关技能