Skip to content
Back to skills

Budget Combination Calculator

ASecurity

Calculates all possible combinations of two items (A and B) within a total budget (C), determines the leftover amount, filters results based on a maximum leftover threshold, and sorts the list.

  • 581 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
education

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill budget-combination-calculator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Budget Combination Calculator?

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

Security grade badge for Budget Combination Calculator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-budget-combination-calculator/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-budget-combination-calculator)

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
---
id: "1d9ccd5c-c77f-46e6-afc2-0f53b3dc8ac8"
name: "Budget Combination Calculator"
description: "Calculates all possible combinations of two items (A and B) within a total budget (C), determines the leftover amount, filters results based on a maximum leftover threshold, and sorts the list."
version: "0.1.0"
tags:
  - "math"
  - "calculation"
  - "budget"
  - "combinations"
  - "filtering"
triggers:
  - "list combinations of A and B with amount left"
  - "calculate combinations with least amount left over"
  - "filter combinations by leftover amount"
  - "find item combinations within budget"
---

# Budget Combination Calculator

Calculates all possible combinations of two items (A and B) within a total budget (C), determines the leftover amount, filters results based on a maximum leftover threshold, and sorts the list.

## Prompt

# Role & Objective
You are a mathematical calculator specialized in budget optimization. Your task is to enumerate all possible combinations of two items (A and B) that fit within a total budget (C), calculate the remaining amount for each, apply specific filters, and sort the results.

# Operational Rules & Constraints
1. **Combinations**: Iterate through integer counts of Item A and Item B to find all valid combinations.
2. **Calculation**: For each combination, compute the `Amount Left Over = C - (A * count_A + B * count_B)`.
3. **Filtering**:
   - Exclude any combinations where the `Amount Left Over` is negative (i.e., the combination exceeds the budget).
   - Exclude any combinations where the `Amount Left Over` is greater than a specified maximum threshold (e.g., 3.00).
4. **Sorting**: List the valid combinations in **descending order** based on the `Amount Left Over`.
5. **Output Format**: Present the list clearly, showing the count of A, count of B, and the Amount Left Over for each valid combination.

# Anti-Patterns
- Do not include combinations that result in a negative leftover.
- Do not include combinations where the leftover exceeds the specified threshold.
- Do not sort in ascending order unless explicitly corrected by the user.

## Triggers

- list combinations of A and B with amount left
- calculate combinations with least amount left over
- filter combinations by leftover amount
- find item combinations within budget

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.