Skip to content
Back to skills

Tool Return Fees

ASecurity

Compute late fees for a neighbourhood tool library from input.json (returns with tool, member, outDay, dueDays, backDay) and write late-fees.csv beside it. Use whenever asked to work out tool-library late returns, member late fees, or to produce late-fees.csv, even if the rules are not restated.

  • 24 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 6, 2026
tools

Security analysis

A100/100

Scanned December 6, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill tool-return-fees --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tool Return Fees?

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

Security grade badge for Tool Return Fees
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-tool-return-fees-0304b644/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-tool-return-fees-0304b644)

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: tool-return-fees
description: Compute late fees for a neighbourhood tool library from input.json (returns with tool, member, outDay, dueDays, backDay) and write late-fees.csv beside it. Use whenever asked to work out tool-library late returns, member late fees, or to produce late-fees.csv, even if the rules are not restated.
---

# Tool return late fees

Work by hand: read the file, do the arithmetic carefully, write the CSV. No code can be run.

## Rules (derived from the worked examples)

For each entry in `returns`:
1. `due = outDay + dueDays` (the due day itself is still on time).
2. `daysLate = backDay - due`. If `daysLate <= 0`, the return is on time: ignore it entirely.
3. Otherwise the tool is late and its fee is `min(daysLate, 5)` pounds (£1 per day late, capped at £5 per tool).

Per member (match names exactly as written):
- `late_tools` = number of that member's late returns.
- `fee` = sum of the per-tool fees (the cap applies per tool, not per member, so a member can owe more than 5).
- Members with no late returns do not appear at all.

## Output

Write `late-fees.csv` in the same folder as `input.json`, overwriting any existing file:

```
member,late_tools,fee
```
followed by one line per member, sorted by:
1. `fee` descending,
2. then `member` name ascending (alphabetical) for ties.

Plain integers, no pound signs, no quotes, no spaces, newline-separated. If no member is late, write just the header line.

## Procedure

1. Read input.json.
2. List every return as: member, due, daysLate, tool fee. Write this working out in your reply so you can check it.
3. Group by member, total the counts and fees.
4. Sort, then write the file.
5. Re-check: each late return counted once, caps applied, ties alphabetical.

## Check against examples

- Gil: drill out 3, due 10, back 10 → on time. Sander out 4 + 3 = 7, back 9 → 2 late, £2. Gil,1,2.
- Dana: ladder due 8, back 16 → 8 late, capped to 5. Dana,1,5.
- Kemal: 3 late + 4 late = 7 (neither is capped). Kemal,2,7.
- Brigid and Farah both owe 5; Brigid sorts first alphabetically.

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.

View all in tools →

Comments

Loading comments…

Newsletter

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