home / skills / oimiragieo / agent-studio / elon-musk-s-algorithm-for-efficiency

elon-musk-s-algorithm-for-efficiency skill

/.claude/skills/_archive/dead/elon-musk-s-algorithm-for-efficiency

This skill helps you review code using Elon Musk's algorithm for efficiency to streamline requirements, simplify, optimize, and automate development.

npx playbooks add skill oimiragieo/agent-studio --skill elon-musk-s-algorithm-for-efficiency

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.7 KB
---
name: elon-musk-s-algorithm-for-efficiency
description: Implements Elon Musk's algorithm for efficiency to streamline development processes. This rule emphasizes critical questioning, simplification, optimization, acceleration, and automation.
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit]
globs: '**/*'
best_practices:
  - Follow the guidelines consistently
  - Apply rules during code review
  - Use as reference when writing new code
error_handling: graceful
streaming: supported
---

# Elon Musk S Algorithm For Efficiency Skill

<identity>
You are a coding standards expert specializing in elon musk s algorithm for efficiency.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- |- 2. Follow Elon Musk's Algorithm for Efficiency:
  a. Question every requirement critically
  b. Delete unnecessary parts
  c. Simplify and optimize remaining components
  d. Accelerate cycle time
  e. Automate as the final step
  </instructions>

<examples>
Example usage:
```
User: "Review this code for elon musk s algorithm for efficiency compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Overview

This skill implements Elon Musk's algorithm for efficiency to streamline development processes and deliver lean, fast, maintainable code. It guides reviewers and authors to question requirements, remove waste, simplify designs, speed up cycles, and automate repeatable steps. The result is tighter code, fewer delays, and clearer decisions during development.

How this skill works

The skill inspects code and project artifacts against the five-step efficiency algorithm: critically question requirements, delete unnecessary parts, simplify and optimize the remainder, accelerate iteration, and automate routine work. It produces concrete feedback, actionable refactor suggestions, and automation opportunities tailored to JavaScript projects. Reviews include rationale for each recommendation so teams can adopt the pattern consistently.

When to use it

  • Perform pre-merge code reviews to reduce scope and complexity
  • Refactor legacy modules that accumulate technical debt
  • Design new features to minimize coupling and implementation surface
  • Optimize CI/CD pipelines and reduce cycle time
  • Identify candidates for automation in repetitive workflows

Best practices

  • Start reviews by validating the core requirement and desired outcome before proposing changes
  • Favor deletion over patching — remove code paths and config that do not serve the requirement
  • Prefer simple, well-documented solutions over clever or premature optimizations
  • Measure cycle time and target the bottlenecks with small, frequent improvements
  • Automate regression-prone tasks (builds, tests, deployments) after simplifying the flow

Example use cases

  • Review a feature branch and identify redundant modules, then propose a narrower API and tests
  • Refactor an endpoint by removing legacy flags, simplifying parameters, and replacing slow operations with cached alternatives
  • Audit CI workflows to shorten test suites, parallelize jobs, and add targeted automation for deployment
  • Assess a library to remove optional complexity, document decisions, and add a small script to automate releases

FAQ

How does the algorithm handle backward compatibility?

Prioritize the minimal surface that satisfies the requirement; keep backward compatibility only when it serves active consumers or when migration is inexpensive and low risk.

When should automation be introduced?

Introduce automation after you simplify the flow and remove waste. Automating a messy process preserves complexity; automation should solidify an already optimized path.

What metrics should I track?

Track cycle time (idea to deploy), test execution time, mean time to recovery, and code churn in targeted modules to measure improvement.

Can this be used outside JavaScript?

Yes. The principles are language-agnostic; adapt specific refactors and automation tools to your technology stack.