torvalds
CommunityRemove special cases with elegant design.
Software Engineering#design#refactoring#patterns#design-principles#software-engineering#clean-code#conditional-logic
AuthorKevin-Liu-01
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Remove the need for special-case branches when handling common data-structure operations by adjusting representation to make head and non-head cases uniform.
Core Features & Use Cases
- Change the data to remove the branch: adopt an indirect-pointer approach so head and non-head updates share a single code path.
- Change the algorithm to remove the branch: implement a single loop that updates a target pointer regardless of its position.
- Choose the representation before adding flags or special-case logic to simplify maintenance and improve readability.
Quick Start
Rewrite the target code to unify head and non-head handling by using an indirect pointer pattern that patches the target's next field without a dedicated head-case branch.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: torvalds Download link: https://github.com/Kevin-Liu-01/Agent-Machines/archive/main.zip#torvalds Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.