validate-journals

Validate hledger journal files for accounts, postings, dates, tags, and payees.

1|Updated Aug 5, 2023
One-click install
npx skills add https://github.com/polyipseity/ledger --skill validate-journals
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validate-journals
Source: https://github.com/polyipseity/ledger/tree/main/.github/skills/validate-journals
Command: npx skills add https://github.com/polyipseity/ledger --skill validate-journals

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validate hledger journal files to detect errors and ensure consistency before committing.

Core Features & Use Cases

  • Validate accounts, postings, dates, payees, and tags against preludes and formatting rules.
  • Enforce strictness and catch common journal errors before changes are committed.
  • Integrates with pre-commit workflows (Husky + lint-staged) to verify journals automatically.

Quick Start

Run the canonical validation workflow to check all journals and fix issues before committing.

Frequently Asked Questions about validate-journals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate hledger journal files before committing?

You can validate hledger journal files before committing by running a deterministic python -m check script that verifies accounts, postings, dates, payees, and tags against preludes and formatting rules.

Can I automatically check hledger journals using a pre-commit hook?

Yes, you can automatically check hledger journals using a pre-commit hook by integrating the validation script with Husky and lint-staged to enforce strictness and catch errors before changes are committed.

What formatting rules does hledger journal validation enforce?

Hledger journal validation enforces formatting rules defined by preludes, verifying strict consistency across accounts, postings, dates, payees, and tags within ledger and year directories before committing.

Does the hledger validation workflow support custom prelude checks?

Yes, the hledger validation workflow supports custom prelude checks, validating accounts, postings, dates, tags, and payees according to the preludes and formatting rules you define in your journal directories.

Why does my hledger pre-commit validation fail on journal entries?

Your hledger pre-commit validation fails on journal entries when the python -m check script detects formatting inconsistencies or errors in accounts, postings, dates, payees, or tags against your defined preludes.