Auto Sec Blogger Repo
by @rebugui
Collects security news from multiple sources, generates expert-level blog posts with GLM-4.7, publishes drafts to Notion, and auto-deploys approved posts to...
clawhub install auto-sec-blogger-repoπ About This Skill
name: auto-sec-blogger description: AI-powered security blog automation system (identical to github.com/rebugui/intelligence-agent). Collects news from Google News, arXiv, HackerNews β generates blog posts with GLM-4.7 β publishes to Notion β auto-deploys to GitHub Pages via Git. Features Human-in-the-Loop approval workflow. Use when you want to automate blog writing, news collection, or content generation with the exact functionality of the original intelligence-agent repository. Triggers: "λΈλ‘κ·Έ κΈ μμ±", "보μ λ΄μ€ λ°ν", "κΉν λΈλ‘κ·Έ λ°ν", "intelligence agent", "μ§λ₯ν μμ΄μ νΈ", "μλ κΈμ°κΈ°".
Intelligence Agent
κ°μ
보μ λ΄μ€λ₯Ό μλμΌλ‘ μμ§νκ³ , LLM(GLM-4.7)μ μ¬μ©νμ¬ μ λ¬Έκ° μμ€μ λΈλ‘κ·Έ κΈμ μμ±ν ν, Notionκ³Ό GitHub Pagesμ μλμΌλ‘ κ²μνλ μμ€ν μ λλ€.
GitHub μ μ₯μμ λμΌ: https://github.com/rebugui/intelligence-agent
μν€ν μ²
λ΄μ€ μμ§ (Google News, arXiv, HackerNews)
β
GLM-4.7 κΈ μμ± (μ λ¬Έ 보μ λΈλ‘κ·Έ)
β
Notion Draft μ μ₯ (μν: Draft)
β
μ¬μ©μ κ²ν λ° μΉμΈ (Human-in-the-Loop)
β
Git Push β GitHub Actions β GitHub Pages
μ£Όμ κΈ°λ₯
1. λ΄μ€ μμ§ (News Collection)
2. LLM κΈμ°κΈ° (Content Generation)
3. Notion ν΅ν© (Notion Integration)
4. Git κΈ°λ° λ°ν (Git Publishing)
μ€μΉ
1. μμ‘΄μ± μ€μΉ
cd ~/.openclaw/workspace/skills/intelligence-agent/scripts
pip3 install -r requirements.txt
2. νκ²½ λ³μ μ€μ
# ~/.openclaw/workspace/.envGLM API
GLM_API_KEY=your_glm_api_key
GLM_BASE_URL=https://api.z.ai/api/coding/paas/v4Notion
NOTION_API_KEY=ntn_xxx
NOTION_DATABASE_ID=xxxGitHub Pages
GITHUB_TOKEN=ghp_xxx
GITHUB_BLOG_REPO=username/username.github.io
BLOG_LOCAL_PATH=/path/to/blog/repo
μ¬μ©λ²
1. μ 체 νμ΄νλΌμΈ μ€ν (ν μ€νΈμ©)
cd ~/.openclaw/workspace/skills/intelligence-agent/scripts
python3 intelligence_pipeline.py --max-articles 5
2. λ΄μ€ μμ§λ§
from collector import NewsCollectorcollector = NewsCollector()
articles = collector.fetch_all(max_results_per_source=15)
3. λΈλ‘κ·Έ κΈ μμ±λ§
from writer import BlogWriterwriter = BlogWriter()
post = writer.generate_article(article_data)
4. Notion λ°νλ§
from notion_publisher import NotionPublisherpublisher = NotionPublisher()
result = publisher.create_article(blog_post)
5. Git λ°νλ§
from git_publisher_service import GitPublisherServicegit_publisher = GitPublisherService()
git_publisher.publish(blog_posts)
μν¬νλ‘μ° μμΈ
1λ¨κ³: λ΄μ€ μμ§
# collector.py
class NewsCollector:
def fetch_google_news(self, query="security vulnerability"):
# Google News RSS νΌλμμ μμ§
pass def fetch_arxiv(self, category="cs.CR"):
# arXiv 보μ λ
Όλ¬Έ μμ§
pass
def fetch_hackernews(self):
# HackerNews νΈλ λ© κΈ°μ¬ μμ§
pass
2λ¨κ³: AI κΈ°μ¬ μ λ³
# selector.py
class ArticleSelector:
async def evaluate_and_select(self, articles, max_articles=5):
# GLM-4.7μΌλ‘ κΈ°μ¬ νμ§ νκ°
# μ μ κΈ°λ° μμ κΈ°μ¬ μ λ³
pass
3λ¨κ³: λΈλ‘κ·Έ κΈ μμ±
# writer.py
class BlogWriter:
async def generate_article(self, article):
# GLM-4.7μΌλ‘ λΈλ‘κ·Έ κΈ μμ±
# Mermaid λ€μ΄μ΄κ·Έλ¨ μμ±
# λ§ν¬λ€μ΄ νμ μΆλ ₯
pass
4λ¨κ³: Notion λ°ν
# notion_publisher.py
class NotionPublisher:
def create_article(self, blog_post):
# Notion DBμ Draft μνλ‘ μ μ₯
# μν: Draft β Review β Approved
pass
5λ¨κ³: Git λ°ν (μ¬μ©μ μΉμΈ ν)
# git_publisher_service.py
class GitPublisherService:
def publish(self, blog_posts):
# λ§ν¬λ€μ΄ νμΌ μμ±
# Git commit & push
# GitHub Actions νΈλ¦¬κ±°
pass
Cron μ€μΌμ€λ§
λ§€μΌ 08:30 μλ μ€ν
# intelligence_pipeline.py
from apscheduler.schedulers.blocking import BlockingSchedulerscheduler = BlockingScheduler()
scheduler.add_job(run_pipeline, 'cron', hour=8, minute=30)
scheduler.start()
Notion λ°μ΄ν°λ² μ΄μ€ ꡬ쑰
νμ μμ±
| μμ±λͺ | νμ | μ€λͺ | |--------|------|------| | μ λͺ© | title | λΈλ‘κ·Έ κΈ μ λͺ© | | μν | select | Draft/Review/Approved/Published | | λ μ§ | date | λ°νμΌ | | νκ·Έ | multi_select | ν€μλ | | URL | url | μλ¬Έ URL | | μΉ΄ν κ³ λ¦¬ | select | μ·¨μ½μ /μ°κ΅¬/νΈλ λ |
Jekyll λΈλ‘κ·Έ ꡬ쑰
blog/
βββ _posts/
β βββ 2025-03-09-cve-2025-xxxx-analysis.md
β βββ 2025-03-09-ai-security-trends.md
β βββ ...
βββ _layouts/
β βββ post.html
β βββ default.html
βββ _config.yml
βββ .github/
βββ workflows/
βββ jekyll.yml
νΈλ¬λΈμν
GLM API Rate Limit
β Error: Rate limit reached (429)
ν΄κ²°:
Notion API Error
β Error: Notion API error
ν΄κ²°:
Git Push μ€ν¨
β Error: Git push failed
ν΄κ²°:
νμΌ κ΅¬μ‘°
intelligence-agent/
βββ SKILL.md (μ΄ νμΌ)
βββ scripts/
β βββ intelligence_pipeline.py (λ©μΈ νμ΄νλΌμΈ)
β βββ collector.py (λ΄μ€ μμ§)
β βββ selector.py (AI κΈ°μ¬ μ λ³)
β βββ writer.py (λΈλ‘κ·Έ κΈ μμ±)
β βββ notion_publisher.py (Notion λ°ν)
β βββ git_publisher_service.py (Git λ°ν)
β βββ llm_client.py (GLM API ν΄λΌμ΄μΈνΈ)
β βββ llm_client_async.py (λΉλκΈ° GLM ν΄λΌμ΄μΈνΈ)
β βββ prompt_manager.py (ν둬ννΈ κ΄λ¦¬)
β βββ prompts.yaml (ν둬ννΈ ν
νλ¦Ώ)
β βββ models.py (λ°μ΄ν° λͺ¨λΈ)
β βββ utils.py (μ νΈλ¦¬ν°)
β βββ config.py (μ€μ )
β βββ requirements.txt (μμ‘΄μ±)
βββ references/
βββ architecture.md (μμΈ μν€ν
μ²)
βββ prompts_guide.md (ν둬ννΈ κ°μ΄λ)
βββ api_reference.md (API λ νΌλ°μ€)
νκ²½ λ³μ
νμ
GLM_API_KEY # GLM-4.7 API ν€
NOTION_API_KEY # Notion API ν€
NOTION_DATABASE_ID # Notion λ°μ΄ν°λ² μ΄μ€ ID
μ νμ¬ν
GITHUB_TOKEN # GitHub κ°μΈ μ‘μΈμ€ ν ν°
GITHUB_BLOG_REPO # GitHub λΈλ‘κ·Έ μ μ₯μ (username/repo)
BLOG_LOCAL_PATH # λ‘컬 λΈλ‘κ·Έ κ²½λ‘
ν μ€νΈ
μ 체 νμ΄νλΌμΈ ν μ€νΈ
python3 test_full_pipeline.py
Mermaid λ€μ΄μ΄κ·Έλ¨ ν μ€νΈ
python3 test_mermaid_fix.py
μ°Έκ³ μλ£
리μμ€
scripts/
μλ³Έ μ μ₯μμ λͺ¨λ Python μ€ν¬λ¦½νΈ ν¬ν¨:intelligence_pipeline.py - μ 체 νμ΄νλΌμΈ μ€νcollector.py - λ΄μ€ μμ§κΈ°selector.py - AI κΈ°μ¬ μ λ³writer.py - λΈλ‘κ·Έ κΈ μμ±notion_publisher.py - Notion λ°νgit_publisher_service.py - Git λ°νllm_client.py - GLM API ν΄λΌμ΄μΈνΈprompts.yaml - ν둬ννΈ ν
νλ¦Ώreferences/
architecture.md - μμΈ μν€ν
μ² μ€λͺ
prompts_guide.md - ν둬ννΈ μμ± κ°μ΄λapi_reference.md - API λ νΌλ°μ€