Install
openclaw skills install auto-sec-bloggerCollects security news from multiple sources, generates expert-level blog posts with GLM-4.7, publishes drafts to Notion, and auto-deploys approved posts to...
openclaw skills install auto-sec-blogger보안 뉴스를 자동으로 수집하고, 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
cd ~/.openclaw/workspace/skills/intelligence-agent/scripts
pip3 install -r requirements.txt
# ~/.openclaw/workspace/.env
# GLM API
GLM_API_KEY=your_glm_api_key
GLM_BASE_URL=https://api.z.ai/api/coding/paas/v4
# Notion
NOTION_API_KEY=ntn_xxx
NOTION_DATABASE_ID=xxx
# GitHub Pages
GITHUB_TOKEN=ghp_xxx
GITHUB_BLOG_REPO=username/username.github.io
BLOG_LOCAL_PATH=/path/to/blog/repo
cd ~/.openclaw/workspace/skills/intelligence-agent/scripts
python3 intelligence_pipeline.py --max-articles 5
from collector import NewsCollector
collector = NewsCollector()
articles = collector.fetch_all(max_results_per_source=15)
from writer import BlogWriter
writer = BlogWriter()
post = writer.generate_article(article_data)
from notion_publisher import NotionPublisher
publisher = NotionPublisher()
result = publisher.create_article(blog_post)
from git_publisher_service import GitPublisherService
git_publisher = GitPublisherService()
git_publisher.publish(blog_posts)
# 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
# selector.py
class ArticleSelector:
async def evaluate_and_select(self, articles, max_articles=5):
# GLM-4.7으로 기사 품질 평가
# 점수 기반 상위 기사 선별
pass
# writer.py
class BlogWriter:
async def generate_article(self, article):
# GLM-4.7으로 블로그 글 작성
# Mermaid 다이어그램 생성
# 마크다운 형식 출력
pass
# notion_publisher.py
class NotionPublisher:
def create_article(self, blog_post):
# Notion DB에 Draft 상태로 저장
# 상태: Draft → Review → Approved
pass
# git_publisher_service.py
class GitPublisherService:
def publish(self, blog_posts):
# 마크다운 파일 생성
# Git commit & push
# GitHub Actions 트리거
pass
# intelligence_pipeline.py
from apscheduler.schedulers.blocking import BlockingScheduler
scheduler = BlockingScheduler()
scheduler.add_job(run_pipeline, 'cron', hour=8, minute=30)
scheduler.start()
| 속성명 | 타입 | 설명 |
|---|---|---|
| 제목 | title | 블로그 글 제목 |
| 상태 | select | Draft/Review/Approved/Published |
| 날짜 | date | 발행일 |
| 태그 | multi_select | 키워드 |
| URL | url | 원문 URL |
| 카테고리 | select | 취약점/연구/트렌드 |
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
❌ Error: Rate limit reached (429)
해결:
❌ Error: Notion API error
해결:
❌ 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
python3 test_mermaid_fix.py
원본 저장소의 모든 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 - 프롬프트 템플릿architecture.md - 상세 아키텍처 설명prompts_guide.md - 프롬프트 작성 가이드api_reference.md - API 레퍼런스