settlement
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese決算整理・決算書作成(Year-End Settlement)
Year-End Closing & Financial Statement Preparation (Year-End Settlement)
会計年度末の決算整理仕訳を登録し、残高試算表・損益計算書・貸借対照表を確認するスキル。
journal スキルで日常仕訳の入力が完了していることを前提とする。
This skill is for registering year-end closing journal entries at the end of the fiscal year and verifying the trial balance sheet, income statement, and balance sheet.
It assumes that daily journal entries have been completed using the journal skill.
設定の読み込み(最初に実行)
Load Settings (Execute First)
- を Read ツールで読み込む
shinkoku.config.yaml - ファイルが存在しない場合は スキルの実行を案内して終了する
/setup - 設定値を把握し、相対パスは CWD を基準に絶対パスに変換する:
- : CLI スクリプトの
db_path引数に使用--db-path - : 進捗ファイル等の出力先ベースディレクトリ
output_dir - 各ディレクトリ: ファイル参照時に使用
- Load the file using the Read tool
shinkoku.config.yaml - If the file does not exist, guide the user to execute the skill and exit
/setup - Understand the configuration values, and convert relative paths to absolute paths based on the CWD:
- : Used for the
db_pathargument in CLI scripts--db-path - : Base directory for outputting progress files and other items
output_dir - Each directory: Used when referencing files
パス解決の例
Path Resolution Example
config の が 、 が で CWD が の場合:
db_path./shinkoku.dboutput_dir./output/home/user/tax-2025/ledger.py trial-balance --db-path /home/user/tax-2025/shinkoku.db --input query.jsonshinkoku ledger bs --db-path /home/user/tax-2025/shinkoku.db --input query.json
If the in the config is , is , and the CWD is :
db_path./shinkoku.dboutput_dir./output/home/user/tax-2025/ledger.py trial-balance --db-path /home/user/tax-2025/shinkoku.db --input query.jsonshinkoku ledger bs --db-path /home/user/tax-2025/shinkoku.db --input query.json
進捗情報の読み込み
Load Progress Information
設定の読み込み後、引継書ファイルを読み込んで前ステップの結果を把握する。
- を Read ツールで読み込む(存在する場合)
.shinkoku/progress/progress-summary.md - 以下の引継書を Read ツールで読み込む(存在する場合):
.shinkoku/progress/04-journal.md.shinkoku/progress/02-assess.md
- 読み込んだ情報を以降のステップで活用する(ユーザーへの再質問を避ける)
- ファイルが存在しない場合はスキップし、ユーザーに必要情報を直接確認する
After loading the settings, load the handover files to understand the results of the previous steps.
- Load using the Read tool (if it exists)
.shinkoku/progress/progress-summary.md - Load the following handover files using the Read tool (if they exist):
.shinkoku/progress/04-journal.md.shinkoku/progress/02-assess.md
- Utilize the loaded information in subsequent steps (avoid re-asking the user)
- If the files do not exist, skip this step and directly confirm necessary information with the user
基本方針
Basic Guidelines
- journal スキルでの仕訳入力が完了しているか確認してから開始する
- 残高試算表で勘定残高を確認し、決算整理仕訳の必要性を判定する
- 減価償却は references/depreciation-rules.md のルールに基づいて計算する
- 決算整理仕訳も登録前に必ずユーザーに確認する
- 最終的に貸借対照表の貸借一致を検証する
- Confirm that journal entries have been completed using the journal skill before starting the settlement process
- Verify account balances in the trial balance sheet to determine the need for year-end closing journal entries
- Calculate depreciation based on the rules in references/depreciation-rules.md
- Always confirm year-end closing journal entries with the user before registering them
- Finally, verify that total assets equal total liabilities plus equity in the balance sheet
前提条件の確認
Prerequisite Checks
決算処理を開始する前に以下を確認する:
- 日常仕訳が完了しているか: 未記帳の取引がないか確認を促す
- 会計年度: 対象年度を確認する(例: 2025年1月1日〜12月31日)
- 青色申告の種類: 65万円控除(複式簿記 + e-Tax/電子帳簿保存)、55万円控除(複式簿記 + 書面提出)、10万円控除(簡易帳簿)
- 前年確定申告の確認: 以下を assess の結果または前年の申告書から確認する
- 予定納税の有無と金額(所得税の前払い)
- 純損失の繰越控除の有無
- 前年の期末残高(当年の期首残高と一致するか)
- 前年の減価償却累計額(固定資産がある場合)
※ 前年データが未確認の場合は、先に assess スキルで確認するか、
ユーザーに前年の確定申告書を提示してもらう。
Confirm the following before starting the settlement process:
- Have daily journal entries been completed?: Prompt the user to confirm there are no unrecorded transactions
- Fiscal year: Confirm the target year (e.g., January 1 to December 31, 2025)
- Blue return type: ¥650,000 deduction (double-entry bookkeeping + e-Tax/electronic book storage), ¥550,000 deduction (double-entry bookkeeping + paper submission), ¥100,000 deduction (simplified bookkeeping)
- Confirm prior year's final tax return: Check the following from the assess skill results or prior year's tax return
- Presence and amount of estimated tax payments (prepayment of income tax)
- Presence of net loss carryforward deductions
- Whether the prior year's ending balance matches the current year's opening balance
- Accumulated depreciation amount from the prior year (if there are fixed assets)
※ If prior year data has not been confirmed, first use the assess skill to confirm, or ask the user to provide the prior year's final tax return.
0-1. 期首残高の確認・設定
0-1. Confirm & Set Opening Balances
- で期首残高が設定済みか確認
ledger.py ob-list --db-path DB --fiscal-year YEAR - 未設定の場合、ユーザーに以下を確認:
- 開業初年度か?(→ 期首残高なし、スキップ)
- 前年の確定申告書(青色申告決算書の貸借対照表)の期末列を提示してもらう
- 画像/PDFの場合は OCR で読み取り
- 前年の期末残高を で一括登録
ob-set-batch - 登録後、で内容を確認し、ユーザーに承認を得る
ob-list
- Check if opening balances have been set using
ledger.py ob-list --db-path DB --fiscal-year YEAR - If not set, confirm the following with the user:
- Is it the first year of business? (→ No opening balance, skip)
- Ask the user to provide the ending column of the prior year's final tax return (balance sheet from the blue return settlement statement)
- Use OCR to read if it is an image/PDF
- Batch register the prior year's ending balances using
ob-set-batch - After registration, verify the content using and obtain user approval
ob-list
ステップ1: 残高試算表の確認
Step 1: Verify Trial Balance Sheet
ledger.py trial-balance
の呼び出し
ledger.py trial-balanceCall ledger.py trial-balance
ledger.py trial-balancebash
shinkoku ledger trial-balance --db-path DB_PATH --input query.json入力 JSON:
json
{
"fiscal_year": 2025
}出力:
- : 各勘定科目の借方合計・貸方合計・残高
accounts - : 借方合計
total_debit - : 貸方合計
total_credit
確認項目:
- 借方合計と貸方合計が一致しているか
- 各科目の残高が妥当か(マイナス残高の有無)
- 以下の科目に残高がある場合、決算整理が必要:
- 仮払金(1060)→ 精算して適切な科目に振り替える
- 仮受金(2060)→ 内容を確定して振り替える
- 仮払消費税(1090)/ 未払消費税(2070)→ 消費税の計算結果を反映する
bash
shinkoku ledger trial-balance --db-path DB_PATH --input query.jsonInput JSON:
json
{
"fiscal_year": 2025
}Output:
- : Debit total, credit total, and balance for each account
accounts - : Total debits
total_debit - : Total credits
total_credit
Verification Items:
- Do total debits equal total credits?
- Are each account's balances reasonable? (Are there any negative balances?)
- If there are balances in the following accounts, year-end closing is required:
- Prepaid expenses (1060) → Settle and transfer to appropriate accounts
- Unearned revenue (2060) → Confirm details and transfer
- Prepaid consumption tax (1090)/Accrued consumption tax (2070) → Reflect consumption tax calculation results
ステップ2: 決算整理仕訳の登録
Step 2: Register Year-End Closing Journal Entries
以下の決算整理項目を順に確認・処理する。各仕訳は で登録する。
ledger.py add-journal --db-path DB_PATH --input journal.jsonConfirm and process the following year-end closing items in order. Register each journal entry using .
ledger.py add-journal --db-path DB_PATH --input journal.json2-1. 減価償却費の計上
2-1. Record Depreciation Expense
固定資産(1100〜1160)に残高がある場合、減価償却費を計上する。
計算ツールの呼び出し:
bash
shinkoku tax calc-depreciation --input depreciation_input.json定額法の場合:
json
{
"method": "straight_line",
"acquisition_cost": 300000,
"useful_life": 4,
"business_use_ratio": 100,
"months": 12
}定率法の場合:
json
{
"method": "declining_balance",
"acquisition_cost": 300000,
"book_value": 200000,
"useful_life": 4,
"declining_rate": 500,
"business_use_ratio": 100,
"months": 12
}仕訳の登録:
借方: 減価償却費(5200) / 貸方: 該当の固定資産科目
金額: 計算された償却額- 耐用年数は references/depreciation-rules.md を参照する
- 事業供用開始日が期中の場合は月割り計算を行う
- 一括償却資産(1160)は取得原価の1/3を計上する(3年均等償却)
- 家事按分がある場合は事業使用割合を乗じた金額のみ計上する
If there are balances in fixed assets (1100-1160), record depreciation expense.
Call Calculation Tool:
bash
shinkoku tax calc-depreciation --input depreciation_input.jsonFor straight-line method:
json
{
"method": "straight_line",
"acquisition_cost": 300000,
"useful_life": 4,
"business_use_ratio": 100,
"months": 12
}For declining balance method:
json
{
"method": "declining_balance",
"acquisition_cost": 300000,
"book_value": 200000,
"useful_life": 4,
"declining_rate": 500,
"business_use_ratio": 100,
"months": 12
}Register Journal Entry:
Debit: Depreciation Expense (5200) / Credit: Corresponding Fixed Asset Account
Amount: Calculated depreciation amount- Refer to references/depreciation-rules.md for useful life
- If the business start date is mid-year, calculate on a monthly pro-rata basis
- For lump-sum depreciation assets (1160), record 1/3 of the acquisition cost (equal depreciation over 3 years)
- If there is a household allocation, only record the amount multiplied by the business use ratio
2-2. 棚卸資産の評価
2-2. Evaluate Inventory Assets
期末に在庫がある場合、棚卸高を計上する。
If there is inventory at the end of the period, record the inventory amount.
在庫データの登録
Register Inventory Data
まず で登録済みの棚卸データを確認する。
未登録の場合は で期首・期末の棚卸高を登録する:
ledger.py list-inventory --db-path DB_PATH --input query.jsonledger.py set-inventory --db-path DB_PATH --input inventory.jsonjson
{
"fiscal_year": 2025,
"detail": {
"period": "ending",
"amount": 200000,
"method": "cost",
"details": "品目の明細等"
}
}First, check registered inventory data using .
If not registered, register opening and ending inventory amounts using :
ledger.py list-inventory --db-path DB_PATH --input query.jsonledger.py set-inventory --db-path DB_PATH --input inventory.jsonjson
{
"fiscal_year": 2025,
"detail": {
"period": "ending",
"amount": 200000,
"method": "cost",
"details": "Item details, etc."
}
}棚卸仕訳の登録
Register Inventory Journal Entry
期末棚卸仕訳:
借方: 棚卸資産(1030) / 貸方: 仕入(5001) 金額: 期末棚卸高
期首棚卸仕訳(翌期首に自動振替する場合の備忘):
借方: 仕入(5001) / 貸方: 棚卸資産(1030) 金額: 期首棚卸高- 期末の在庫数量と単価をユーザーに確認する
- 評価方法(最終仕入原価法等)を確認する
- 売上原価の計算: 期首棚卸高 + 仕入高 - 期末棚卸高
- 登録した棚卸データは と青色申告決算書 PDF に自動反映される
ledger.py pl
Ending Inventory Journal Entry:
Debit: Inventory Assets (1030) / Credit: Purchases (5001) Amount: Ending inventory amount
Opening Inventory Journal Entry (Memo for automatic transfer to next period's opening):
Debit: Purchases (5001) / Credit: Inventory Assets (1030) Amount: Opening inventory amount- Confirm the ending inventory quantity and unit price with the user
- Confirm the valuation method (e.g., last-in first-out cost method)
- Cost of Goods Sold Calculation: Opening inventory amount + Purchases amount - Ending inventory amount
- Registered inventory data is automatically reflected in and the blue return settlement statement PDF
ledger.py pl
2-3. 未払費用の計上
2-3. Record Accrued Unpaid Expenses
年度末時点で発生しているが未払いの費用を計上する。
借方: 該当の費用科目 / 貸方: 未払費用(2031)- 12月分の家賃(翌月払いの場合)
- 12月分の通信費・光熱費
- 社会保険料の未払い分
Record expenses that have been incurred but not paid as of the end of the year.
Debit: Corresponding Expense Account / Credit: Accrued Expenses (2031)- December rent (if paid the following month)
- December utility and communication fees
- Unpaid social insurance premiums
2-4. 前払費用の計上
2-4. Record Prepaid Expenses
翌期分を当期に支払い済みの場合、前払費用に振り替える。
借方: 前払費用(1041) / 貸方: 該当の費用科目- 年払いの保険料のうち翌期対応分
- 年払いのサブスクリプション料金のうち翌期対応分
If expenses for the next period have been paid in the current period, transfer them to prepaid expenses.
Debit: Prepaid Expenses (1041) / Credit: Corresponding Expense Account- Portion of annual insurance premiums applicable to the next period
- Portion of annual subscription fees applicable to the next period
2-5. 売掛金・買掛金の確認
2-5. Verify Accounts Receivable & Accounts Payable
- 売掛金(1010)残高と未回収の請求書一覧が一致するか確認する
- 買掛金(2001)残高と未払いの仕入先一覧が一致するか確認する
- 回収不能な売掛金がある場合は貸倒金(5260)への振替を検討する
- Confirm that the accounts receivable (1010) balance matches the list of uncollected invoices
- Confirm that the accounts payable (2001) balance matches the list of unpaid supplier invoices
- If there are uncollectible accounts receivable, consider transferring them to Bad Debt Expense (5260)
2-6. 事業主勘定の確認
2-6. Verify Proprietor Accounts
- 事業主貸(1200): 事業資金から個人利用分の合計
- 事業主借(3010): 個人資金から事業利用分の合計
- これらは決算で相殺しない(翌期首に元入金で繰越処理する)
- Proprietor's Drawings (1200): Total amount used for personal purposes from business funds
- Proprietor's Contributions (3010): Total amount used for business purposes from personal funds
- These are not offset in the settlement process (carry over to the next period's opening with initial deposit processing)
ステップ2.7: 地代家賃の内訳登録
Step 2.7: Register Rent Breakdown
事業で地代家賃を計上している場合、内訳を登録する(青色申告決算書の添付資料)。
If rent has been recorded for the business, register the breakdown (attachment to the blue return settlement statement).
ledger.py add-rent-detail
の呼び出し
ledger.py add-rent-detailCall ledger.py add-rent-detail
ledger.py add-rent-detailbash
shinkoku ledger add-rent-detail --db-path DB_PATH --input rent.json入力 JSON:
json
{
"fiscal_year": 2025,
"detail": {
"property_type": "自宅兼事務所",
"usage": "自宅兼事務所",
"landlord_name": "賃貸先の名称",
"landlord_address": "賃貸先の住所",
"monthly_rent": 100000,
"annual_rent": 1200000,
"deposit": 0,
"business_ratio": 50
}
}確認項目:
- 自宅兼事務所の場合、事業割合が適切に設定されているか
- 年間賃料 = 月額賃料 × 支払月数 で正しいか
- 複数の物件がある場合はすべて登録する
bash
shinkoku ledger add-rent-detail --db-path DB_PATH --input rent.jsonInput JSON:
json
{
"fiscal_year": 2025,
"detail": {
"property_type": "Home & Office",
"usage": "Home & Office",
"landlord_name": "Landlord Name",
"landlord_address": "Landlord Address",
"monthly_rent": 100000,
"annual_rent": 1200000,
"deposit": 0,
"business_ratio": 50
}
}Verification Items:
- For home & office properties, confirm that the business ratio is set appropriately
- Confirm that annual rent = monthly rent × number of payment months is correct
- Register all properties if there are multiple
ステップ3: 決算書の生成
Step 3: Generate Settlement Statements
決算整理仕訳がすべて登録された後、決算書を生成する。
Generate settlement statements after all year-end closing journal entries have been registered.
3-1. 損益計算書の確認(ledger.py pl
)
ledger.py pl3-1. Verify Income Statement (ledger.py pl
)
ledger.py plbash
shinkoku ledger pl --db-path DB_PATH --input query.json入力 JSON:
json
{
"fiscal_year": 2025
}出力:
- : 収益の内訳と合計
revenue - : 費用の内訳と合計
expenses - : 当期純利益(収益合計 - 費用合計)
net_income
確認項目:
- 売上金額が実績と一致するか
- 各経費科目が妥当か(異常に大きい・小さい科目がないか)
- 青色申告特別控除前の所得金額を確認する
bash
shinkoku ledger pl --db-path DB_PATH --input query.jsonInput JSON:
json
{
"fiscal_year": 2025
}Output:
- : Breakdown and total of revenue
revenue - : Breakdown and total of expenses
expenses - : Net income for the period (total revenue - total expenses)
net_income
Verification Items:
- Does the sales amount match actual results?
- Is each expense account reasonable? (Are there any abnormally large/small accounts?)
- Confirm the income amount before the blue return special deduction
3-2. 貸借対照表の確認(ledger.py bs
)
ledger.py bs3-2. Verify Balance Sheet (ledger.py bs
)
ledger.py bsbash
shinkoku ledger bs --db-path DB_PATH --input query.json入力 JSON:
json
{
"fiscal_year": 2025
}出力:
- : 資産の内訳と合計
assets - : 負債の内訳と合計
liabilities - : 純資産の内訳と合計
equity
確認項目:
- 資産合計 = 負債合計 + 純資産合計 であるか(貸借一致)
- 現金・預金残高が実際の残高と一致するか
- 固定資産の帳簿価額が減価償却後の金額であるか
bash
shinkoku ledger bs --db-path DB_PATH --input query.jsonInput JSON:
json
{
"fiscal_year": 2025
}Output:
- : Breakdown and total of assets
assets - : Breakdown and total of liabilities
liabilities - : Breakdown and total of equity
equity
Verification Items:
- Does total assets equal total liabilities plus total equity? (Balance sheet equality)
- Does the cash and bank deposit balance match the actual balance?
- Is the book value of fixed assets the amount after depreciation?
ステップ4: 決算結果サマリーの提示
Step 4: Present Settlement Result Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
決算結果サマリー(令和○年分)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
■ 損益計算書
売上高: ○○○,○○○円
売上原価: ○○○,○○○円
経費合計: ○○○,○○○円
青色申告特別控除前の所得: ○○○,○○○円
■ 貸借対照表
資産合計: ○○○,○○○円
負債合計: ○○○,○○○円
純資産合計: ○○○,○○○円
貸借差額: 0円(一致)
■ 決算整理仕訳: N件
- 減価償却費: ○○○,○○○円
- 棚卸調整: ○○○,○○○円
- 未払計上: ○○○,○○○円
■ 次のステップ:
→ /income-tax で所得税の計算を行う
→ /consumption-tax で消費税の計算を行う
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Settlement Result Summary (FY ○ Reiwa)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
■ Income Statement
Sales: ○○○,○○○ JPY
Cost of Goods Sold: ○○○,○○○ JPY
Total Expenses: ○○○,○○○ JPY
Income Before Blue Return Special Deduction: ○○○,○○○ JPY
■ Balance Sheet
Total Assets: ○○○,○○○ JPY
Total Liabilities: ○○○,○○○ JPY
Total Equity: ○○○,○○○ JPY
Balance Difference: 0 JPY (Matching)
■ Year-End Closing Journal Entries: N Items
- Depreciation Expense: ○○○,○○○ JPY
- Inventory Adjustment: ○○○,○○○ JPY
- Accrued Expenses: ○○○,○○○ JPY
■ Next Steps:
→ Calculate income tax using /income-tax
→ Calculate consumption tax using /consumption-tax
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━引継書の出力
Output Handover Files
サマリー提示後、以下のファイルを Write ツールで出力する。
これにより、セッションの中断や Compact が発生しても次のステップで結果を引き継げる。
After presenting the summary, output the following files using the Write tool.
This allows results to be carried over to the next step even if the session is interrupted or compacted.
ステップ別ファイルの出力
Output Step-by-Step Files
.shinkoku/progress/06-settlement.md---
step: 6
skill: settlement
status: completed
completed_at: "{当日日付 YYYY-MM-DD}"
fiscal_year: {tax_year}
---Output to in the following format:
.shinkoku/progress/06-settlement.md---
step: 6
skill: settlement
status: completed
completed_at: "{Current Date YYYY-MM-DD}"
fiscal_year: {tax_year}
---決算整理・決算書作成の結果
Year-End Closing & Financial Statement Preparation Results
損益計算書(PL)サマリー
Income Statement (PL) Summary
- 売上高: {金額}円
- 売上原価: {金額}円
- 経費合計: {金額}円
- 青色申告特別控除前の所得: {金額}円
- Sales: {Amount} JPY
- Cost of Goods Sold: {Amount} JPY
- Total Expenses: {Amount} JPY
- Income Before Blue Return Special Deduction: {Amount} JPY
貸借対照表(BS)サマリー
Balance Sheet (BS) Summary
- 資産合計: {金額}円
- 負債合計: {金額}円
- 純資産合計: {金額}円
- 貸借差額: {金額}円(一致/不一致)
- Total Assets: {Amount} JPY
- Total Liabilities: {Amount} JPY
- Total Equity: {Amount} JPY
- Balance Difference: {Amount} JPY (Matching/Not Matching)
決算整理仕訳の一覧
List of Year-End Closing Journal Entries
| 内容 | 借方科目 | 貸方科目 | 金額 |
|---|---|---|---|
| {減価償却費等} | {科目名} | {科目名} | {金額}円 |
| (減価償却、地代家賃按分、棚卸調整、未払計上等を記載) |
| Description | Debit Account | Credit Account | Amount |
|---|---|---|---|
| {Depreciation Expense, etc.} | {Account Name} | {Account Name} | {Amount} JPY |
| (Include depreciation, rent allocation, inventory adjustment, accrued expenses, etc.) |
次のステップ
Next Steps
/income-tax で所得税の計算を行う
/consumption-tax で消費税の計算を行う
undefinedCalculate income tax using /income-tax
Calculate consumption tax using /consumption-tax
undefined進捗サマリーの更新
Update Progress Summary
.shinkoku/progress/progress-summary.md- YAML frontmatter: fiscal_year、last_updated(当日日付)、current_step: settlement
- テーブル: 全ステップの状態を更新(settlement を completed に)
- 次のステップの案内を記載
Update (create a new file if it does not exist):
.shinkoku/progress/progress-summary.md- YAML frontmatter: fiscal_year, last_updated (current date), current_step: settlement
- Table: Update the status of all steps (set settlement to completed)
- Include guidance on next steps
出力後の案内
Guidance After Output
ファイルを出力したらユーザーに以下を伝える:
- 「引継書を に保存しました。セッションが中断しても次のスキルで結果を引き継げます。」
.shinkoku/progress/ - 次のステップの案内
After outputting the files, inform the user:
- "Handover files have been saved to . Results can be carried over to the next skill even if the session is interrupted."
.shinkoku/progress/ - Guidance on next steps