Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
davidcastagnetoa avatar

Document Expiry Validator

  • 12 installs
  • 1 repo stars
  • Updated March 10, 2026
  • davidcastagnetoa/skills

Validate an ID document's expiry date, plausible issue age, and supported country/document type from OCR/MRZ output before proceeding.

About

Validates that an identity document is not expired, not implausibly dated, and belongs to a supported country and document type. A developer uses it as a business-rule check after OCR extraction and before face match.

  • Rejects expired docs and implausible future expiry dates
  • Configurable supported-country list and TD1/TD2/TD3/passport types

Document Expiry Validator by the numbers

  • 12 all-time installs (skills.sh)
  • Ranked #3,541 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/davidcastagnetoa/skills --skill document_expiry_validator

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs12
repo stars1
Last updatedMarch 10, 2026
Repositorydavidcastagnetoa/skills

What it does

Validate an ID document's expiry date, plausible issue age, and supported country/document type from OCR/MRZ output before proceeding.

Files

SKILL.mdMarkdownGitHub ↗

document_expiry_validator

Valida que el documento no está caducado, que ha sido emitido recientemente (no demasiado antiguo), y que pertenece a un país o tipo de documento soportado por el sistema.

When to use

Usar después de la extracción OCR, como validación de negocio antes del face match.

Instructions

1. Extraer expiry_date del resultado OCR/MRZ (formato YYMMDD en MRZ). 2. Convertir a objeto datetime.date. 3. Verificar no expirado: if expiry_date < date.today(): reject('DOCUMENT_EXPIRED'). 4. Verificar no futuro inválido: fecha de expiración no puede ser más de 15 años desde hoy. 5. Verificar antigüedad máxima razonable de la foto (si el documento fue emitido hace >10 años, foto puede ser muy diferente → flag para revisión manual, no rechazo automático). 6. Verificar país aceptado: comparar country_code MRZ contra lista de países soportados. 7. Verificar tipo de documento soportado: TD1/TD2/TD3/PASSPORT según configuración.

Notes

  • Mantener la lista de países soportados en configuración actualizable sin redeploy.
  • Documentos de menos de 1 mes de antigüedad merecen mayor escrutinio (pueden ser recién creados).

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.