cnj-parser

cnj-parser is a skill for Claude Code, Codex from autodevx/legal-skills. It costs 102 tokens per session (1,313 once invoked), scanned A, original, MIT.

A parser for Brazilian court case numbers in the standard CNJ format. It removes extra characters, checks the 20-digit number and verification digits, and identifies the justice system and court.

In plain words
What is it for?
Use it to validate, normalize, format, and extract information from one or many Brazilian process numbers.
Why use it?
Case numbers copied from different systems may be masked, unmasked, or contain extra characters, which can cause errors when filing or searching.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to validate, normalize, format, and extract information from one or many Brazilian process numbers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/autodevx/legal-skills/cnj-parser
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add autodevx/legal-skills --skill cnj-parser
Clone the repo
git clone --depth 1 https://github.com/autodevx/legal-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cnj-parser

README.md
[![agentmods](https://agentmods.dev/badge/skills/autodevx/legal-skills/cnj-parser/github.svg)](https://agentmods.dev/skills/autodevx/legal-skills/cnj-parser)
Your own site
<a href="https://agentmods.dev/skills/autodevx/legal-skills/cnj-parser"><img src="https://agentmods.dev/badge/skills/autodevx/legal-skills/cnj-parser/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cnj-parser

Your own site · 80×15
<a href="https://agentmods.dev/skills/autodevx/legal-skills/cnj-parser"><img src="https://agentmods.dev/badge/skills/autodevx/legal-skills/cnj-parser.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,313 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00102 $0.01313
Opus 5 $0.00051 $0.00656
Sonnet 5 $0.00020 $0.00263
Haiku 4.5 $0.00010 $0.00131

Measured 10d ago against content hash 0d4f86bb9830, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

cnj-parser scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/cnj_validator.py, tests/test_cnj_validator.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cnj-parser/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Parser de Número CNJ

Formato oficial

O número unificado de processos judiciais segue a Resolução CNJ nº 65/2008:

NNNNNNN-DD.AAAA.J.TT.OOOO
│         │     │ │  └── Órgão julgador (4 dígitos)
│         │     │ └───── Tribunal (2 dígitos)
│         │     └─────── Justiça (1 dígito)
│         └───────────── Ano de distribuição (4 dígitos)
│         └───────────── Dígitos verificadores (2 dígitos)
└─────────────────────── Número sequencial (7 dígitos)

Comportamento esperado

Input aceito

  • Número com máscara: 0002150-34.2023.8.13.0024
  • Número sem máscara: 00021503420238130024
  • Número com espaços ou caracteres extras: 0002150-34.2023.8.13.0024 (TJMG)
  • Lote de números (lista, planilha, texto livre com múltiplos processos)

Passos de processamento

  1. Normalizar: remover tudo que não é dígito
  2. Validar tamanho: deve resultar em exatamente 20 dígitos
  3. Segmentar: separar nos campos NNNNNNN, DD, AAAA, J, TT, OOOO
  4. Validar dígito verificador: algoritmo módulo 97 (Resolução CNJ 65/2008)
  5. Enriquecer: identificar segmento de justiça, tribunal e formatar

Algoritmo de validação (módulo 97)

# Dois passos conforme Resolução CNJ 65/2008
r1 = int(nnnnnnn) % 97
r2 = int(f"{r1:02d}{aaaa}{j}{tt}") % 97
dv_calculado = 98 - (int(f"{r2:02d}{oooo}") % 97)
valido = (dv_calculado == int(dd))

Mapa de segmentos de justiça (campo J)

J Segmento
1 Supremo Tribunal Federal
2 Conselho Nacional de Justiça
3 Superior Tribunal de Justiça
4 Justiça Federal (TRFs 1-6)
5 Justiça do Trabalho (TRTs 1-24)
6 Justiça Eleitoral (TREs)
7 Justiça Militar da União
8 Justiça dos Estados e DF (TJs)
9 Justiça Militar Estadual

Mapa de tribunais (campo TT para J=8 — Justiça Estadual)

TT Tribunal
01 TJAC
05 TJBA
09 TJGO
13 TJMG
17 TJPE
21 TJRS
25 TJSE

Read the full file on GitHub · 131 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 131 lines · 102 tokens per session scan A 0d4f86bb9830

Subscribe to this mod's changes

cnj-parser is a skill published in the GitHub repository autodevx/legal-skills (12 stars, last pushed 1mo ago), licensed MIT. It adds 102 tokens to every session and 1,313 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

Legal Intake Triage

Use when an inbound business request reaches the legal team — an email, ticket, form submission, or chat ask — to produce a structured intake triage that classifies the request, captures urgency as stated, surfaces conflict-check and confidentiality questions, and proposes a routing recommendation for the legal team…

zgbrenner/agentcounsel · 65 tokens

Legal Meeting Briefing

Use when preparing a structured briefing for a meeting with legal relevance — assembling background, participants, agenda, key documents, open issues, legal considerations, talking points, and a follow-up action-item tracker from the materials provided.

zgbrenner/agentcounsel · 49 tokens

Templated Legal Response

Use when drafting a response to a routine, recurring legal inquiry from a configured template, with a built-in escalation gate that stops the templated path when the matter shows characteristics that require individualized counsel review.

zgbrenner/agentcounsel · 46 tokens

Signature Routing Checklist

Use when a document is believed final and ready to sign — to run a pre-signature completeness checklist, identify signers and signing order, flag blockers, and produce a routing plan for attorney review before the document is sent for execution.

zgbrenner/agentcounsel · 51 tokens

previdencia-brasil

Use para INSS, aposentadoria, benefícios previdenciários, cálculo de contribuição, regras de transição 2026, auxílio-doença, salário-maternidade, pensão por morte. Ativa em "aposentadoria", "INSS", "quando posso me aposentar", "auxílio-doença", "salário-maternidade", "BPC", "contribuição INSS".

AlissonSantos1/brasil-legal-skills · 88 tokens

societario-brasil

Use para abertura de empresa, tipos jurídicos, direitos e deveres de sócios, resolução de conflitos societários, geração de contratos, alvarás, licenças, certidões negativas e análise se vale a pena ter sócio. Ativa em "abrir empresa", "LTDA", "contrato social", "conflito com sócio", "alvará", "certidão negativa".

AlissonSantos1/brasil-legal-skills · 91 tokens