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 wefio/NodeMemoryGraph --skill complexity-reductiongit clone --depth 1 https://github.com/wefio/NodeMemoryGraphWrote 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/wefio/nodememorygraph/complexity-reduction)<a href="https://agentmods.dev/skills/wefio/nodememorygraph/complexity-reduction"><img src="https://agentmods.dev/badge/skills/wefio/nodememorygraph/complexity-reduction/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/wefio/nodememorygraph/complexity-reduction"><img src="https://agentmods.dev/badge/skills/wefio/nodememorygraph/complexity-reduction.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.00050 | $0.01519 |
| Opus 5.5 | $0.00020 | $0.00608 |
| Sonnet 5.5 | $0.00010 | $0.00304 |
| Haiku 4.5 | $0.00005 | $0.00152 |
Grade A, and why
complexity-reduction 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 6d 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 — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Complexity reduction
Cyclomatic complexity counts linearly independent paths through a method: every
if, else if, for, while, case, catch, &&, ||, and ?: adds one.
High complexity means many paths to test and maintain. CodeFactor enforces a
threshold on the PR diff; the local
complexity:gate does the same before push.
When to use
- CodeFactor reports
Complex Methodon your PR. npm run complexity:gatefails (a changed method grew, or a new method exceeds the cap).- You are about to add branching to an already-large method.
Diagnose first
Identify which methods are over the threshold and whether you introduced them:
npx eslint --no-config-lookup --format json \
--rule '{"complexity": ["error", 15]}' <file> # per-method complexity
git show <base>:<file> | npx eslint --no-config-lookup --format json \
--stdin --stdin-filename <file> --rule '{"complexity": ["error", 15]}' # baseline (was it already complex?)
Rule-only runs must pass --no-config-lookup (ESLint 9 otherwise merges the
repo config into the run) and --format json (the text formatters are not
stable to parse).
Baseline gotcha: the gate is self-referential on main
complexity:gate defaults its baseline to the merge base with origin/main.
That is correct on a feature branch, but on main itself the merge base is
HEAD, so every violation reads "unchanged from baseline" and the gate always
reports ok. When auditing on main, or after a merge, measure against the
actually landed state:
git fetch origin
npm run complexity:gate -- --base origin/main
A failed gate names the skill to consult (this file); CodeFactor enforces the same cap on PR diffs even for methods unchanged from the baseline when their file is in the diff — reduce them anyway.
If a flagged method is unchanged from the baseline it is pre-existing debt, but CodeFactor still requires it under the threshold when the file is in the diff — reduce it anyway (it is a reviewable improvement, not a no-op).
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago Changed · +23 lines 58cc5de0a5bb
- 10d ago Changed · +2 lines 75a5896de8f0
- 1mo ago First seen · 144 lines · 50 tokens per session scan A 66faccfcf922
complexity-reduction is a skill published in the GitHub repository wefio/NodeMemoryGraph (0 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 1,519 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-09-04.
Other skills, from other repositories
code-review
Review a diff against its acceptance criteria in four segments (convention adherence, bug scan, historical-context regressions, test-coverage gaps) as a NON-implementing agent. Findings are sorted by severity, each with file:line + a failure scenario. A planted defect must be caught; a clean diff must not be…
pre-pr
Prepare a Honcho change for a pull request to plastic-labs/honcho. Invoke before opening a PR, when drafting a PR body, when asked if a branch is PR-ready, or when filling the pull request template. Checks required tests and docs, then writes Description / Proofs / Fixes.
Self-Review
Spawn a reviewer subagent with 4-6 specific verification questions before declaring non-trivial code work done. Triggers when changes are >30 LOC, multi-file, hot-path, prompt-affecting, or genuinely uncertain. Bad asks produce bad answers — this skill forces structured verification questions, not "is this good?".
github-code-review
Review PRs: diffs, inline comments via gh or REST.
simplify-code
Sequential 3-lens cleanup of recent code changes.
requesting-code-review
Pre-commit review: security scan, quality gates, auto-fix.