Communitygithub.com

baronguyen001/ai-automation-skills

스크립트가 실행 간에 상태를 기억할 수 있도록 하나의 SQLite 파일을 제공합니다. 중복 제거를 위한 seen-set, 중단 지점에서 재개할 수 있는 키/값 커서, 순서를 유지하는 새 항목 필터링을 지원합니다. 실행 간 중복 제거, 동일한 항목 재알림 방지, 마지막 ID 기억, 스크레이퍼 재개, 크론 실행 간 상태 유지에 사용합니다.

ai-automation-skills란 무엇인가요?

이 스킬은 반복 실행되는 스크립트가 이전 실행에서 수행한 작업을 기억할 수 있도록 SQLite 기반의 경량 상태 관리 솔루션을 제공합니다. 중복 알림 방지, 마지막 처리 커서 저장, 순서를 유지한 새 항목 식별 등이 주요 기능이며, 별도의 서버나 추가 의존성 없이 단일 SQLite 파일로 구현됩니다. Claude Code, Cursor, Codex 등 표준 AI 에이전트 플랫폼에서 사용할 수 있으며, cron 작업이나 스케줄러가 매번 전체 데이터를 재처리하지 않도록 돕습니다. 핵심은 `filter_new`와 `mark_seen` 함수로 새 항목을 식별한 후에만 기록을 남겨 중복 처리를 방지하고, `set_cursor`/`get_cursor`로 진행 상태를 저장하여 대량 작업 중단 시 재개를 지원하며, WAL 모드와 단일 파일 백업을 권장합니다.

지원 대상~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/baronguyen001/ai-automation-skills/tree/HEAD/skills/sqlite-state

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

SQLite 상태

반복 작업이 이미 수행한 작업을 기억해야 할 때 사용하는 스킬입니다. 즉, 어떤 항목에 대해 알림을 보냈는지, 마지막으로 처리한 커서는 무엇인지 등을 기억하여 다음 실행 시 재알림이나 재스크래핑을 방지합니다. 하나의 표준 라이브러리 SQLite 파일로 서버 없이, 추가 의존성 없이 지속적이고 파일 잠금이 가능한 상태를 제공합니다.

호출 시점

  • 사용자가 "같은 것을 두 번 알리지 마", "실행 간 중복 제거", "마지막 ID 기억", "중단된 지점에서 재개"라고 말하는 경우
  • 대화 중 코드가 매번 실행 시 모든 것을 다시 처리하는 cron/스케줄 스크립트인 경우

호출하지 말아야 할 경우

  • 상태가 매우 작고 단일 실행 내에서만 일시적으로 사용되는 경우 – 일반 set/dict로 충분합니다.
  • 여러 머신이 동시에 상태를 공유해야 하는 경우 – 단일 파일 대신 실제 서버 데이터베이스를 사용합니다.

구체적인 예

사용자 입력:

제 뉴스 스크레이퍼가 매시간 동일한 헤드라인을 다시 보냅니다. 새 것만 보내도록 해주세요.

출력:

from state import filter_new, mark_seen

db = "news.db"
fresh = filter_new(db, [a["url"] for a in articles])   # 보지 않은 URL만
for url in fresh:
    send_alert(url)
mark_seen(db, *fresh)                                   # 다음 실행을 위해 기억

적용 패턴

  1. 각 항목을 배열 위치가 아닌 안정적이고 고유한 키(URL, ID, 내용 해시)로 식별합니다.
  2. filter_new로 처리할 항목을 결정하고, 작업이 성공한 후에만 mark_seen을 호출합니다.
  3. 진행 상황을 명명된 커서(set_cursor/get_cursor)로 저장하여 재개 가능한 스크레이퍼가 중간부터 다시 시작할 수 있도록 합니다.
  4. WAL 모드를 활성화하여 동시 읽기와 함께 지속적인 쓰기를 지원하고, 단일 작성자를 유지합니다.
  5. 하나의 .db 파일을 백업하거나 버전 관리합니다. 이 파일이 작업의 모든 기억입니다.

참고: assets/state.py.

출처

저자의 자동화 프로젝트에서 실제 사용을 통해 정리되었습니다. v1.0.0. 참고: [[pipeline-orchestrator]], [[cron-dispatch]], [[webhook-receiver]].

→ 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

Upload and download run artifacts from S3-compatible storage with BYO bucket and credentials from env. Use when the user asks to store scraper output, archive reports, publish artifacts to object storage, fetch a prior run file, or use MinIO/R2/Spaces/S3 without hardcoding credentials.

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.

관련 스킬