reduce-cognitive-complexity
Skill0 starsChanged 43 days agoNo licenceView on GitHub
Refactor functions and methods to reduce cognitive complexity — the mental effort it takes to read and follow a piece of code's control flow. Use this skill whenever refactoring code for readability, responding to a linter or code-review flag about complexity or nesting, breaking apart a function that has accumulated too many branches or loops, or when the user describes code as hard to follow, too nested, or spaghetti, or asks to clean up, simplify, or refactor a function. Covers extracting complex conditions into named functions, breaking large functions down by responsibility, replacing deep nesting with early returns, and replacing long branch chains with lookup tables.
In this repository58 other files it gives its agents.
- brand-guidelinesSkill
- canvas-designSkill
- foursight-code-assessmentSkill
- foursight-code-reviewSkill
- skill-eval-generatorSkill
- skill-eval-runnerSkill
- app-architectureSkill
- crewai-agent-architectSkill
- criticmarkupSkill
- impeccableSkill
- pr-reviewSkill
- spec-first-architect-v2Skill
- archifySkill
- drawio-skillSkill
- floorplanSkill
- marketplace-fee-calculatorSkill
- computer-useSkill
- google-agents-cli-adk-codeSkill
- google-agents-cli-deploySkill
- google-agents-cli-evalSkill
- google-agents-cli-observabilitySkill
- google-agents-cli-publishSkill
- google-agents-cli-scaffoldSkill
- google-agents-cli-workflowSkill
- directness-auditor-v2Skill
- free-dev-resourcesSkill
- finetuningSkill
- microsoft-foundrySkill
- cli-creatorSkill
- openai-docsSkill
- speechSkill
- security-best-practicesSkill
- security-ownership-mapSkill
- security-threat-modelSkill
- orca-cliSkill
- orca-linearSkill
- orca-per-workspace-envSkill
- orchestrationSkill
- superset-10xSkill
- superset-automateSkill
- superset-browserSkill
- superset-computerSkill
- superset-contributeSkill
- superset-doctorSkill
- superset-environmentSkill
- superset-feedbackSkill
- superset-integrationsSkill
- superset-orchestrateSkill
- superset-pageSkill
- superset-panesSkill
- superset-pluginsSkill
- superset-setupSkill
- superset-standupSkill
- character-design-manualSkill
- erotic-character-systemSkill
- gay-erotic-fiction-writerSkill
- gay-male-heatSkill
- writing-intelligenceSkill
The file
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

