Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ cd /path/to/parent # e.g., if repo is at ~/projects/skills, be in ~/projects
| [differential-review](plugins/differential-review/) | Security-focused differential review of code changes with git history analysis |
| [semgrep-rule-creator](plugins/semgrep-rule-creator/) | Create and refine Semgrep rules for custom vulnerability detection |
| [semgrep-rule-variant-creator](plugins/semgrep-rule-variant-creator/) | Port existing Semgrep rules to new target languages with test-driven validation |
| [sloc-initial-sweep](plugins/sloc-initial-sweep/) | Logical/physical SLOC breakdowns for audit scoping and prioritization |
| [sharp-edges](plugins/sharp-edges/) | Identify error-prone APIs, dangerous configurations, and footgun designs |
| [static-analysis](plugins/static-analysis/) | Static analysis toolkit with CodeQL, Semgrep, and SARIF parsing |
| [testing-handbook-skills](plugins/testing-handbook-skills/) | Skills from the [Testing Handbook](https://appsec.guide): fuzzers, static analysis, sanitizers, coverage |
Expand Down
38 changes: 38 additions & 0 deletions plugins/sloc-initial-sweep/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# sloc-initial-sweep

Logical/physical SLOC counter for audit scoping, with per-folder and per-language breakdowns.

## What it does
- Computes logical (NCSS) and physical SLOC.
- Supports common audit stacks: Solidity, TypeScript/JavaScript, Python, Rust, Go, Vyper.
- Highlights largest modules/files to prioritize review order.

## Layout
```
plugins/sloc-initial-sweep/
├── README.md
└── skills/sloc-initial-sweep/
├── SKILL.md
├── scripts/sloc_counter.py
├── references/SLOC_Standards.md
└── examples/sample_output.md
```

## Usage
In Claude Code (plugin baseDir provided automatically):
```
@skills/sloc-initial-sweep/SKILL.md
Calculate logical SLOC for contracts/, exclude contracts/mocks/
```

Manual script run:
```bash
python3 {baseDir}/skills/sloc-initial-sweep/scripts/sloc_counter.py <repo_root> \
--dirs contracts \
--extensions .sol \
--method logical
```

## Notes
- Default path assumes `baseDir` is the plugin root.
- Avoid writing artifacts inside target repos; keep results in scratch space.
Loading