| 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)
- Google News: ํค์๋ ๊ธฐ๋ฐ ๋ณด์ ๋ด์ค ์์ง
- arXiv: ์ต์ ๋ณด์ ์ฐ๊ตฌ ๋
ผ๋ฌธ ์์ง
- HackerNews: ํธ๋ ๋ฉ ๊ธฐ์ ๋ด์ค ์์ง
- ์ค๋ณต ์ ๊ฑฐ: URL ๊ธฐ๋ฐ ์ค๋ณต ๋ด์ค ํํฐ๋ง
2. LLM ๊ธ์ฐ๊ธฐ (Content Generation)
- ๋ชจ๋ธ: GLM-4.7 (Zhipu AI)
- ์คํ์ผ: ์ ๋ฌธ ๋ณด์ ๋ธ๋ก๊ทธ
- ๊ตฌ์กฐ:
- ์ ๋ชฉ (ํค๋๋ผ์ธ)
- ์์ฝ (3์ค ์์ฝ)
- ๋ณธ๋ฌธ (์์ธ ๋ถ์)
- ๊ฒฐ๋ก (์์ฌ์ )
- ํ๊ทธ (ํค์๋)
- Mermaid ๋ค์ด์ด๊ทธ๋จ: ๊ณต๊ฒฉ ํ๋ฆ, ์ํคํ
์ฒ ์๊ฐํ
3. Notion ํตํฉ (Notion Integration)
- ์ํ ๊ด๋ฆฌ: Draft โ Review โ Approved โ Published
- ์๋ ์ ์ฅ: ์์ฑ๋ ๊ธ ์๋ ์ ์ฅ
- ์ฌ์ฉ์ ์น์ธ: Notion์์ ์ํ ๋ณ๊ฒฝ์ผ๋ก ๋ฐฐํฌ ์น์ธ
4. Git ๊ธฐ๋ฐ ๋ฐํ (Git Publishing)
- ์๋ ์ปค๋ฐ: ๋งํฌ๋ค์ด ํ์ผ Git์ ์ปค๋ฐ
- GitHub Actions: ์๋ Jekyll ๋น๋
- GitHub Pages: ์ ์ ๋ธ๋ก๊ทธ ๋ฐฐํฌ
์ค์น
1. ์์กด์ฑ ์ค์น
cd ~/.openclaw/workspace/skills/intelligence-agent/scripts
pip3 install -r requirements.txt
2. ํ๊ฒฝ ๋ณ์ ์ค์
GLM_API_KEY=your_glm_api_key
GLM_BASE_URL=https://api.z.ai/api/coding/paas/v4
NOTION_API_KEY=ntn_xxx
NOTION_DATABASE_ID=xxx
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 NewsCollector
collector = NewsCollector()
articles = collector.fetch_all(max_results_per_source=15)
3. ๋ธ๋ก๊ทธ ๊ธ ์์ฑ๋ง
from writer import BlogWriter
writer = BlogWriter()
post = writer.generate_article(article_data)
4. Notion ๋ฐํ๋ง
from notion_publisher import NotionPublisher
publisher = NotionPublisher()
result = publisher.create_article(blog_post)
5. Git ๋ฐํ๋ง
from git_publisher_service import GitPublisherService
git_publisher = GitPublisherService()
git_publisher.publish(blog_posts)
์ํฌํ๋ก์ฐ ์์ธ
1๋จ๊ณ: ๋ด์ค ์์ง
class NewsCollector:
def fetch_google_news(self, query="security vulnerability"):
pass
def fetch_arxiv(self, category="cs.CR"):
pass
def fetch_hackernews(self):
pass
2๋จ๊ณ: AI ๊ธฐ์ฌ ์ ๋ณ
class ArticleSelector:
async def evaluate_and_select(self, articles, max_articles=5):
pass
3๋จ๊ณ: ๋ธ๋ก๊ทธ ๊ธ ์์ฑ
class BlogWriter:
async def generate_article(self, article):
pass
4๋จ๊ณ: Notion ๋ฐํ
class NotionPublisher:
def create_article(self, blog_post):
pass
5๋จ๊ณ: Git ๋ฐํ (์ฌ์ฉ์ ์น์ธ ํ)
class GitPublisherService:
def publish(self, blog_posts):
pass
Cron ์ค์ผ์ค๋ง
๋งค์ผ 08:30 ์๋ ์คํ
from apscheduler.schedulers.blocking import BlockingScheduler
scheduler = 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)
ํด๊ฒฐ:
- ์๋ ์ฌ์๋ 3ํ
- 60์ด ๋๊ธฐ ํ ์ฌ์๋
Notion API Error
โ Error: Notion API error
ํด๊ฒฐ:
- API ํค ํ์ธ
- Database ID ํ์ธ
- Integration ๊ถํ ํ์ธ
Git Push ์คํจ
โ Error: Git push failed
ํด๊ฒฐ:
- GitHub Token ํ์ธ
- ์๊ฒฉ ์ ์ฅ์ ๊ถํ ํ์ธ
- ๋ธ๋์น ํ์ธ
ํ์ผ ๊ตฌ์กฐ
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
NOTION_API_KEY
NOTION_DATABASE_ID
์ ํ์ฌํญ
GITHUB_TOKEN
GITHUB_BLOG_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 ๋ ํผ๋ฐ์ค