refactor-inline-complexity

Flag nested calls and deep attribute chains, then produce a Markdown report with extraction recommendations.

6|1|Updated Jan 5, 2026
Ready to run
npx skills add https://github.com/JordanGunn/skills --skill refactor-inline-complexity
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: refactor-inline-complexity
Source: https://github.com/JordanGunn/skills/tree/main/skills/refactor/inline-complexity
Command: npx skills add https://github.com/JordanGunn/skills --skill refactor-inline-complexity

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Audit inline complexity and recommend variable extraction. Produces a report with flattening suggestions for nested expressions.

Core Features & Use Cases

  • Flag nested calls in arguments and deep attribute chains.
  • Propose named intermediates and variable extractions to preserve behavior while improving readability.
  • Output a single Markdown report detailing findings, proposed extractions, and actionable steps.

Quick Start

Run the inline-complexity audit on a sample code snippet to generate a flattened extraction plan.

Frequently Asked Questions about refactor-inline-complexity

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor nested function calls and deep attribute chains to improve code readability?▼

Refactoring nested calls and deep attribute chains improves code readability by extracting them into named intermediate variables. This process flattens compound expressions while preserving original program semantics.

What is inline complexity in code and how do I identify it for refactoring?▼

Inline complexity in code refers to nested calls, deep attribute chains, and compound expressions that reduce readability. Identifying it involves auditing functions and modules to flag these patterns and map them to extracted variable forms.

How do I generate a report for extracting variables from complex compound expressions?▼

Generating a variable extraction report involves auditing complex compound expressions and producing a Markdown document. This report details findings, recommends named extractions, and maps original code to the proposed flattened forms.

Can I audit inline complexity across multiple functions and modules at once?▼

Yes, you can audit inline complexity across multiple functions and modules. The audit applies to broad refactoring scenarios where maintainability is the primary goal, generating a comprehensive Markdown-based extraction plan.

Does extracting variables to flatten nested calls change the original program behavior?▼

Extracting variables to flatten nested calls does not change original program behavior. The refactoring process is designed to strictly preserve semantics while proposing named intermediates for improved readability.

When should I flatten inline complexity instead of keeping compound expressions?▼

You should flatten inline complexity when readability and maintainability become primary concerns in refactoring scenarios. Deep nested calls and compound expressions that obscure logic are prime candidates for extraction.