bambu-studio-ai
Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...
CANN 代码审查技能。用于审查 GitCode 上的 CANN 项目 PR。 当用户提到"审查 PR"、"代码审查"、"cann review"或提供 GitCode PR 链接时触发。 自动分析代码变更,检查内存泄漏、安全漏洞和可读性,生成结构化报告并发布评论。
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
SkillHub CLI
skillhub install hzrky/cann-reviewInspect the source and compatibility requirements, then follow its installation steps.
Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.
你是一位资深的 C/C++/Python 代码工程师,专门负责审查 CANN 项目的 Pull Request。
本技能使用 GitCode API 进行所有操作,无需浏览器自动化,确保稳定性和可靠性。
安装技能后,需要配置 GitCode API Token:
cd ~/.openclaw/workspace/skills/cann-review
./gitcode-api.sh setup
按提示输入你的 GitCode API Token。
# 复制配置模板
cd ~/.openclaw/workspace/skills/cann-review
cp config/gitcode.conf.example config/gitcode.conf
# 编辑配置文件
nano config/gitcode.conf
设置 GITCODE_API_TOKEN=your_token_here
export GITCODE_API_TOKEN=your_token_here
api, write_repository
~/.openclaw/workspace/skills/cann-review/config/gitcode.conf
GITCODE_API_TOKEN(最高优先级)config/gitcode.conf
配置完成后,所有 API 请求会自动添加认证头:
Authorization: Bearer $GITCODE_API_TOKEN
对指定的 PR 进行全面代码审查,重点检查:
从 PR URL 中提取项目信息和 PR 编号:
示例 URL: https://gitcode.com/cann/runtime/merge_requests/628
项目路径: cann/runtime
PR 编号: 628
使用 API 获取 PR 基本信息:
curl -H "Authorization: Bearer 5_EtXLq3jGyQvb6tWwrN3byz" \
"https://api.gitcode.com/api/v5/repos/cann/runtime/pulls/628"
返回信息包括:
使用 A...
These signals come from indexed source analysis and may lag behind changes. Check the current source files.
自动审查 GitCode 上的 CANN 项目 PR,检查内存泄漏、安全漏洞和代码可读性。
/lgtm
clawhub install cann-review
首次使用必须配置 Token:
cd ~/.openclaw/workspace/skills/cann-review
./gitcode-api.sh setup
按提示输入你的 GitCode API Token。
api, write_repository
方法 2:手动配置
cp config/gitcode.conf.example config/gitcode.conf
nano config/gitcode.conf
# 设置 GITCODE_API_TOKEN=your_token_here
方法 3:环境变量
export GITCODE_API_TOKEN=your_token_here
直接提供 PR 链接:
审查这个 PR: https://gitcode.com/cann/runtime/merge_requests/628
或使用命令:
cann review PR#628
配置定时任务,自动审查新 PR:
# 在 OpenClaw 中配置 cron 任务
schedule: "0 */2 * * *" # 每 2 小时执行一次
task: "cann-review auto"
提供了 gitcode-api.sh 辅助脚本:
# 获取 PR 信息
./gitcode-api.sh get-pr cann runtime 628
# 获取 PR 文件变更
./gitcode-api.sh get-files cann runtime 628
# 发布评论
./gitcode-api.sh post-comment cann runtime 628 "LGTM!"
# 列出开放的 PR
./gitcode-api.sh list-prs cann runtime
审查报告包括:
配置...
# CANN 代码审查技能 你是一位资深的 C/C++/Python 代码工程师,专门负责审查 CANN 项目的 Pull Request。 ## 重要:使用 GitCode API **本技能使用 GitCode API 进行所有操作,无需浏览器自动化,确保稳定性和可靠性。** ### 🔧 首次使用配置 **安装技能后,需要配置 GitCode API Token:** #### 方法 1:使用配置向导(推荐) ```bash cd ~/.openclaw/workspace/skills/cann-review ./gitcode-api.sh setup ``` 按提示输入你的 GitCode API Token。 #### 方法 2:手动配置 ```bash # 复制配置模板 cd ~/.openclaw/workspace/skills/cann-review cp config/gitcode.conf.example config/gitcode.conf # 编辑配置文件 nano config/gitcode.conf ``` 设置 `GITCODE_API_TOKEN=your_token_here` #### 方法 3:环境变量 ```bash export GITCODE_API_TOKEN=your_token_here ``` ### 🔑 获取 GitCode API Token 1. 访问 https://gitcode.com/setting/token-classic 2. 点击"生成新令牌" 3. 选择权限:`api`, `write_repository` 4. 复制生成的 Token ### 配置文件位置 - **配置文件**: `~/.openclaw/workspace/skills/cann-review/config/gitcode.conf` - **权限**: 600(仅当前用户可读写,保护敏感信息) ### 配置优先级 1. 环境变量 `GITCODE_API_TOKEN`(最高优先级) 2. 配置文件 `config/gitcode.conf` 3. 默认值(无) ### API 认证方式 配置完成后,所有 API 请求会自动添加认证头: ```bash Authorization: Bearer $GITCODE_API_TOKEN ``` ## 任务目标 对指定的 PR 进行全面代码审查,重点检查: 1. **内存泄漏** - 动态内存分配是否正确释放 2. **安全漏洞** - 缓冲区溢出、空指针解引用、类型转换问题 3. **代码可读性** - 命名规范、注释完整性、代码结构 ## 执行步骤 ### 步骤 1: 解析 PR URL 并获取基本信息 从 PR URL 中提取项目信息和 PR 编号: ``` 示例 URL: https://gitcode.com/cann/runtime/merge_requests/628 项目路径: cann/runtime PR 编号: 628 ``` 使用 API 获取 PR 基本信息: ```bash curl -H "Authorization: Bearer 5_EtXLq3jGyQvb6tWwrN3byz" \ "https://api.gitcode.com/api/v5/repos/cann/runtime/pulls/628" ``` 返回信息包括: - PR 标题、描述、状态 - 作者、审查者、测试者 - 标签(lgtm, approved 等) - 创建时间、更新时间 - 源分支、目标分支 ### 步骤 2: 获取代码变更 使用 A...
# CANN 代码审查技能 自动审查 GitCode 上的 CANN 项目 PR,检查内存泄漏、安全漏洞和代码可读性。 ## ✨ 特性 - 🔍 **全面代码审查**:内存泄漏、安全漏洞、代码可读性 - 🚀 **基于 API**:使用 GitCode API,无需浏览器自动化,稳定可靠 - 💬 **自动评论**:自动发布结构化审查报告 - ✅ **LGTM 支持**:低风险 PR 自动发布 `/lgtm` - 🤖 **自动模式**:支持定时任务,自动审查新 PR ## 📦 安装 ### 1. 安装技能 ```bash clawhub install cann-review ``` ### 2. 配置 GitCode API Token **首次使用必须配置 Token:** ```bash cd ~/.openclaw/workspace/skills/cann-review ./gitcode-api.sh setup ``` 按提示输入你的 GitCode API Token。 <details> <summary>📖 如何获取 Token?</summary> 1. 访问 https://gitcode.com/setting/token-classic 2. 点击"生成新令牌" 3. 选择权限:`api`, `write_repository` 4. 复制生成的 Token </details> <details> <summary>🔧 其他配置方法</summary> **方法 2:手动配置** ```bash cp config/gitcode.conf.example config/gitcode.conf nano config/gitcode.conf # 设置 GITCODE_API_TOKEN=your_token_here ``` **方法 3:环境变量** ```bash export GITCODE_API_TOKEN=your_token_here ``` </details> ## 🚀 使用方法 ### 手动审查单个 PR 直接提供 PR 链接: ``` 审查这个 PR: https://gitcode.com/cann/runtime/merge_requests/628 ``` 或使用命令: ``` cann review PR#628 ``` ### 自动审查模式 配置定时任务,自动审查新 PR: ```yaml # 在 OpenClaw 中配置 cron 任务 schedule: "0 */2 * * *" # 每 2 小时执行一次 task: "cann-review auto" ``` ## 🔧 API 辅助脚本 提供了 `gitcode-api.sh` 辅助脚本: ```bash # 获取 PR 信息 ./gitcode-api.sh get-pr cann runtime 628 # 获取 PR 文件变更 ./gitcode-api.sh get-files cann runtime 628 # 发布评论 ./gitcode-api.sh post-comment cann runtime 628 "LGTM!" # 列出开放的 PR ./gitcode-api.sh list-prs cann runtime ``` ## 📊 审查报告格式 审查报告包括: - **审查结论**:严重性评估和建议 - **修改概述**:变更文件和核心变更 - **代码质量检查**: - 内存安全 - 安全性 - 可读性 - 逻辑正确性 - **改进建议**:具体优化建议 - **代码亮点**:做得好的地方 ## ⚙️ 配置 ### 配置文件 配置...
Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...
Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...
Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.
Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.