Skip to content
Back to skills

Name Boolean Flags Affirmatively

ASecurity

When naming a boolean variable, parameter or attribute, phrase it affirmatively

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 17, 2026
ai-agents

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add samugit83/cortex --skill name-boolean-flags-affirmatively --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Name Boolean Flags Affirmatively?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Name Boolean Flags Affirmatively
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/samugit83-name-boolean-flags-affirmatively/badge)](https://www.skillsdirectory.com/skills/samugit83-name-boolean-flags-affirmatively)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: name-boolean-flags-affirmatively
description: When naming a boolean variable, parameter or attribute, phrase it affirmatively
---

# Boolean names

A negated name forces the reader to undo the negation at every use.

- Prefer `enabled` to `disabled`, `found` to `not_found`, `valid` to `invalid`.
- A parameter that switches behaviour off should still be named for what it
  controls, with `False` as its value, rather than named for the absence.
- Predicates that answer a question read best as `is_`, `has_` or `can_`
  followed by the thing being asked about.

The gain is at the call site: `if enabled:` needs no second thought, and
`if not disabled:` never quite does.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.