From ip-reports
Use when user asks to process a foreign-bank PDF statement (Jusan KZ, TBC GE, or similar) into an Эльба-importable .txt file, a local КУДиР Excel journal, and a ВЭД 181-И report. Trigger phrases include "обработай выписку", "выписка в Эльбу", "1C из выписки", "КУДиР из PDF", "ВЭД по счёту", "statement to Elba".
How this skill is triggered — by the user, by Claude, or both
Slash command
/ip-reports:bank-statement-to-elbaThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are helping an ИП on ПСН who receives foreign currency income on overseas bank accounts (Jusan Kazakhstan, TBC Georgia, or similar). Convert their bank statement PDFs into three artifacts.
You are helping an ИП on ПСН who receives foreign currency income on overseas bank accounts (Jusan Kazakhstan, TBC Georgia, or similar). Convert their bank statement PDFs into three artifacts.
Wrong data corrupts the КУДиР and 181-И report — the user relies on these for taxes and валютный контроль. When the PDF is unclear, stop and ask the user. Do NOT fill in plausible-sounding defaults.
The two main ambiguity points:
~/.config/ip-reports/contractors.json so the next run of the same counterparty is automatic.references/vo_codes.md cover the typical cases but not every corner. When unclear, show the user the transaction and the 2–3 most plausible codes with their meanings, let them pick. Mark "?" only as a last resort when even the user can't decide.Batch transactions when asking — if there are 5 unclear ones, present them as a numbered list in one message, not 5 separate prompts.
Call the config module to verify the ИП profile exists:
cd <plugin_root>/skills/bank-statement-to-elba && python scripts/config.py wizard
If ~/.config/ip-reports/profile.json is missing, run the wizard interactively. The wizard asks:
PSN / USN_income / USN_income_minus_expense / OSNON, пропускаются вопросы про расчётный счёт/БИК и не генерируется elba-import.txt (только journal.xlsx + summary.md).Y — расчётный счёт РФ (20 цифр, можно placeholder) и БИК (9 цифр, можно placeholder). Эльба сама создаст запись в "Реквизитах" при первом импорте.Онбординг нового контрагента (когда в выписке появляется отправитель, которого нет в ~/.config/ip-reports/contractors.json):
Спроси имя (например, "Blu Banyan Inc.").
Если profile.use_elba=True — объясни пользователю два пути, выбирает он:
В Эльбе поле «ИНН» в карточке контрагента не обязательно (её можно сохранить с пустым ИНН). Но Эльба валидирует чексумму — произвольные числа типа
9909999999не пройдут.Путь A — оставить ИНН пустым (проще, но один раз руками):
- В Эльбе → «Контрагенты» → создай карточку, имя как в выписке (или короче), поле ИНН пустое, сохрани.
- Я сохраню
inn: ""вcontractors.json.- При первом импорте файла Эльба попросит вручную привязать операцию к карточке. Дальше она запомнит связку по имени+счёту и будет матчить автоматически.
Путь B — валидный placeholder-ИНН (автоматика с первого импорта):
- Сгенерируй placeholder с валидной чексуммой:
python scripts/config.py gen-inn 990900000→ выдаст что-то вроде9909000004. Префикс9909— официальный код ФНС для иностранных компаний, такое число Эльба примет. Используй разные 9-значные префиксы для разных контрагентов, чтобы не было коллизий.- В Эльбе → «Контрагенты» → создай карточку, впиши этот ИНН → сохрани.
- Скажи мне этот же ИНН — я сохраню его в
contractors.json. Матчинг по ИНН с первого импорта.Если у компании реальный российский ИНН (ООО в РФ) — просто дай его, это надёжнее всего.
Какой путь выбираешь — A (пустой ИНН) или B (placeholder)?
Если profile.use_elba=False — ИНН не нужен для импорта; используй пустую строку (ренeрер подставит 0000000000 для форматной валидности, но файл всё равно не генерится).
Спроси тип операции и шаблон описания — или оставь дефолты ("description_template": "поступление средств за {month} {year}").
Сохрани в contractors.json через config.save_contractor(...).
При обработке выписки, если у контрагента в contractors.json поле inn пустое и profile.use_elba=True — это нормально (Путь A). Сгенерированный файл будет содержать ПлательщикИНН= (пусто) — Эльба при первом импорте попросит вручную выбрать контрагента, дальше запомнит. Просто предупреди пользователя один раз: «У контрагента X пустой ИНН — при первом импорте Эльба попросит вручную привязать операцию к карточке, дальше автоматом.» Не останавливай обработку.
Use the Read tool on the PDF path. Do NOT try regex parsers or pdfplumber — you are the parser. Extract:
Jusan, Alatau, TBC, or Other.840 for USD), account number/IBAN, opening balance, closing balance.YYYY-MM-DD).date (ISO), direction (in / out / fee), amount (positive number), currency,counterparty (at least name; if the PDF does not name a counterparty, stop and ask the user — see "Handling ambiguity" above — then save the resolved name to contractors.json),purpose (original text), reference (FDF.../FEF.../etc.),vo_code (see classification rules below),vo_description.Read references/vo_codes.md and apply the rules:
direction=in + foreign counterparty → 20200.direction=out + counterparty is the user's own account (match by name / IBAN in profile / contractors) → 61100.direction=out/fee + keywords «комиссия», fee, maintenance, commission → 80150."?" if the user cannot decide either — then flag it in summary.md for later follow-up.Produce a JSON matching schemas/transactions.json. Write to out/<pdf_stem>/_extracted.json.
cd <plugin_root>/skills/bank-statement-to-elba && python scripts/main.py --input out/<pdf_stem>/_extracted.json --out out/<pdf_stem>
This creates three files with names derived from bank + reporting period: {Bank}-{period-slug}-elba-import.txt, {Bank}-{period-slug}-journal.xlsx, {Bank}-{period-slug}-summary.md. Slug: 2025 for a full year, 2025-Q3 for a calendar quarter, 2025-07 for a full month, 2025-07-11_2025-09-26 for an arbitrary range. _extracted.json is deleted on success.
Example for Jusan, Q3 2025:
Jusan-2025-Q3-elba-import.txtJusan-2025-Q3-journal.xlsxJusan-2025-Q3-summary.md*-summary.md for the Эльба post-import checklist.vo_code="?" entries — should be rare since most ambiguity was resolved interactively during processing.contractors.json this run.If multiple PDFs are given: process each independently (separate out/<name>/). After all are done, generate a combined out/quarterly_summary.xlsx that concatenates the «Журнал» sheets and merges the «ВЭД» data.
vo_code, counterparty, or purpose for ambiguous transactions — ask the user first (see "Handling ambiguity" above). Only mark "?" as a last resort after the user couldn't decide either.contractors.json for future runs.elba_import.txt by hand after main.py writes it.~/.config/ip-reports/ contents to any repository.main.py any transactions whose date has no CBR rate (CBR skips weekends/holidays; for such dates, use the prior business day's rate — the cbr_rates.get_usd_rate helper handles the fetch, not date adjustment; if you get a 404, walk back one day at a time).Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub eithery-rc/plugins --plugin ip-reports