Writing Evergreen Comments
БесплатноБез исполняемых скриптовНе проверенWrite comments explaining WHAT and WHY, never temporal context or history
Об этом скилле
Writing Evergreen Comments
Overview
Comments documenting change history or implementation improvements become stale and confusing. "// Refactored from legacy system" tells nothing about current purpose.
Core principle: Comments explain WHAT code does or WHY it exists, never how it's better than before.
Violating the letter of this rule is violating the spirit of documentation.
When to Use
Use for:
- File headers (ABOUTME pattern)
- Function/class documentation
- Complex logic explanation
- Non-obvious WHY reasoning
Use ESPECIALLY when:
- Refactoring code (tempted to document the change)
- Replacing implementations (tempted to explain old vs new)
- Improving code (tempted to say "better" or "enhanced")
- Reviewing old comments (tempted to preserve history)
The Rules
NEVER Document Changes or History
Comments describe present state, not past or transitions.
// Improved error handling - used to just throw function processRequest() { }
// Recently moved from utils/ to core/ export function helper() { }
</Bad>
<Good>
```typescript
// Validates configuration against schema
class Validator {
validate(data: unknown) { }
}
// Returns error details to caller for proper handling
function processRequest() { }
// Shared utility for data transformation
export function helper() { }
NEVER Add Instructional Comments
Comments document code, not instruct developers.
// TODO: migrate all code to use this function improvedAPI() { }
</Bad>
<Good>
```typescript
// Handles async operations with automatic retry
class RetryableOperation { }
// Validates input before processing
function processInput() { }
NEVER Explain "Better" or "Improved"
Code quality shows in behavior, not comments claiming superiority.
ALWAYS Use ABOUTME for File Headers
Every file starts with 2-line header explaining purpose.
export class Validator { // ... }
</Good>
**Why ABOUTME:** Greppable pattern for finding file purposes.
```bash
grep -r "ABOUTME:" . --include="*.ts"
Quick Reference
| Bad Comment | Why Bad | Good Comment |
|---|---|---|
// Refactored from legacy |
Temporal context | // Handles user authentication |
// New error handling |
References change | // Returns errors to caller |
// Improved performance |
Claims improvement | // Caches results for 5min |
// Use this instead of X |
Instructional | // Validates async |
// Wrapper around API |
Implementation | // Fetches user data |
// Recently moved here |
Temporal context | // Shared validation logic |
When Refactoring
Rule: Remove old comments describing old behavior. Don't add new comments about the change.
Preserving Existing Comments
Critical: Never remove comments unless proven false.
// DO remove if provably wrong
// OLD COMMENT: Returns null on error
function process() {
throw new Error(); // ← Comment was false, remove it
}
// PRESERVE if still accurate
// Retries up to 3 times before failing
function fetch() {
// Even if you refactor, keep comment if behavior same
}
Red Flags - STOP and Rewrite
If you catch yourself writing:
- "Refactored", "Improved", "Better", "Enhanced", "New"
- "Old", "Legacy", "Previously", "Used to"
- "Recently", "Now", "Updated", "Modern"
- "Use this instead", "Copy this pattern", "Migrate to"
- "Was", "Changed from", "Moved from", "Unified"
STOP. Write comment describing current behavior and purpose.
Common Rationalizations
| Excuse | Reality |
|---|---|
| "Developers need to know what changed" | Git history records changes. Comments describe current state. |
| "This explains why refactoring was done" | Explain WHY current code exists, not what it replaced. |
| "Future devs should use this pattern" | Code quality speaks for itself. Don't instruct. |
| "The old comment has useful context" | If fals |
Установить Writing Evergreen Comments в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Writing Evergreen Comments?
Write comments explaining WHAT and WHY, never temporal context or history
Как установить скилл Writing Evergreen Comments?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Writing Evergreen Comments запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic