Documento Pruebas Sat logo

Documento Pruebas Sat

Community
elimorals
documento-pruebas-sat

Genera el papel de trabajo y respaldo documental para defender la declaración anual cripto ante una auditoría SAT. Incluye CSVs originales, capturas de explorer, hojas FIFO, justificación de criterios, TC DOF usados. Usar cuando el usuario diga "papel de trabajo cripto", "respaldo SAT", "documentar cripto", "auditoría cripto", "evidencia declaración cripto", "expediente fiscal cripto".

Overview

Publisherelimorals
RepositorySkills_MX
Skill namedocumento-pruebas-sat
Stars
29
Forks
5
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by elimorals on GitHub. Read the source before you install it.

Installation

Install the Documento Pruebas Sat AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/elimorals/Skills_MX/tree/main/cripto-fiscal-mx/skills/documento-pruebas-sat
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/elimorals/Skills_MX.git /tmp/Skills_MX
mkdir -p .claude/skills
cp -r /tmp/Skills_MX/cripto-fiscal-mx/skills/documento-pruebas-sat .claude/skills/documento-pruebas-sat
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Documento Pruebas Sat in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Documento Pruebas Sat on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Documento Pruebas Sat is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Documento de pruebas para SAT — declaración cripto

Para qué sirve

Si el SAT te requiere información o te audita por operaciones cripto (los exchanges mexicanos ya son visibles; los extranjeros lo serán con CARF, intercambio previsto 2027), necesitas demostrar:

  1. Origen de los recursos: cómo llegaron las criptos a tu wallet/cuenta
  2. Costo base verificable: precio en MXN al momento de adquisición
  3. Cálculo de ganancia: FIFO documentado
  4. Tratamiento aplicado: enajenación, permuta, intereses, demás ingresos
  5. Conservación de la documentación: 5 años desde la presentación de la declaración (Art. 30 CFF)

Este skill produce el expediente completo para responder a un requerimiento.

Estructura del expediente

expediente-cripto-{rfc}-{ejercicio}/
├── 00-resumen-ejecutivo.pdf
├── 01-csvs-originales/
│   ├── bitso-{ejercicio}.csv
│   ├── binance-{ejercicio}.csv
│   ├── coinbase-{ejercicio}.csv
│   └── kraken-{ejercicio}.csv
├── 02-self-custody/
│   ├── ethereum-{address}.json     # export de Etherscan
│   ├── polygon-{address}.json
│   └── txs-clasificadas.csv
├── 03-tc-dof/
│   └── tc-usd-mxn-{ejercicio}.csv  # TC DOF de cada día con operación
├── 04-precios-mercado/
│   ├── fuente-coingecko-{ejercicio}.csv
│   └── fuente-coinmarketcap-{ejercicio}.csv  # backup
├── 05-calculos-fifo/
│   ├── inventario-inicial.csv
│   ├── operaciones-procesadas.csv
│   ├── ganancias-realizadas.csv
│   └── inventario-final.csv
├── 06-permutas/
│   └── permutas-detectadas-{ejercicio}.csv
├── 07-rendimientos/
│   ├── staking-{ejercicio}.csv
│   ├── lending-{ejercicio}.csv
│   └── airdrops-{ejercicio}.csv
├── 08-nfts/
│   └── operaciones-nft-{ejercicio}.csv
├── 09-cfdis-recibidos/
│   ├── cfdi-bitso-comisiones.xml   # CFDIs por servicios pagados
│   └── cfdi-binance-comisiones.xml
├── 10-justificacion-criterios.md
├── 11-conciliacion-final.xlsx
└── 12-declaracion-anual-borrador.pdf

Algoritmo de generación

python
import os
import shutil
import json
from datetime import datetime
from decimal import Decimal

def generar_expediente_sat(rfc: str, ejercicio: int, contexto: dict) -> str:
    """
    Genera el expediente completo a partir del contexto procesado por:
    - importar-operaciones-exchange
    - calcular-costo-base-fifo
    - permuta-cripto-cripto-gravable
    - staking-y-airdrops-ingreso
    - nft-enajenacion-bienes
    - tracking-wallets-self-custody
    """
    rfc_hash = hash_rfc(rfc)
    ruta = f"expediente-cripto-{rfc_hash}-{ejercicio}"
    os.makedirs(ruta, exist_ok=True)

    # 1. Copiar CSVs originales (NO modificarlos — auditoria requiere)
    for fuente in contexto.get("csvs_originales", []):
        shutil.copy(fuente["path"], f"{ruta}/01-csvs-originales/")

    # 2. Self-custody: export JSON crudo del explorer + tabla clasificada
    for wallet in contexto.get("wallets_self_custody", []):
        with open(f"{ruta}/02-self-custody/{wallet['cadena']}-{wallet['address']}.json", "w") as f:
            json.dump(wallet["raw_explorer_response"], f, indent=2)

    # 3. TCs DOF de cada día operado (NO solo del 31-dic)
    fechas_operadas = sorted({op["fecha"][:10] for op in contexto["operaciones"]})
    with open(f"{ruta}/03-tc-dof/tc-usd-mxn-{ejercicio}.csv", "w") as f:
        f.write("fecha,tc_dof_usd_mxn,fuente_publicacion\n")
        for fecha in fechas_operadas:
            tc = contexto["tcs_dof"].get(fecha, "—")
            f.write(f"{fecha},{tc},DOF\n")

    # 4. Precios de mercado (CoinGecko + CMC como backup)
    # ... (mismo patrón)

    # 5. Hojas FIFO
    with open(f"{ruta}/05-calculos-fifo/operaciones-procesadas.csv", "w") as f:
        f.write("fecha,activo,tipo,cantidad,valor_mxn,costo_base_aplicado,ganancia\n")
        for op in contexto["operaciones_fifo"]:
            f.write(f"{op['fecha']},{op['activo']},{op['tipo']},{op['cantidad']},"
                    f"{op['valor_mxn']},{op['costo_base']},{op['ganancia']}\n")

    # 10. Justificación de criterios (importante para SAT)
    with open(f"{ruta}/10-justificacion-criterios.md", "w") as f:
        f.write(generar_justificacion(contexto))

    # 11. Conciliación final (xlsx con totales por concepto)
    # 12. Declaración anual borrador
    generar_conciliacion_xlsx(f"{ruta}/11-conciliacion-final.xlsx", contexto)

    # PDF resumen ejecutivo
    generar_pdf_resumen(f"{ruta}/00-resumen-ejecutivo.pdf", contexto)

    return ruta


