Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Vimalk0703/shipworthy --skill code-complexitygit clone --depth 1 https://github.com/Vimalk0703/shipworthyWrote 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/vimalk0703/shipworthy/code-complexity)<a href="https://agentmods.dev/skills/vimalk0703/shipworthy/code-complexity"><img src="https://agentmods.dev/badge/skills/vimalk0703/shipworthy/code-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/vimalk0703/shipworthy/code-complexity"><img src="https://agentmods.dev/badge/skills/vimalk0703/shipworthy/code-complexity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00034 | $0.00812 |
| Opus 5.5 | $0.00014 | $0.00325 |
| Sonnet 5.5 | $0.00007 | $0.00162 |
| Haiku 4.5 | $0.00003 | $0.00081 |
Grade A, and why
code-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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Complexity
Limits at a Glance
| Metric | Limit | Action When Exceeded |
|---|---|---|
| Cyclomatic complexity | < 15 per function | Extract helper functions |
| Function length | ~50 lines max | Split into focused functions |
| File length | ~300 lines max | Extract modules/classes |
| Nesting depth | Max 4 levels | Early returns, extract functions |
| Parameter count | Max 4-5 params | Use an options/config object |
| Duplicate blocks | > 3 lines repeated 2+ times | Extract shared function |
Cyclomatic Complexity (< 15 per function)
Each if, else, case, &&, ||, catch, and ternary adds 1. When a function exceeds 15, extract validation, branching logic, or case handling into separate functions.
Function Length (~50 Lines Max)
If you need a comment like // Step 3: ..., that step is its own function.
// BAD -- 120-line function with section comments
function handleRequest(req: Request) { /* validate, fetch, transform, respond */ }
// GOOD -- each concern is a named function
function handleRequest(req: Request) {
const input = validateInput(req);
const data = fetchDependencies(input);
return saveAndRespond(transformData(data));
}
Deep Nesting (Max 4 Levels)
// BAD -- 5 levels deep
function process(items) {
if (items) {
for (const item of items) {
if (item.active) {
if (item.type === 'premium') {
if (item.balance > 0) { /* buried logic */ }
}
}
}
}
}
// GOOD -- flat with early returns and filtering
function process(items) {
if (!items) return;
const eligible = items.filter(i => i.active && i.type === 'premium' && i.balance > 0);
for (const item of eligible) { /* top-level logic */ }
}
Parameter Count (Max 4-5)
// BAD -- 7 positional params
function createUser(name, email, role, team, avatar, locale, timezone) { ... }
// GOOD -- options object
interface CreateUserOptions {
name: string; email: string; role: Role;
team?: string; avatar?: string; locale?: string; timezone?: string;
}
function createUser(options: CreateUserOptions) { ... }
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 · 104 lines · 34 tokens per session scan A 3a0ca3b3ae22
code-complexity is a skill published in the GitHub repository Vimalk0703/shipworthy (6 stars, last pushed 6mo ago), licensed MIT. It adds 34 tokens to every session and 812 once invoked, about $0.0001 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-09-03.
Other skills, from other repositories
code-comment-discipline
Apply whenever writing or editing source code in any core's build agent (backend-eng, ui-builder, or equivalent). Governs when a comment belongs at all and what it may say. Default is no comment; a comment is only for the non-obvious. Never restates what the code does, never narrates the task, fix, or conversation…
dare-review
Audita uma task DARE implementada — cruza a spec com o código real para detectar stubs, mocks fora de testes, funções vazias, TODOs e validar critério-a-critério se a implementação satisfaz o que a spec prometeu. Use antes de marcar uma task como DONE, ou quando o dev pedir revisão manual. Combina análise estática…
code-review
Reviews code following team development standards. Use when reviewing code, checking PRs, or before merging.
tech-debt
Track, categorize and prioritize technical debt across the codebase — scans for debt indicators, maintains a register.
review-pr
Perform a comprehensive code review of a pull request.
sonarqube
Analyze SonarCloud quality issues for a specific PR.