Writing Evergreen Comments

Rewrites code comments to explain WHAT and WHY with ABOUTME file headers.

Updated Nov 27, 2025
One-click install
npx skills add https://github.com/barrydobson/dotfiles_extra --skill writing-evergreen-comments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Writing Evergreen Comments
Source: https://github.com/barrydobson/dotfiles_extra/tree/main/packages/claude/dot-claude/skills/coding/writing-evergreen-comments
Command: npx skills add https://github.com/barrydobson/dotfiles_extra --skill writing-evergreen-comments

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates stale, misleading, or redundant comments that clutter code and confuse future maintainers. It ensures comments provide lasting value by focusing on intent and non-obvious decisions, rather than temporary context or code mechanics.

Core Features & Use Cases

  • Focus on WHY: Guides you to explain the rationale behind code, complex logic, or non-obvious decisions, providing crucial context for future changes.
  • Avoid Temporal Context: Prevents comments from documenting change history ("refactored from X") or temporary states, which quickly become outdated.
  • ABOUTME File Headers: Enforces a consistent, greppable two-line header for every file to quickly understand its purpose and key details.
  • Use Case: When refactoring a legacy module, instead of commenting "// Refactored from old system", use this skill to write "// This module processes financial transactions according to GAAP principles" and add an ABOUTME header.

Quick Start

Review the attached code snippet. Rewrite its comments to be evergreen, focusing on WHY and removing any temporal or instructional context. Ensure file headers use the ABOUTME pattern.

Frequently Asked Questions about Writing Evergreen Comments

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

FAQPage Schema
How do I write comments that won't become outdated as code changes?

Evergreen comments explain WHY code exists and the rationale behind decisions, not WHAT it does or HOW it works. Focus on intent, non-obvious design choices, and business logic rather than implementation details or change history, so comments remain valid through refactoring and maintenance.

What should I include in code comments during refactoring?

During refactoring, document the current state and reasoning: explain why this module or function exists, what problem it solves, and any constraints or principles it follows. Avoid temporal context like "refactored from X" or "changed because Y"; instead state present-state purpose and design intent.

Why do comments become stale and confuse maintainers?

Comments that document change history, temporary states, or implementation mechanics quickly become misleading as code evolves. Evergreen comments prevent this by focusing exclusively on lasting intent, business rules, and non-obvious decisions that remain valid across code changes and refactors.

What is an ABOUTME file header and when do I use it?

An ABOUTME header is a consistent, greppable two-line format placed at the top of every file to document its purpose and key details. Use it to give future maintainers instant clarity on what the file does and why it exists, supporting faster code navigation and understanding.

How do I document complex logic without writing comments that become wrong?

Explain the WHY behind complex logic—the business rule, constraint, or non-obvious decision it enforces—rather than describing the mechanics or control flow. This approach keeps comments valid as implementation details change, focusing on lasting intent instead of temporary structure.