Skip to content
Back to skills

Is Empty

ASecurity

Check if text is null, empty, or only whitespace

  • 10 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added June 6, 2026
testingpython

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned June 6, 2026

npx -y skills add bdambrosio/Cognitive_workbench --skill is-empty --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Is Empty?

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

Security grade badge for Is Empty
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bdambrosio-is-empty/badge)](https://www.skillsdirectory.com/skills/bdambrosio-is-empty)

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: is-empty
description: Check if text is null, empty, or only whitespace
type: python
schema_hint:
  target: "$variable or Note ID"
  out: "$variable (optional)"
parameters: none
examples:
  - '{"type":"if","condition":{"type":"tool_condition","tool":"is-empty","target":"$text"},"then":[...]}'
---

# Is Empty

Check whether text contains meaningful content or is effectively empty.

## Purpose

- Validate note content exists
- Enable conditional logic in plans
- Filter out empty results
- Guard against null/missing data

## Input Format

Accepts:
- Plain text string
- Note content

## Parameters

None.

## Output Format

Returns boolean:
- `True` if text is null, empty string, or only whitespace
- `False` if text contains any non-whitespace content

## Usage Examples

**Basic validation:**
```json
{"type":"is-empty","target":"$result","out":"$is_empty"}
```

**Used in conditional:**
```json
{"type":"is-empty","target":"$search_results","out":"$no_results"}
```

## Guidelines

- Treats null, empty string, whitespace-only as empty
- Newlines, tabs, spaces count as whitespace
- Any visible character makes content non-empty

## Examples

**Empty cases:**
```
null → true
"" → true
"   " → true
"\n\t  \n" → true
```

**Non-empty cases:**
```
"Hello" → false
" x " → false
"0" → false
```

Files in this skill

  • Skill.md1.3 KB
  • tool.py566 B

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…