Communitygithub.com

ASoudy/AGS

西班牙自僱人士的會計與稅務管理工具。當用戶需要計算季度增值稅(303 表格)、計算 IRPF 分期付款(130 表格)、管理收支簿、核對開立或收到的發票、計算預扣稅、準備季度申報、估算應繳稅款、處理來自 Stripe 或 Substack 的收入(區分歐盟含增值稅付款與國際免稅付款,並將貨幣換算為歐元),或對西班牙自僱人士的稅務或會計有任何疑問時使用。此技能保證透過 Python 腳本進行數學精確計算,並適用現行西班牙稅務法規。

AGS 是什麼?

此技能專為西班牙自僱人士(autónomos)設計,提供精確的會計與稅務計算輔助。它能處理季度增值稅(IVA)申報(模型 303)、個人所得稅(IRPF)分期付款(模型 130)、發票管理、收支簿生成,以及從 Stripe 或 Substack 平台收入的分類與換算。所有計算均強制使用 Python 腳本執行,確保數學精度,避免人為估算錯誤。支援的平台包括 Claude Code、Coder 等 AI 編碼代理,用戶可透過自然語言指令觸發對應的計算流程。該技能嚴格遵循西班牙稅務局(AEAT)的規範,並內建歐盟 27 國、英國(免稅)、無識別地區等特殊稅務處理邏輯,同時包含對歐盟內增值稅、國際出口免稅、費用扣除及貨幣換算的明確規則。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ASoudy/AGS/tree/HEAD/claude_skills_libraries/landing-page-mastery/skills/gestor-autonomos

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

西班牙自僱人士管理工具

專為西班牙自僱工作者設計的會計與稅務管理技能,提供數學精確的計算支援。

[!CAUTION] 警告:此技能為輔助工具,不能取代專業顧問的建議。產生的計算與建議應由合格的會計師或專業人士審核。使用本工具的責任完全由用戶承擔。Mafia Claude Skills 及其貢獻者不對因使用本工具而導致的稅務申報錯誤或罰款負責。

基本原則

  1. 強制數學精確性:務必使用 Python 腳本進行所有計算。嚴禁心算。
  2. 法律依據:所有操作皆遵循西班牙稅務局 (AEAT) 的法規。
  3. 雙重驗證:每個計算都必須可驗證且可追溯。

主要工作流程

步驟 1:識別操作類型

用戶需要什麼?

  • 計算季度增值稅 → 執行 scripts/calcular_iva.py
  • 計算季度個人所得稅 (IRPF) → 執行 scripts/calcular_irpf.py
  • 處理發票/支出 → 執行 scripts/procesar_facturas.py
  • 生成會計帳簿 → 執行 scripts/generar_libro.py
  • 處理 Stripe/Substack 收入 → 執行 scripts/procesar_stripe.py
  • 查詢法規 → 參考 references/normativa_fiscal.md

步驟 2:收集資料

根據操作類型向用戶索取必要資訊:

季度增值稅:

  • 已開立發票(稅基 + 應收增值稅)
  • 可抵扣的已收發票(稅基 + 實付增值稅)
  • 季度 (1T, 2T, 3T, 4T) 與年份

個人所得稅 (模型 130):

  • 該季度的收入(不含增值稅)
  • 該季度的可扣除支出(不含增值稅)
  • 客戶代扣的預扣稅額
  • 本年先前已繳納的分期付款

發票:

  • 發票號碼
  • 日期
  • 客戶/供應商的 NIF/CIF
  • 概念描述
  • 稅基
  • 適用增值稅稅率
  • IRPF 預扣稅(如適用)

步驟 3:使用腳本執行計算

強制使用腳本進行所有數值計算:

# 計算季度增值稅
python3 scripts/calcular_iva.py --iva-repercutido <amount> --iva-soportado <amount>

# 計算個人所得稅模型 130
python3 scripts/calcular_irpf.py --ingresos <amount> --gastos <amount> --retenciones <amount> --pagos-anteriores <amount>

# 從 CSV 處理發票列表
python3 scripts/procesar_facturas.py --archivo <path.csv> --tipo <emitidas|recibidas>

# 生成收支帳簿
python3 scripts/generar_libro.py --trimestre <1-4> --año <YYYY> --facturas-emitidas <path> --facturas-recibidas <path>

步驟 4:呈現結果

向用戶顯示:

  1. 完整的計算明細
  2. 最終結果(以歐元 € 格式顯示)
  3. 申報截止日期(如適用)
  4. 相關注意事項或考量

西班牙增值稅稅率 (2024-2025)

類型百分比適用範圍
一般21%大多數商品與服務
減免10%食品、交通、餐飲住宿
超減免4%麵包、牛奶、水果、蔬菜、書籍、報紙
免稅0%醫療、教育、保險、金融服務

發票中的 IRPF 預扣稅

情況預扣稅率
專業人士(一般)15%
新自僱人士(前 3 年)7%
課程、講座15%
租賃19%

季度申報期限

季度期間申報截止日期
1T一月-三月4 月 1-20 日
2T四月-六月7 月 1-20 日
3T七月-九月10 月 1-20 日
4T十月-十二月次年 1 月 1-30 日

主要可扣除支出

完整細節請參閱 references/normativa_fiscal.md

100% 可扣除:

  • 自僱人士社保費
  • 會計與顧問費
  • 專業責任保險
  • 辦公用品
  • 主機、域名、軟體
  • 與業務相關的培訓
  • 廣告與行銷

