static-code-analysis by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill static-code-analysis使用自动化工具在不执行代码的情况下分析代码,及早发现错误、安全问题和风格违规。
最小工作示例:
// .eslintrc.js
module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:security/recommended",
],
plugins: ["@typescript-eslint", "security", "import"],
rules: {
"no-console": ["warn", { allow: ["error", "warn"] }],
"no-unused-vars": "error",
"prefer-const": "error",
eqeqeq: ["error", "always"],
"no-eval": "error",
"security/detect-object-injection": "warn",
"security/detect-non-literal-regexp": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/explicit-function-return-type": "error",
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
// ... (完整实现请参阅参考指南)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/ 目录下的详细实现:
| 指南 | 内容 |
|---|---|
| ESLint 配置 | ESLint 配置 |
| Python 代码检查 (pylint + mypy) | Python 代码检查 (pylint + mypy) |
| 预提交钩子 | 预提交钩子 |
| SonarQube 集成 | SonarQube 集成 |
| 自定义 AST 分析 | 自定义 AST 分析 |
| 安全扫描 | 安全扫描 |
每周安装量
160
代码仓库
GitHub 星标数
116
首次出现
2026年1月21日
安全审计
安装于
opencode139
gemini-cli133
codex128
claude-code122
cursor118
github-copilot112
Use automated tools to analyze code without executing it, catching bugs, security issues, and style violations early.
Minimal working example:
// .eslintrc.js
module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:security/recommended",
],
plugins: ["@typescript-eslint", "security", "import"],
rules: {
"no-console": ["warn", { allow: ["error", "warn"] }],
"no-unused-vars": "error",
"prefer-const": "error",
eqeqeq: ["error", "always"],
"no-eval": "error",
"security/detect-object-injection": "warn",
"security/detect-non-literal-regexp": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/explicit-function-return-type": "error",
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| ESLint Configuration | ESLint Configuration |
| Python Linting (pylint + mypy) | Python Linting (pylint + mypy) |
| Pre-commit Hooks | Pre-commit Hooks |
| SonarQube Integration | SonarQube Integration |
| Custom AST Analysis | Custom AST Analysis |
| Security Scanning | Security Scanning |
Weekly Installs
160
Repository
GitHub Stars
116
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode139
gemini-cli133
codex128
claude-code122
cursor118
github-copilot112
CodeRabbit AI代码审查工具 - 自动化代码审查、安全检测与质量分析
1,400 周安装
Brave Search API 网络搜索功能详解:快速获取结构化网页、新闻、视频搜索结果
1,400 周安装
edge-tts:基于微软Edge神经TTS的文本转语音工具,支持多语言、可调语速音高及字幕生成
1,400 周安装
TypeScript最佳实践指南:类型优先开发、函数式模式与模块结构优化
1,400 周安装
Spring Boot验证循环:构建、代码检查、测试与安全扫描完整指南
1,600 周安装
Better Icons CLI - 从200+图标库搜索获取SVG图标,支持AI代理集成
1,500 周安装