rob-pike

Apply Rob Pike's five rules to decide whether code optimization is warranted.

124|22|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/tmdgusya/engineering-discipline --skill rob-pike
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rob-pike
Source: https://github.com/tmdgusya/engineering-discipline/tree/main/skills/rob-pike
Command: npx skills add https://github.com/tmdgusya/engineering-discipline --skill rob-pike

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rob Pike's 5 Rules provide a disciplined approach to avoid premature optimization by ensuring performance changes are based on measured data rather than guesswork.

Core Features & Use Cases

  • Measurement-first principle: always instrument and collect data before optimizing.
  • Guided decision points: steps and questions to determine if a given change is warranted.
  • Contextual applicability: use during code reviews, profiling sessions, or when performance concerns arise from users or tests.
  • Safe-guard discipline: prevents unnecessary optimizations by requiring evidence before changes.

Use cases include scenarios where a user requests speedups, or when you are about to optimize without data, ensuring changes are justified and traceable.

Quick Start

Apply Rob Pike's five rules to a code snippet to decide whether optimization is warranted.

Frequently Asked Questions about rob-pike

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

FAQPage Schema
How do I know if code optimization is actually necessary?

To prevent premature optimization, establish a measurement-first principle by instrumenting code to collect data. Use guided decision points during code reviews to verify that performance changes are fully justified by evidence.

What is the best way to identify performance root-causes before refactoring?

To identify performance root-causes, use instrumentation to collect measurement data before optimizing. This disciplined approach ensures you target actual bottlenecks with evidence rather than relying on guesswork.

When should I apply a measurement-driven approach to debugging?

Apply a measurement-driven approach to debugging when performance concerns arise from users or tests. It provides safe-guard discipline by requiring concrete data before you pursue any speedups or optimizations.

Can I optimize code without adding instrumentation first?

You should not optimize code without adding instrumentation first. Safe-guard discipline requires evidence and traceable data to justify changes, ensuring you avoid unnecessary optimizations driven by assumptions.