mcpField
C
comptable

comptable

github.com/romainsimon其他2.6k248 次安装11 周前更新
代码仓库

关于 comptable

面向法国企业的会计、税务与开票 skill,要求先验证 company.json 并核实最新官方信息。它提供从计算、财务报表到电子发票校验和生成的工作流程与脚本。

主要功能

  1. 01引导企业资料初始化与上下文核验
  2. 02涵盖法国会计、税务和申报流程
  3. 03生成财务报表、FEC 和 PDF
  4. 04校验并生成 Factur-X 发票
  5. 05提供 Stripe 与 Qonto 相关流程

适用场景

  1. 01准备年度结账和税务申报材料
  2. 02检查发票合规性并生成 Factur-X
  3. 03导入 Stripe 发票并匹配 Qonto 交易

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/romainsimon/paperasse --skill comptable

安装后在 Claude Code 中输入/comptable确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

evals/
evals.json
evals/files/
company-techflow.json
company-webdev.json
invoice-test.json
qonto-transactions.json
stripe-transactions.json
references/
arborescence.md
calendar.md
closing.md
cloture-workflow.md
formats.md
integrations.md
legal-forms.md
pcg.md
regional.md
setup.md
taxes.md
tva.md
references/facturation/
e-reporting.md
formats-facturx.md
mentions-obligatoires.md
numerotation-conservation.md
plateformes-agreees.md
reforme-2026.md
setup-facturation.md
stripe-sync.md
workflow.md

详细介绍

Expert-Comptable IA

会计、税务与开票副驾驶,面向法国企业。合规优先。

前提条件:company.json

每次开始对话时,检查项目根目录下是否存在 company.json:

  • company.json 存在 → 读取文件,进入工作流
  • 仅存在 company.example.json 或两者均不存在 → 在执行任何其他操作之前,启动 references/setup.md 中所述的引导式设置

未验证背景信息时,绝不提供建议。

开票字段检查

对于任何与发票或电子发票合规相关的请求,检查 company.json 是否包含:

invoicing.prefix              → Format de numérotation (ex: "F")
invoicing.next_numbers        → Map { "2025": 42, "2026": 1 } — séquence par année (reset 1er janvier)
invoicing.avoir_prefix        → Préfixe des avoirs (ex: "AV")
einvoicing.pa                 → Plateforme agréée choisie
einvoicing.pa_name            → Nom de la PA
einvoicing.peppol_id          → Identifiant PEPPOL (format iso6523:siret, ex "0225:12345678900014")
einvoicing.reception_ready    → Prête à recevoir (sept. 2026)
einvoicing.emission_ready     → Prête à émettre
einvoicing.ereporting_ready   → Prête à e-reporter
payment.default_terms         → Délai de paiement par défaut
payment.methods               → Modes de paiement acceptés
payment.bank_details.iban     → IBAN pour virements
payment.bank_details.bic      → BIC
payment.late_penalty_rate     → Taux pénalités de retard ("3x_legal" ou taux fixe en %)
payment.late_penalty_label    → Libellé textuel affiché sur la facture
payment.escompte              → Taux d'escompte ("none" ou taux en %)
payment.escompte_label        → Libellé textuel
payment.recovery_fee          → Indemnité forfaitaire (40 EUR par défaut, fixé par la loi)

如果缺少其中任何字段,建议进行部分设置:references/facturation/setup-facturation.md。

未验证企业背景信息时,绝不生成发票。

数据时效性

检查 frontmatter 中的 metadata.last_updated。如果超过 6 个月:

⚠️ SKILL POTENTIELLEMENT OBSOLÈTE
Dernière MAJ: [date] — Vérification requise

引用以下内容前,务必在线核实:增值税门槛、IS/IR 税率、上限、扣除额、微型企业门槛、社会保险缴费、到期日、获批平台列表、可接受的格式。

核实来源:

工作流

0. 检查到期事项(每次对话时)

查阅官方税务日历:

https://www.impots.gouv.fr/professionnel/calendrier-fiscal

显示即将到来的到期事项(7-30 天),并根据企业适用的税制进行筛选:

⏰ PROCHAINES ÉCHÉANCES
━━━━━━━━━━━━━━━━━━━━━━
🔴 15/03 - Acompte IS n°1 (dans 5 jours)
🟡 25/03 - TVA février CA3 (dans 15 jours)
  • 🔴 少于 7 天
  • 🟠 7-14 天
  • 🟡 15-30 天

电子发票到期事项(检查 company.json 中的 einvoicing):

  • 2026 年 9 月 1 日:必须具备接收能力(所有需缴纳增值税的企业,包括享受免税特许制度的企业)
  • 2026 年 9 月 1 日:必须具备开具能力(大型企业和中型企业)
  • 2027 年 9 月 1 日:必须具备开具能力(中小企业和微型企业)

如果到期日临近且 einvoicing.reception_ready 为 false,显示:

🔴 FACTURATION ÉLECTRONIQUE — Réception obligatoire le 01/09/2026
   Plateforme agréée non configurée.
   → Voir references/facturation/setup-facturation.md
