Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By Dev-GOMv1.1.1Apache-2.0In 1 marketplace
Flags functions and files over complexity, length or nesting limits after each edit, keeping a log in .complexity-log.md. Resolved issues drop out of the log when the session ends.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
1 caution to review before installing
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Monitors code complexity metrics and warns when thresholds are exceeded.
.complexity-log.md) with clickable linksThis plugin uses three hooks for comprehensive complexity tracking:
init-config.js)Runs at session start:
plugin.json.plugin-config/hook-complexity-monitor.json_pluginVersion with current plugin version_pluginVersion to current versioncheck-complexity.js)Runs immediately after Write or Edit operations:
.state/complexity-session.json)finalize-session.js)Runs when your Claude Code session ends:
.state/complexity-session.json.complexity-log.md with clickable file links/plugin install hook-complexity-monitor@dev-gom-plugins
const THRESHOLDS = {
cyclomaticComplexity: 10, // Max decision points per function
functionLength: 50, // Max lines per function
fileLength: 500, // Max lines per file
nesting: 4 // Max nesting depth
};
After editing a file, issues are tracked silently in the session file.
The consolidated log is generated/updated:
# Code Complexity Issues
Last Updated: 2025-10-14 03:45:12
## Issues by File
### [utils.js](./src/utils.js#L45)
- Function 'processData' has complexity 15 (threshold: 10)
- Max nesting depth is 6 (threshold: 4) starts at line 53
### [handlers.js](./src/handlers.js#L23)
- Function 'handleRequest' has 75 lines (threshold: 50)
Note: When you fix issues, they automatically disappear from the log at the next session end.
Measures the number of decision points in code:
if, else if, while, for, case adds 1&&, ||, ? adds 1catch adds 1Example:
function complexFunction(x, y) { // Complexity = 1 (base)
if (x > 0) { // +1 = 2
if (y > 0) { // +1 = 3
return x + y;
}
}
return 0;
}
// Total complexity: 3
Threshold: 10 (warning if exceeded)
Counts lines of code in a function.
Threshold: 50 lines (info if exceeded)
Counts total lines in a file.
Threshold: 500 lines (warning if exceeded)
Measures how deeply nested your code blocks are.
Example:
function deeplyNested() {
if (condition1) { // Depth 1
while (condition2) { // Depth 2
for (let i = 0; i < 10; i++) { // Depth 3
if (condition3) { // Depth 4
if (condition4) { // Depth 5 ⚠️ Exceeds threshold
// Code here
}
}
}
}
}
}
Threshold: 4 levels (warning if exceeded)
The plugin automatically creates a configuration file at .plugin-config/hook-complexity-monitor.json on first run.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub dev-gom/claude-code-marketplace --plugin hook-complexity-monitorPlugins from other owners that cover similar ground