/SKILL.md
# 每日法律简报 - 自动化生成系统 > 为中国法律从业者打造的智能法律资讯聚合平台 ## 📌 简介 本Skill通过自动化系统每天采集中国法律相关资讯,利用智谱GLM-4.7 AI模型进行智能分析和内容生成,为法律从业者提供高效、专业、及时的信息获取渠道。 **核心特点:** - ✅ 每日自动更新(上午8:00) - ✅ AI智能筛选和分析 - ✅ 覆盖官方、媒体多源资讯 - ✅ 专业摘要和趋势洞察 - ✅ 历史归档和快速检索 - ✅ **云端自动化,无需本地开机** --- ## 🚀 快速开始 ### 前置要求 1. **GitHub账户**(免费) 2. **智谱AI API Key**(获取地址:https://open.bigmodel.cn/) 3. **Claude Agent环境** ### 5分钟快速部署 ```bash # 1. 创建项目目录 mkdir your-daily-news-skill cd your-daily-news-skill # 2. 初始化Git仓库 git init # 3. 创建基础目录结构 mkdir -p
npx skillsauth add ming39261/legal-daily-news- legal-daily-news-Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
为中国法律从业者打造的智能法律资讯聚合平台
本Skill通过自动化系统每天采集中国法律相关资讯,利用智谱GLM-4.7 AI模型进行智能分析和内容生成,为法律从业者提供高效、专业、及时的信息获取渠道。
核心特点:
# 1. 创建项目目录
mkdir your-daily-news-skill
cd your-daily-news-skill
# 2. 初始化Git仓库
git init
# 3. 创建基础目录结构
mkdir -p scripts output/archive .github/workflows
# 4. 复制必要的脚本文件
# (从本项目的scripts/目录复制)
# 5. 创建GitHub仓库并推送
# 6. 启用GitHub Pages
# 7. 配置GitHub Actions定时任务
your-daily-news)必需文件:
.github/workflows/daily-auto.yml - GitHub Actions工作流scripts/generate_brief.py - AI生成简报脚本scripts/generate_html.py - HTML转换脚本scripts/generate_index.py - 首页生成脚本scripts/auto_collect.py - 资讯采集脚本配置说明:
在.github/workflows/daily-auto.yml中配置你的API Key:
- name: 配置GLM API
run: |
echo "GLM_API_KEY=你的API密钥" >> $GITHUB_ENV
# 添加所有文件
git add .
# 提交
git commit -m "Initial commit: 每日简报系统"
# 添加远程仓库
git remote add origin https://github.com/你的用户名/your-daily-news.git
# 推送
git push -u origin main
Deploy from a branchmain → /(root)GitHub Actions会自动每天早上8点运行,无需额外配置。
手动触发:打开Actions页面 → 点击workflow → "Run workflow"
原因: Token权限不足或认证方式错误
解决方案:
# 1. 生成SSH密钥
ssh-keygen -t ed25519 -C "[email protected]" -f ~/.ssh/github_auto
# 2. 配置SSH
cat > ~/.ssh/config << 'EOF'
Host github.com
HostName ssh.github.com
Port 443
User git
IdentityFile ~/.ssh/github_auto
EOF
# 3. 显示公钥
cat ~/.ssh/github_auto.pub
# 4. 将公钥添加到GitHub
# 访问:https://github.com/settings/keys
# 点击"New SSH key",粘贴公钥内容
# 5. 更新Git远程地址
git remote set-url origin [email protected]:用户名/仓库.git
# 6. 测试连接
ssh -T [email protected]
# 安装gh CLI
brew install gh # macOS
# 登录
gh auth login
# 推送
git push origin main
常见原因:
API Key未配置
SSL证书错误
verify=False参数文件路径错误
原因: 首页HTML是静态的,不会自动扫描新的简报文件
解决方案:
创建scripts/generate_index.py,在每次生成新简报后自动重新生成首页:
def get_all_briefings():
"""扫描所有简报文件"""
html_files = glob.glob("20*.html")
html_files.sort(reverse=True)
return html_files
在workflow中添加:
- name: 生成首页(自动更新归档列表)
run: |
python3 scripts/generate_index.py
原因: API调用频率超限
解决方案:
import time
def call_glm_api(prompt, max_retries=3):
for i in range(max_retries):
try:
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
return response.json()
elif response.status_code == 429:
print(f"Rate limited, retrying in {2**i} seconds...")
time.sleep(2**i)
except Exception as e:
print(f"Error: {e}")
return None
if response.status_code == 429:
# 使用模板生成
return generate_template_brief()
原因: GitHub Pages还在部署中
解决方案:
main和/(root)原因: 使用本地脚本需要手动运行
解决方案: 使用GitHub Actions云端自动化
优势:
your-daily-news-skill/
├── .github/
│ └── workflows/
│ └── daily-auto.yml # GitHub Actions工作流
├── scripts/
│ ├── auto_collect.py # 资讯采集脚本
│ ├── generate_brief.py # AI生成简报
│ ├── generate_html.py # HTML转换
│ ├── generate_index.py # 首页生成
│ └── add_secret.py # 添加密钥工具
├── output/
│ └── archive/ # 历史简报
│ ├── 2026-01-24.md
│ └── 2026-01-24.html
├── config/
│ └── glm_config.json # GLM API配置
├── index.html # 首页(自动生成)
├── 2026-01-24.html # 最新简报(自动生成)
└── README.md # 项目说明
编辑.github/workflows/daily-auto.yml:
schedule:
# 当前:北京时间早上8点
- cron: '0 0 * * *'
# 改为北京时间早上9点
# - cron: '0 1 * * *'
# 改为每天运行两次(早8点和晚8点)
# - cron: '0 0,12 * * *'
编辑scripts/auto_collect.py,添加你的数据源:
data_sources = [
"https://www.court.gov.cn", # 最高人民法院
"https://www.spp.gov.cn", # 最高人民检察院
"https://www.moj.gov.cn", # 司法部
# 添加更多...
]
编辑scripts/generate_html.py中的CSS部分:
html_header = """<!DOCTYPE html>
<html lang="zh-CN">
<head>
<style>
/* 修改这里的CSS来自定义样式 */
body {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
</style>
</head>
</html>
"""
为法律从业者提供每日更新的法律资讯,包括:
本系统可以轻松适配到其他领域:
需要修改的地方:
scripts/auto_collect.py中的数据源URL示例:科技资讯简报
data_sources = [
"https://techcrunch.com",
"https://www.theverge.com",
# 科技媒体...
]
自动化整理学习资料,生成每日学习简报。
GitHub Actions页面:
https://github.com/你的用户名/your-daily-news/actions
可以看到:
智谱AI开放平台:
https://open.bigmodel.cn/console/usage
所有简报都保存在GitHub仓库中,自动备份。可以随时clone备份到本地:
git clone https://github.com/你的用户名/your-daily-news.git
不要:
应该:
Python脚本中添加:
try:
result = api_call()
except Exception as e:
logger.error(f"Error: {e}")
# 使用备用方案
result = fallback_method()
添加详细日志:
print(f"✅ 简报已生成: {output_file}")
print(f"📊 处理了 {len(news_items)} 条资讯")
print(f"⏱️ 耗时: {elapsed_time} 秒")
手动测试workflow:
on:
workflow_dispatch: # 允许手动触发
欢迎提交Issue和Pull Request来改进这个Skill!
本项目内容仅供学习参考使用。使用本项目生成的内容时,请遵守相关法律法规和网站使用条款。
本项目基于以下技术和工具:
最后更新: 2026-01-24
当前版本: v2.0 - 云端自动化版本
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.