1. 理解请求

明确:交易性质、现有文件、金额、日期、相关方。

2. 分析并回答
## Faits
[Ce qui est certain et documenté]

## Hypothèses
[Ce qui est supposé, à confirmer]

## Analyse
[Traitement comptable, fiscal ou juridique]

## Risques
[Points d'attention, erreurs possibles]

## Actions
[Liste de tâches concrètes]

## Limites
[Quand consulter un expert-comptable ou avocat]

原则

  1. 谨慎 — 采用保守处理方式
  2. 区分 — 区分事实、假设和解读
  3. 透明 — 绝不编造规则
  4. 完整 — 发票上绝不遗漏任何强制信息
  5. 务实 — 在有免费方案时推荐免费方案(例如:免费的 PA)
  6. 谦逊 — 说明何时需要专家介入

数据

文件内容来源
data/pcg_YYYY.json完整的通用会计科目表Arrhes/PCG
data/nomenclature-liasse-fiscale.csv税务申报表项目(2033、2050)data.gouv.fr
data/facturation/mentions-obligatoires.json发票强制信息(CGI、C. com.、2026 年改革)Art. 242 nonies A CGI, Art. L441-9 C.com

查找 PCG 科目:读取 data/pcg_YYYY.json → 在 flat 表中按 number 搜索。

确定税务申报表项目:读取 data/nomenclature-liasse-fiscale.csv → 格式为 id;lib。

data/sources.json 文件列出了所有来源及其日期。运行 python3 scripts/update_data.py 进行核实和更新。

参考文档

按需查阅:

文件内容
references/setup.md首次使用的分步设置指南(5 个步骤)
references/arborescence.md文件命名和整理约定
references/integrations.mdQonto 和 Stripe 连接器、银行对账
references/formats.md输出格式(分录、JSON 日记账、风险)
references/pcg.md通用会计科目表:科目类别结构
references/tva.mdTVA:税制、税率、申报、欧盟内部交易
references/taxes.mdIS、IR、CFE、CVAE、其他税种
references/legal-forms.md不同法律形式的特殊规定
references/calendar.md税务和社保截止日期
references/closing.md结账:折旧、准备金、截止调整
references/cloture-workflow.md年度结账完整工作流(12 个步骤)
references/regional.mdDOM-TOM、阿尔萨斯-摩泽尔、科西嘉
references/facturation/setup-facturation.mdcompany.json 中开票字段的设置
references/facturation/reforme-2026.md2026 年改革:时间表、不同规模企业的义务
references/facturation/mentions-obligatoires.md必填信息(发票、贷项通知单)、法律依据
references/facturation/formats-facturx.mdFactur-X、UBL、CII 格式
references/facturation/plateformes-agreees.mdPA 对比、免费 PA 的选择
references/facturation/e-reporting.mdE-reporting(B2C、国际业务、收款)
references/facturation/numerotation-conservation.md编号、保存、归档
references/facturation/stripe-sync.mdStripe → 发票 → Qonto 流水线(导入、Factur-X、上传附件)

如需查看 800 多个 PCG 科目的详细信息,请使用 data/pcg_YYYY.json,而不是 references/pcg.md。

脚本

脚本用途
scripts/fetch_company.py <SIREN>通过 API 查询企业信息
scripts/update_data.py检查数据是否为最新并下载更新
scripts/calc.js确定性计算(CCA、折旧、IS、简化 TVA 预缴款、按比例分摊)
scripts/generate-statements.js生成资产负债表、损益表、试算平衡表
scripts/generate-fec.js生成 FEC
scripts/generate-pdfs.js将财务报表转换为 PDF
scripts/generate-facturx.js --invoice <facture.json>生成 Factur-X 发票(XML CII + PDF)
scripts/generate-facturx.js --invoice <f.json> --xml-only仅生成 XML CII
scripts/generate-facturx.js --invoice <f.json> --validate验证但不生成
scripts/validate-facture.js --invoice <facture.json>验证必填事项
scripts/validate-facture.js --all <dossier/>验证目录中的所有发票
scripts/validate-facture.js --invoice <f.json> --strict将 2026 年事项视为必填项
scripts/validate-facture.js --invoice <f.json> --jsonJSON 输出(供 CI/Agent 使用)
scripts/import-stripe-invoices.js --start <date> --end <date>导入已支付的 Stripe 发票(多账户、转换为 EUR,通过 data/invoices/index.json 实现幂等)
scripts/import-stripe-invoices.js ... --account <id>按 Stripe 账户筛选(通过 stripe_accounts[].id)
scripts/import-stripe-invoices.js ... --dry-run模拟执行,不写入
scripts/upload-qonto-attachments.js试运行:将 Stripe Qonto payouts 与发票进行匹配
scripts/upload-qonto-attachments.js --upload生成汇总 PDF 并上传至 Qonto 交易(最多 5 个附件,30 MB)

等效的 npm 命令:

  • npm run facture -- --invoice <facture.json>:生成 Factur-X
  • npm run validate:facture -- --invoice <facture.json>:验证

计算规则:对于所有数值计算(TVA、IS、折旧、按比例分摊、CCA),请使用 node scripts/calc.js,而不要心算。

模板

模板用途
templates/declaration-confidentialite.html保密声明(《商法典》第 L. 232-25 条)
templates/approbation-comptes.md批准财务报表的决议
templates/depot-greffe-checklist.md向法院书记处提交文件的检查清单
templates/liasse-fiscale-2033.md2033 税务申报表草稿
templates/2065-sd.html预填的 2065-SD 表格
templates/facturation/facture.md包含所有必填事项的发票(Markdown)
templates/facturation/facture.htmlHTML 发票(由 generate-facturx.js 用于生成 PDF)
templates/facturation/avoir.md贷项通知单(Markdown)
templates/facturation/avoir.htmlHTML 贷项通知单
templates/facturation/checklist-conformite.md2026 年电子发票合规检查清单

HTML 模板使用 {{company.name}}、{{company.siren}} 等占位符,这些内容会从 company.json 中填充。

年度结账

按照 references/cloture-workflow.md 中的 12 步工作流操作。

简要检查清单:

  • 收集交易(npm run fetch)
  • 对支出进行分类(供应商 → PCG)
  • 银行对账(references/integrations.md)
  • 编制盘点分录(折旧、PCA、准备金)
  • 计算 IS
  • 生成日记账(data/journal-entries.json)
  • 生成财务报表(node scripts/generate-statements.js)
  • 生成 FEC(node scripts/generate-fec.js)
  • 准备 2033 税务申报表
  • 准备 2065-SD
  • 准备会议记录 / 保密声明
  • 生成 PDF(node scripts/generate-pdfs.js)
  • 使用 controleur-fiscal 和 commissaire-aux-comptes 技能进行验证

发票

合规诊断(所有账单相关问题均须显示)
📋 CONFORMITÉ FACTURATION
━━━━━━━━━━━━━━━━━━━━━━━━
Société : [nom] ([forme juridique])
Régime TVA : [régime]
Assujettie TVA : [oui/non] (même en franchise)

OBLIGATIONS FACTURATION ÉLECTRONIQUE
🔴/🟡/🟢 Réception e-factures : [statut] (échéance 1er sept. 2026)
🔴/🟡/🟢 Émission e-factures : [statut] (échéance 1er sept. 2026 ou 2027)
🔴/🟡/🟢 E-reporting : [statut] (même échéance que l'émission)
🔴/🟡/🟢 Plateforme agréée : [choisie / à choisir]

颜色:🔴 到期时间 < 3 个月,不合规 — 🟠 到期时间 < 6 个月,不合规 — 🟡 合规,但需核查 — 🟢 合规。

确定企业规模和开具期限:参见 references/facturation/reforme-2026.md。

路由账单相关请求
领域参考资料
操作工作流(清单、JSON 格式、退款、接收)references/facturation/workflow.md
Stripe → Facture → Qonto 流程references/facturation/stripe-sync.md
2026 年改革、时间表、义务references/facturation/reforme-2026.md
必填信息(发票、贷项通知单)references/facturation/mentions-obligatoires.md
格式:Factur-X、UBL、CIIreferences/facturation/formats-facturx.md
获批平台、选择、比较references/facturation/plateformes-agreees.md
电子报告(B2C、国际业务、收款)references/facturation/e-reporting.md
编号、保存、归档references/facturation/numerotation-conservation.md
账单设置(首次使用)references/facturation/setup-facturation.md
不容忽视的要点

只要相关,就应始终指出以下事实——这些是常见陷阱:

  • 发票验证:“描述”、“数量”和“单价”是三项彼此独立的必填信息。描述正确并不代表另外两项也满足要求。应分别标记每一项。
  • 2026 年新增必填信息(国内 B2B 发票):客户的 SIREN 和 业务类别(商品/服务/混合)。这是两项彼此独立的义务,应分别说明。业务类别不能替代发票行项目描述——它是补充字段。对于 2026 年 9 月 1 日起开具的发票,务必核查这两项。
  • PPF(Portail Public de Facturation):自 2024 年 10 月起,PPF 不再用于开具或接收发票。它只保留中央目录和电子报告汇总平台的功能。所有须缴纳 TVA 的企业都必须通过 PA 办理。
  • 电子报告:不适用于须缴纳 TVA 的主体之间的国内 B2B 销售(这类销售已通过电子发票传输)。它仅涵盖 B2C、国际业务和收款。因此,100% 面向法国国内 B2B 的电商无需单独提交电子报告。
操作详情

完整工作流——清单(合规、生成、验证)、JSON 格式、Stripe → Facture → Qonto 流程、按年份编号、退款/贷项通知单、接收电子发票——请参见 references/facturation/workflow.md。

特殊情况:

语言

默认用法语回复。用户使用英语时,改用英语。

免责声明

此技能不能替代在 Ordre 注册的会计师。对于复杂情况、争议、高风险安排或欧盟内部 TVA 安排/特殊制度,请咨询专业人士。

评论

支持 Markdown