ubs
在每次提交前扫描代码中的错误
AI 代理编写代码速度很快,但可能会引入空指针错误、缺失 await 语句和安全漏洞等错误。UBS 提供跨 8 种语言的预提交静态分析,可在几秒钟内捕获这些问题,防止它们进入生产环境。
Baixar o ZIP da skill
Upload no Claude
Vá em Configurações → Capacidades → Skills → Upload skill
Ative e comece a usar
Testar
A utilizar "ubs". 在我的暂存文件上运行 UBS
Resultado esperado:
Scanning 3 files (247 lines)...
Null Safety (2 errors)
src/api.ts:42:5 - Unguarded property access on potentially null object
💡 Use optional chaining: user?.profile?.email
Async/Await (1 error)
src/handlers.ts:18:3 - Missing await on promise-returning function
💡 Add await: await fetchData()
Exit code: 1
A utilizar "ubs". 对我的项目运行安全扫描
Resultado esperado:
Scanning 47 files (12,483 lines)...
Security (3 errors)
src/utils.ts:91:7 - Dangerous use of innerHTML with unsanitized data
💡 Use textContent or sanitize with DOMPurify
config.ts:15:1 - Hardcoded API key detected
💡 Move to environment variable
auth.ts:203:5 - SQL query vulnerable to injection
💡 Use parameterized queries
Exit code: 1
Auditoria de Segurança
Baixo RiscoThis skill is documentation-only for the UBS static analysis tool. All 122 static findings are false positives from code examples in the markdown documentation showing bash commands and installation instructions. No executable code is present. The skill requires users to install the external UBS tool via curl, which is standard for CLI tool installation. Risk level is low due to external command dependency.
Problemas de Baixo Risco (1)
Fatores de risco
⚙️ Comandos externos (2)
Pontuação de qualidade
O Que Você Pode Construir
预提交质量门禁
将 UBS 安装为 git pre-commit hook,在每次提交前自动扫描暂存文件。退出代码 1 会阻止提交,直到关键问题得到修复。
CI/CD 流水线集成
在持续集成期间以严格模式运行 UBS 以强制执行代码质量标准。生成 SARIF 报告以集成 GitHub 代码扫描。
AI 代理代码审查
配置 Claude Code、Cursor 或其他 AI 代理在文件写入后自动运行 UBS。即时获得关于空值安全、安全性和异步问题的反馈。
Tente Estes Prompts
在我的暂存 git 文件上运行 UBS 并显示任何关键问题
使用 UBS 对我的项目运行完整的安全扫描,并突出显示任何 XSS、注入或硬编码密钥问题
在 src/components/UserProfile.tsx 上运行 UBS 并检查空值安全和 async/await 问题
以 CI 模式运行 UBS 并输出 JSON 格式,将结果保存到 .ubs/latest.json
Melhores Práticas
- 在开发期间仅对暂存文件运行 UBS,以实现 1 秒以内的快速反馈循环
- 在 CI/CD 流水线中使用带有 fail-on-warning 的严格模式来强制执行质量标准
- 在使用 ubs:ignore 注释抑制之前调查每个发现,以避免掩盖真实错误
Evitar
- 在每次文件写入时对所有文件运行完整项目扫描,而不是仅针对更改的文件
- 在不逐个审查每个实例的情况下忽略某个类别的所有发现
- 使用 --no-verify 绕过 pre-commit hooks,而不是修复或正确抑制问题
Perguntas Frequentes
如何在我的系统上安装 UBS?
UBS 能自动修复它发现的错误吗?
如何将 UBS 与 Claude Code 集成?
如果 UBS 报告了太多误报,我该怎么办?
UBS 支持所有编程语言吗?
UBS 在大型代码库上的速度如何?
Detalhes do Desenvolvedor
Autor
DicklesworthstoneLicença
MIT
Repositório
https://github.com/Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations/tree/main/skills/ubsReferência
main
Estrutura de arquivos
📄 SKILL.md