code-complexity
Use when writing or reviewing functions, for guidance on parameter counts, nesting depth, function length, and single-responsibility structure.
Skill by ioncache
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ioncache-code-complexity
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/code-complexity
What's inside
- Skill name
code-complexity- Description
- Use when writing or reviewing functions, for guidance on parameter counts, nesting depth, function length, and single-responsibility structure.
- License
- MIT
- Instructions
- 90 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Code Complexity Guidelines
## Core Principles
1. Functions should be small, focused, and do one thing well
2. Prefer readability over strict metrics
3. Functions should be pure when possible
4. Avoid side effects and global state dependencies
## Hard Limits
- **Max 3 parameters**, use an object parameter for more than 3 params or
boolean flags
- **Max 3 nesting levels**, use early returns and guard clauses
- **Target under 30 lines per function**, longer is fine if cohesive and clear
- **Target cyclomatic complexity under 15**, higher is fine if the logic is
simple and related
## Key Patterns
**Use early returns to reduce nesting:**
```javascript
// Bad: Deep nesting
function process(order) {
if (order.isValid) {
if (order.items.length > 0) {
if (order.customer.isActive) {
return doWork(order)
}
}
}
return null
}
// Good: Guard clauses
function process(order) {
if (!order.isValid) {
return null
}
if (order.items.length === 0) {
return null
}
if (!order.customer.isActive) {
return null
}
return doWork(order)
}
```
**Use object parameters for related data:**
```javascript
// Bad: Too many params
function createUser(name, email, age, address, phone) {}
// Good: Grouped params
function createUser(userData) {
const { name, email, age, address, phone } = userData
}
```
**Extract complex logic into focused functions:**
```javascript
// Bad: Multiple responsibilities
function processUserData(user) {
validateUser(user)
updateDatabase(user)
sendWelcomeEmail(user)
createUserProfile(user)
}
// Good: Composed from smaller functions
function processUserData(user) {
validateUser(user)
const dbUser = updateDatabase(user)
notifyUser(dbUser)
}
```
## Review Checklist
- [ ] Single responsibility
- [ ] 3 or fewer parameters
- [ ] 3 or fewer nesting levels
- [ ] Clear, descriptive names
- [ ] No global state dependenciesFrom ioncache/ioncache-ai-tools, MIT.
More from ioncache/ioncache-ai-tools
- 0.565score
review-validate-fix-loop
ioncache
Autonomously reviews, validates, fixes, and re-reviews code within finite nested loops, preserving decisions in a per-run ledger.
SkillAFreshness: AClaude Code +9 - 0.565score
triage-errors
ioncache
Groups and fixes errors by root cause after a large change.
SkillAFreshness: AClaude Code +9 - 0.565score
verify-unresolved-pr-comments
ioncache
Analyzes unresolved review comments and PR-level feedback on the active PR without making changes.
SkillAFreshness: AClaude Code +9 - 0.565score
investigate
ioncache
Traces how a feature, workflow, or system works without changing files.
SkillAFreshness: AClaude Code +9 - 0.565score
review-code
ioncache
Reviews code for correctness, security, performance, and project standards using independent review passes.
SkillAFreshness: AClaude Code +9 - 0.559score
create-worktree
ioncache
Creates a git worktree and applies the repo's .worktree-setup.json.
SkillAFreshness: AClaude Code +9 - 0.524score
unit-tests
ioncache
Use when writing or reviewing JavaScript/TypeScript unit tests with Vitest, for BDD structure, AAAR comments, and coverage/mocking conventions.
SkillBFreshness: BClaude Code +9 - 0.524score
documentation-writing
ioncache
Use when writing or updating documentation, READMEs, commit messages, or code comments, for sentence style, punctuation, and emphasis rules.
SkillBFreshness: BClaude Code +9 - 0.524score
security
ioncache
Use when writing or reviewing API endpoints, database access, auth, or user input handling, for validation, sanitization, and secret-handling standards.
SkillBFreshness: BClaude Code +9 - 0.524score
jsdoc
ioncache
Use when writing or reviewing JSDoc on JavaScript/TypeScript functions, for required tags, typedef rules, and formatting.
SkillBFreshness: BClaude Code +9 - 0.521score
answer-questions
ioncache
Invoke before responding whenever the user asks a direct question.
SkillBFreshness: BClaude Code +9 - 0.521score
prompt-output
ioncache
Use whenever the task is to produce a prompt file (a .prompt.md file, or any "write me a prompt" request), for the required output format.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 3
- Last commit (this folder)
- Jul 29, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ioncache/ioncache-ai-tools
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ioncache
- 0.565score
investigate
ioncache
Traces how a feature, workflow, or system works without changing files.
SkillAFreshness: AClaude Code +9 - 0.565score
review-code
ioncache
Reviews code for correctness, security, performance, and project standards using independent review passes.
SkillAFreshness: AClaude Code +9 - 0.565score
review-validate-fix-loop
ioncache
Autonomously reviews, validates, fixes, and re-reviews code within finite nested loops, preserving decisions in a per-run ledger.
SkillAFreshness: AClaude Code +9 - 0.565score
triage-errors
ioncache
Groups and fixes errors by root cause after a large change.
SkillAFreshness: AClaude Code +9 - 0.565score
verify-unresolved-pr-comments
ioncache
Analyzes unresolved review comments and PR-level feedback on the active PR without making changes.
SkillAFreshness: AClaude Code +9 - 0.559score
create-worktree
ioncache
Creates a git worktree and applies the repo's .worktree-setup.json.
SkillAFreshness: AClaude Code +9
Cite this page
code-complexity skill. Agent Mart. https://agentmart.dev/skills/ioncache-code-complexity (last updated 2026-10-24)