Skip to content
Skills Library
Finance & accounting · Analysis

laytime-check

/laytime-check

Work out a laytime statement (time allowed, time used, demurrage or despatch) from charter-party terms and a statement of facts, with every figure shown and nothing assumed. Use when the user gives laytime terms, a NOR, an SOF or stoppages and asks for laytime, demurrage, despatch or a time sheet, or asks to check someone else's laytime calculation.

Licence
AGPL-3.0
Last repository change
09.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
36
Scripts
27
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 09.11.2026, without references to retired models or APIs.

Licence

AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.

What to check before installing
  • 27 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: engine/form/app.js, engine/form/build.mjs, engine/form/compile.js, engine/form/seeds.js, engine/scripts/reconcile.ts, engine/src/case.ts, engine/src/check.ts, engine/src/commencement.ts

What it does and when to use it

Work out a laytime statement (time allowed, time used, demurrage or despatch) from charter-party terms and a statement of facts, with every figure shown and nothing assumed. Use when the user gives laytime terms, a NOR, an SOF or stoppages and asks for laytime, demurrage, despatch or a time sheet, or asks to check someone else's laytime calculation.

Original author description

Work out a laytime statement (time allowed, time used, demurrage or despatch) from charter-party terms and a statement of facts, with every figure shown and nothing assumed. Use when the user gives laytime terms, a NOR, an SOF or stoppages and asks for laytime, demurrage, despatch or a time sheet, or asks to check someone else's laytime calculation.

How it works

  1. Building the voyage file
  2. Running it
  3. What to tell the user
  4. When the documents allow more than one reading
Original SKILL.md headings · 57 lines, 485 words
SKILL.md preview
---
name: laytime-check
description: Work out a laytime statement (time allowed, time used, demurrage or despatch) from charter-party terms and a statement of facts, with every figure shown and nothing assumed. Use when the user gives laytime terms, a NOR, an SOF or stoppages and asks for laytime, demurrage, despatch or a time sheet, or asks to check someone else's laytime calculation.
---

# laytime-check

`laytime.mjs` turns a voyage file (JSON) into a laytime statement: each step is worked from the inputs, and an
input that decides a figure but is missing gives NULL, never a default.

## Building the voyage file

Take each value from the charter party, the recap or the SOF, and keep a note of where it came from.

| field | from | notes |
|---|---|---|
| `quantity`, `rate_per_day` | CP / B/L | or `allowed_hours` if the CP states time, not a rate |
| `terms` | CP | SHINC, SHEX, SSHEX, FHEX; or `excepted_weekly` for a CP's own window, e.g. Sat 12:00 to Mon 08:00 |
| `holidays` | port calendar | excepted unless the terms are SHINC (`holidays_excepted: true` to override) |
| `unless_used`, `used` | CP / SOF | "unless used": the periods worked on excepted days; leave `used` out and the result is NULL |
| `nor_tendered` + `commencement` | SOF / CP | `{"rule":"turn_time","hours":12}` or `{"rule":"gencon_noon"}`; or `laytime_commenced` directly |
| `stoppages` | SOF + CP | only those the CP excepts; `count_fraction` for pro rata (3 of 4 cranes = 0.75); `on_demurrage: true` only if the CP also stops demurrage for it |
| `completed` | SOF | |
| `demurrage_rate_per_day`, `despatch_rate_per_day` | CP | never assume despatch is half demurrage |
| `despatch_basis` | CP | `laytime_saved` (default) or `all_time_saved` |

Times are port local, `YYYY-MM-DDTHH:MM`, no offset.

## Running it

```sh
node <skill-dir>/laytime.mjs voyage.json --sheet     # statement + full time sheet
node <skill-dir>/laytime.mjs voyage.json --json      # for another program
```

Exit codes: `0` complete · `2` a NULL (name the missing input to the user) · `3` invalid input.

## What to tell the user

- Give the result with its steps, and which document each input came from.
- Where the charter party is unclear or the SOF can be read two ways (was the NOR valid? does this stoppage count?
  is that clause excepting demurrage too?), **run both readings and show both results.** Do not pick one: that is
  for the parties.
- Never fill a missing rate, quantity or time to get a number. Say what is missing.
- Say that the figures are worked from the inputs given and are not a legal opinion.

## When the documents allow more than one reading

For a dispute, or to check someone else's figure, use the engine in `engine/`:
- the MCP tool `laytime_check` (`npm run mcp` in `engine/`);
- or `checkSheet()` from `engine/src/index.ts`.

Build a case: the agreed terms, quoted clauses, stoppages both sides accept, and one point per disputed matter, with
a reading for each side. Then give the figure from the sheet being checked. Report:
- the verdict;
- which readings reproduce the figure, or the nearest reading and the difference;
- the swing per point;
- the ledger lines that decide it.

Never say which reading is right.
Files in this package (36)
  • LICENSE 34 KB
  • README.md 7 KB
  • SKILL.md 3 KB
  • example-voyage.json 1 KB
  • laytime.mjs 13 KB
  • test.mjs 10 KB
  • engine/.gitignore 1 KB
  • engine/package-lock.json 104 KB
  • engine/package.json 1 KB
  • engine/tsconfig.json 1 KB
  • engine/form/app.js 31 KB
  • engine/form/build.mjs 1 KB
  • engine/form/compile.js 14 KB
  • engine/form/page.html 13 KB
  • engine/form/seeds.js 10 KB
  • engine/scripts/reconcile.ts 8 KB
  • engine/src/case.ts 12 KB
  • engine/src/check.ts 7 KB
  • engine/src/commencement.ts 10 KB
  • engine/src/index.ts 1 KB
  • engine/src/mcp.ts 3 KB
  • engine/src/rules.ts 12 KB
  • engine/src/sof.ts 4 KB
  • engine/src/statement.ts 27 KB
  • engine/src/trace.ts 5 KB
  • engine/src/weather.ts 6 KB
  • engine/test/calendar.test.ts 4 KB
  • engine/test/case.test.ts 5 KB
  • engine/test/check.test.ts 4 KB
  • engine/test/commencement.test.ts 4 KB
  • engine/test/prorata.test.ts 5 KB
  • engine/test/rules.test.ts 2 KB
  • engine/test/sof.test.ts 4 KB
  • engine/test/statement.test.ts 17 KB
  • engine/test/trace.test.ts 6 KB
  • engine/test/weather.test.ts 5 KB

Versions

The database has no other skills named laytime-check.

Database snapshot: 13.11.2026 · package version 0014e04b9b8f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

No similar skills in the database.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.