Borrowing it
Nothing to install: this file belongs to openshift/lightspeed-agentic-operator. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/openshift/lightspeed-agentic-operator/main/.cursor/skills/find-complexity/SKILL.mdgit clone --depth 1 https://github.com/openshift/lightspeed-agentic-operatorWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/openshift/lightspeed-agentic-operator/find-complexity)<a href="https://agentmods.dev/skills/openshift/lightspeed-agentic-operator/find-complexity"><img src="https://agentmods.dev/badge/skills/openshift/lightspeed-agentic-operator/find-complexity/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/openshift/lightspeed-agentic-operator/find-complexity"><img src="https://agentmods.dev/badge/skills/openshift/lightspeed-agentic-operator/find-complexity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.00851 |
| Opus 5.5 | $0.00018 | $0.00340 |
| Sonnet 5.5 | $0.00009 | $0.00170 |
| Haiku 4.5 | $0.00005 | $0.00085 |
Grade A, and why
find-complexity scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Find Complexity Hotspots
Identify Go functions that are hard to review, test, and maintain.
Rules
- Report findings, do not refactor. Refactoring is a separate task.
- Focus on production code (
controller/,api/,cmd/,cli/). Skip tests unless explicitly asked. - Rank by severity: highest complexity first.
Step 1: Determine Scope
Ask the user:
- Branch mode: only files changed in the current branch vs main.
- Full mode: scan the entire codebase.
For branch mode:
git diff --name-only upstream/main -- 'controller/' 'api/' 'cmd/' 'cli/' | grep '\.go$' | grep -v '_test\.go$'
Step 2: Install Prerequisites
Install gocyclo and gocognit if not available:
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install github.com/uudashr/gocognit/cmd/gocognit@latest
Step 3: Cyclomatic Complexity
gocyclo -over 10 <target>
This shows functions with cyclomatic complexity over 10.
Thresholds: 1-10 (simple), 11-20 (moderate), 21-50 (complex), 51+ (untestable).
Step 4: Cognitive Complexity
Cognitive complexity weights nesting depth — a 5-deep if scores much higher than 5 sequential ifs.
gocognit -over 15 <target>
This shows functions with cognitive complexity over 15.
Step 5: Function Length
Find long functions (50+ lines of code, excluding comments and blank lines):
for file in $(find <target> -name '*.go' -not -name '*_test.go'); do
awk '/^func / {start=NR; func=$0}
/^}/ && start {
len=NR-start;
if(len>50) print FILENAME":"start": "func" ("len" lines)"
}' "$file"
done
Step 6: Parameter Count
Find functions with too many parameters (6+):
rg "^func.*\([^)]{60,}\)" <target> -A 0
Functions with 6+ parameters are candidates for parameter objects or config structs.
Step 7: File Size
Find large files (500+ lines):
wc -l $(find <target> -name '*.go' -not -name '*_test.go') | sort -rn | head -20
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 115 lines · 46 tokens per session scan A 6cdfab92c690
find-complexity is a skill published in the GitHub repository openshift/lightspeed-agentic-operator (15 stars, last pushed today), licensed Apache-2.0. It adds 46 tokens to every session and 851 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
go-linters
Add and validate custom Go analysis linters in gh-aw.
stack-trace-go-probe
Internal helper for meta-stack-trace-investigator. Use when a Go panic or stack trace needs Go-specific nil/error checks, go test reproducer guidance, and patch targets.
golang-troubleshooting
Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, races, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve, race detection, GODEBUG tracing, and production…
golang-error-handling
Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log…
tree-sitter-language-pack-extracting-code-structure
Use when the user wants structured code metadata from a source file — functions, classes, imports, exports, symbols, docstrings, comments, or syntax diagnostics. Covers ts-pack process feature flags, the JSON result shape, and the default feature set.
tree-sitter-language-pack-parsing-source
Use when the user wants a tree-sitter syntax tree for a source file — an s-expression dump or JSON tree. Covers ts-pack parse, language auto-detection vs --language, stdin input, and reading haserrors.