monthly-migration

Close and open monthly hledger journals with balance migration.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Close the previous month and open the new month with correct balance initialization.

Core Features & Use Cases

  • Automated closing and opening of months using hledger close --migrate to generate the necessary transactions.
  • Balance validation and prelude adherence to ensure opening balances match expected values and closing balances resolve to zero.
  • Prelude inclusion and directory structure checks to guarantee proper context for each month.

Quick Start

Run the migration workflow by executing the prescribed hledger close --migrate commands for the target month and verify the resulting opening and closing balances.

Frequently Asked Questions about monthly-migration

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

FAQPage Schema
How do I automate monthly closing and opening balance initialization in hledger?

Automate monthly hledger closing and opening balance initialization by using hledger close --migrate to generate transactions, validating closing at 23:59:59 and opening at 00:00:00, and running format and check steps before committing.

What is the correct way to migrate monthly balances across journal files?

Migrating monthly balances correctly requires applying hledger close --migrate across ledger/YYYY/YYYY-MM/self.journal and related journal files, ensuring proper prelude inclusion and verifying that opening balances match expected values while closing balances resolve to zero.

Does hledger close --migrate support handling multiple months at once?

Yes, the monthly migration process handles multiple months by applying hledger close --migrate across the required directory structures, ensuring proper prelude inclusion and validating that each month's opening balances match expected values.

How do I verify that closing balances resolve to zero during a monthly migration?

Verify closing balances resolve to zero by validating the generated closing transactions at 23:59:59 and opening transactions at 00:00:00, then performing format and check steps to ensure prelude adherence and balance initialization before committing.

What directory structure is required for hledger monthly migration?

The hledger monthly migration requires a specific directory structure spanning ledger/YYYY/YYYY-MM/self.journal and related journal files, which guarantees proper prelude inclusion and context for each month's closing and opening process.