Static Code Analysis
Skill files8 files

references/

scripts/

SKILL.md99 lines
1
---
2
name: static-code-analysis
3
description: >
4
Implement static code analysis with linters, formatters, and security scanners
5
to catch bugs early. Use when enforcing code standards, detecting security
6
vulnerabilities, or automating code review.
7
---
8
9
# Static Code Analysis
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Use automated tools to analyze code without executing it, catching bugs, security issues, and style violations early.
22
23
## When to Use
24
25
- Enforcing coding standards
26
- Security vulnerability detection
27
- Bug prevention
28
- Code review automation
29
- CI/CD pipelines
30
- Pre-commit hooks
31
- Refactoring assistance
32
33
## Quick Start
34
35
Minimal working example:
36
37
```javascript
38
// .eslintrc.js
39
module.exports = {
40
extends: [
41
"eslint:recommended",
42
"plugin:@typescript-eslint/recommended",
43
"plugin:security/recommended",
44
],
45
plugins: ["@typescript-eslint", "security", "import"],
46
rules: {
47
"no-console": ["warn", { allow: ["error", "warn"] }],
48
"no-unused-vars": "error",
49
"prefer-const": "error",
50
eqeqeq: ["error", "always"],
51
"no-eval": "error",
52
"security/detect-object-injection": "warn",
53
"security/detect-non-literal-regexp": "warn",
54
"@typescript-eslint/no-explicit-any": "warn",
55
"@typescript-eslint/explicit-function-return-type": "error",
56
"import/order": [
57
"error",
58
{
59
groups: [
60
"builtin",
61
"external",
62
"internal",
63
// ... (see reference guides for full implementation)
64
```
65
66
## Reference Guides
67
68
Detailed implementations in the `references/` directory:
69
70
| Guide | Contents |
71
|---|---|
72
| [ESLint Configuration](references/eslint-configuration.md) | ESLint Configuration |
73
| [Python Linting (pylint + mypy)](references/python-linting-pylint-mypy.md) | Python Linting (pylint + mypy) |
74
| [Pre-commit Hooks](references/pre-commit-hooks.md) | Pre-commit Hooks |
75
| [SonarQube Integration](references/sonarqube-integration.md) | SonarQube Integration |
76
| [Custom AST Analysis](references/custom-ast-analysis.md) | Custom AST Analysis |
77
| [Security Scanning](references/security-scanning.md) | Security Scanning |
78
79
## Best Practices
80
81
### ✅ DO
82
83
- Run linters in CI/CD
84
- Use pre-commit hooks
85
- Configure IDE integration
86
- Fix issues incrementally
87
- Document custom rules
88
- Share configuration across team
89
- Automate security scanning
90
91
### ❌ DON'T
92
93
- Ignore all warnings
94
- Skip linter setup
95
- Commit lint violations
96
- Use overly strict rules initially
97
- Skip security scans
98
- Disable rules without reason
99

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…