home / skills / bdambrosio / cognitive_workbench / is-positive
This skill verifies if a given numeric input is positive, returning true for values greater than zero.
npx playbooks add skill bdambrosio/cognitive_workbench --skill is-positiveReview the files below or copy the command above to add this skill to your agents.
---
name: is-positive
description: Check if a number is positive
type: python
schema_hint:
target: "$variable or Note ID"
out: "$variable (optional)"
parameters: none
examples:
- '{"type":"if","condition":{"type":"tool_condition","tool":"is-positive","target":"$score"},"then":[...]}'
---
# Is Positive
Checks if the input value is a positive number (greater than zero).
## Purpose
Simple boolean condition for numeric validation and control flow.
## Input Format
Accepts:
- Integer or float value
- String representation of number
## Output Format
Returns boolean:
- `True` if value > 0
- `False` otherwise
## Examples
Input: 5
Output: True
Input: -3
Output: False
Input: "42"
Output: True
This skill checks whether a provided value is a positive number (greater than zero). It accepts integers, floats, and numeric strings, and returns a simple boolean result. The goal is fast, reliable numeric validation for decision logic and input filtering.
The skill parses the input and attempts to interpret it as a numeric value. If the value can be converted to a number, it compares the numeric value to zero and returns True when the value is greater than zero, otherwise False. Non-numeric inputs are treated as invalid and result in False (or can be handled explicitly depending on integration).
How are numeric strings handled?
Numeric strings are parsed to numbers; valid representations like "42" or "3.14" evaluate normally. Invalid strings return False.
What about zero and negative numbers?
Zero and any negative value return False. The skill strictly checks for values greater than zero.