def generar_justificacion(contexto: dict) -> str:
    return f"""# Justificación de criterios aplicados

## Método de costo base
Se aplicó **FIFO** (Primeras Entradas, Primeras Salidas) de forma consistente.
La LISR exige costo comprobado de adquisición (Art. 121) actualizado (Art. 124)
pero no fija método para unidades fungibles; FIFO es el criterio elegido. Documentado en hoja
`05-calculos-fifo/`.

## Tratamiento de permutas cripto-cripto
Cada intercambio activo-activo se reconoció como **enajenación** del activo
entregado (Art. 14 CFF — toda transmisión de propiedad; Art. 119 LISR), valuado al TC DOF y precio
de mercado del día. Detalle en `06-permutas/`.

## Tratamiento de staking y airdrops
Reconocidos como **ingreso acumulable Cap IX (demás ingresos)** al valor de
mercado del día de recepción. El valor reconocido se vuelve costo base para la
posterior venta. Detalle en `07-rendimientos/`.

## NFTs
Operaciones de coleccionista esporádico — enajenación de bienes (Cap. IV LISR).
Royalties recibidos como Cap IX.

## Conservación
Este expediente se conservará en formato digital por **5 años** desde la fecha
de presentación de la declaración (Art. 30 CFF).

## Fuentes de precio
- TC DOF: publicación oficial Banco de México
- Precios cripto: CoinGecko (primario) + CoinMarketCap (verificación)

## Vigencia
Criterios al {datetime.now().strftime('%Y-%m-%d')}. Reglas SAT pueden cambiar
en RMF anual — revisar antes de aplicar a años posteriores.
"""

Buenas prácticas

  1. Inmutabilidad: el expediente se genera 1 vez y se archiva. NO modificar después.
  2. Fecha cierta (opcional): constancia de conservación NOM-151-SCFI-2016 de un prestador acreditado, si se quiere probar que el archivo no cambió.
  3. Backup off-site: copia en almacenamiento independiente (Google Drive cifrado, Mega, etc.).
  4. Versionado: si se corrige declaración posterior (complementaria), generar expediente v2 sin tocar v1.
  5. Hash de integridad: incluir sha256sums.txt de cada archivo para demostrar no-alteración.

Output

json
{
  "expediente_generado": "expediente-cripto-abc123-2026/",
  "archivos_incluidos": 47,
  "tamanio_mb": 12.5,
  "hash_zip": "sha256:abc...",
  "fecha_generacion": "2026-04-15T10:30:00Z",
  "vigencia_criterios": "Criterio propio documentado — la LISR no tiene capítulo específico para activos virtuales",
  "checklist_pre_envio": [
    "[ ] Subir backup off-site",
    "[ ] Anotar hash en contrato de servicios contables",
    "[ ] Conservar 5 años mínimo"
  ]
}

Frequently asked questions

What does the Documento Pruebas Sat AI skill do?

Genera el papel de trabajo y respaldo documental para defender la declaración anual cripto ante una auditoría SAT. Incluye CSVs originales, capturas de explorer, hojas FIFO, justificación de criterios, TC DOF usados. Usar cuando el usuario diga "papel de trabajo cripto", "respaldo SAT", "documentar cripto", "auditoría cripto", "evidencia declaración cripto", "expediente fiscal cripto".

Why use Documento Pruebas Sat on TypingMind?

Because you install it once and use it with any model. Documento Pruebas Sat is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Documento Pruebas Sat in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/elimorals/Skills_MX/tree/main/cripto-fiscal-mx/skills/documento-pruebas-sat. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Documento Pruebas Sat?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Documento Pruebas Sat?

As many as you like. As long as a model supports skills, you can use Documento Pruebas Sat with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Documento Pruebas Sat AI skill free?

Yes. It is published on GitHub by elimorals under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