consistent-aliases

Installation
SKILL.md

Be Consistent in Your Use of Aliases

Overview

If you create an alias, use it consistently.

When you assign an object property to a variable, you create an alias. TypeScript tracks them separately, so narrowing one doesn't narrow the other. Choose one and stick with it.

When to Use This Skill

  • Type narrowing isn't working as expected
  • Using both a variable and its source property
  • Property checks not affecting aliased variables
  • Refinements being "lost" after function calls

The Iron Rule

One alias OR the original - never mix them in the same scope.
Related skills
Installs
9
GitHub Stars
2
First Seen
Feb 3, 2026