有限額可扣除:

  • 水電瓦斯等供應(若在家工作,限 30%)
  • 車輛(最高 50%,依專業使用比例)
  • 差旅費(有每日限額)

重要注意事項

  1. 切勿近似:稅務計算必須精確到分。
  2. 保留憑證:必須保存發票至少 4 年。
  3. 驗證 NIF:務必確認 NIF/CIF 的正確性。
  4. 增值稅一致性:實付增值稅僅在與業務活動相關時才可抵扣。

與 Stripe/Substack 整合

⚠️ 重要 - 模型 303 與模型 130 的區別

模型 303(季度增值稅):

  • 申報時不包含稅基
  • 僅報告:
    • 格子 03:應收增值稅額(歐盟客戶的 21%)
    • 格子 60:免稅出口(非歐盟客戶的稅基)

模型 130(季度個人所得稅):

  • 包含稅基(歐盟 + 非歐盟總和)
  • 然後減去可扣除支出(手續費)
  • 結果:該季度的淨收入

重要 - 適用的稅務規則

1. 收取的價格已包含增值稅(Tax Inclusive)

  • 你向客戶收取的金額已內含增值稅
  • 提取稅基:稅基 = 總額 / 1.21
  • 不要乘以 0.21(那會是加徵增值稅)
  • 範例:若收取 60 歐元 → 稅基 = 49.59 歐元,增值稅 = 10.41 歐元

2. 地域性由國家決定,而非貨幣

  • 智利客戶以歐元支付 → 出口(免增值稅)
  • 西班牙客戶以美元支付 → 需繳增值稅
  • 優先級:country (billing) > country (ip)

3. 無法識別國家的付款 → 保守原則(視為歐盟)

  • 若無國家資訊,則視為歐盟客戶(需繳增值稅)
  • 雖然可能多付,但稅務上更安全

4. 手續費(Substack + Stripe)為可扣除支出

  • 在個人所得稅(模型 130)中扣除
  • 不影響增值稅

支援的格式

Substack 原生 CSV 格式:

email,date,currency,amount,Substack fee,Stripe fee,...,country (ip),country (billing)
[email protected],02-Oct-25,eur,€60.00,€6.00,€1.15,...,ES,ES

Stripe Dashboard CSV 格式:

id,Amount,Currency,Created (UTC),country (billing),Status,...
pi_xxx,60.00,eur,2025-10-02,ES,succeeded,...

使用腳本

# 處理 Substack 或 Stripe 的 CSV:
python3 scripts/procesar_stripe.py --archivo pagos.csv --trimestre 4 --año 2025

# 腳本會自動:
# - 偵測格式(Substack 或 Stripe)
# - 解析帶有符號的金額(€60.00, CA$140.00)
# - 透過除以 1.21(而非相乘)提取稅基
# - 按客戶國家分類(而非貨幣)
# - 計算手續費作為可扣除支出

產生的結果

模型 303(增值稅):

  • 格子 03:應收增值稅額(歐盟稅基的 21%)
  • 格子 60:免稅出口(非歐盟客戶)- 重要:申報為稅基,而非稅額

模型 130(個人所得稅):

  • 稅基:歐盟 + 非歐盟客戶稅基的總和
  • 支出:Substack + Stripe 手續費(可扣除)
  • 淨收入:稅基 - 支出

歐盟 27 國(參考)

AT, BE, BG, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK

⚠️ 英國 (GB/UK) 自 2021 年起不屬於歐盟 → 免稅

實例

來自西班牙 (ES) 的 60 歐元付款:
  稅基:60 / 1.21 = 49.59 歐元
  內含增值稅:60 - 49.59 = 10.41 歐元

來自智利 (CL) 的 60 歐元付款:
  稅基:60 歐元(總額,不分割)
  增值稅:0 歐元(免稅出口)

無法識別國家的 85 歐元付款:
  → 視為歐盟(保守處理)
  稅基:85 / 1.21 = 70.25 歐元
  內含增值稅:85 - 70.25 = 14.75 歐元

法規查詢

有關立法問題,請查閱 references/normativa_fiscal.md,內容包含:

  • 增值稅法(第 37/1992 號法律)
  • 個人所得稅法(第 35/2006 號法律)
  • 發票法規
  • 西班牙稅務局 (AEAT) 標準

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ASoudy/AGS

Advanced JavaScript animation library skill for creating complex, high-performance web animations.

ASoudy/AGS

Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

ASoudy/AGS

Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

ASoudy/AGS

One sentence - what this skill does and when to invoke it

ASoudy/AGS

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

ASoudy/AGS

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

ASoudy/AGS

Pull a YouTube video transcript into a queryable markdown vault with yt-dlp subtitle discovery, VTT cleanup, metadata frontmatter, and capture-seed stubs.

ASoudy/AGS

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

ASoudy/AGS

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

ASoudy/AGS

AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

ASoudy/AGS

CRITICAL: Use for Makepad animation system. Triggers on: makepad animation, makepad animator, makepad hover, makepad state, makepad transition, "from: { all: Forward", makepad pressed, makepad 动画, makepad 状态, makepad 过渡, makepad 悬停效果

ASoudy/AGS

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

ASoudy/AGS

Next.js App Router principles. Server Components, data fetching, routing patterns.

ASoudy/AGS

Expert integration of Supabase Auth with Next.js App Router

ASoudy/AGS

React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

ASoudy/AGS

Best practices for Remotion - Video creation in React

ASoudy/AGS

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

ASoudy/AGS

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

ASoudy/AGS

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

ASoudy/AGS

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

相關技能