ThomasMoreAI/legal-skills-open / br/criminal/skills/representacoes-cautelares
representacoes-cautelares
VerifiedRedacao de representacoes cautelares policiais e pedidos judiciais investigativos, com organizacao de fatos, indicios, fundamentos legais e pedidos delimitados. Use quando Codex precisar produzir peca para o Juizo envolvendo prisao preventiva, busca e apreensao, quebra de sigilo telefonico/telematico/bancario, medidas cautelares diversas, sequestro ou bloqueio de bens, sigilo processual, ou combinacao dessas medidas, a partir de autos, relatorios, PDFs, DOCX, TXT, planilhas e outros elementos da investigacao.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.6 KB |
| agents/openai.yaml | config | 343 B |
| references/checklist-qualidade.md | markdown | 1.8 KB |
| references/formatacao-docx.md | markdown | 1.4 KB |
| references/modelo-prisao-busca-cautelares.md | markdown | 3.6 KB |
| references/modelo-quebra-sigilo.md | markdown | 3.1 KB |
| references/pedidos-acessorios.md | markdown | 1.5 KB |
| references/variantes.md | markdown | 2.0 KB |
| scripts/gerar_docx_representacao.py | script | 4.9 KB |
scripts/gerar_docx_representacao.py
View on GitHubfrom __future__ import annotations
import argparse
import re
from pathlib import Path
from docx import Document
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml import OxmlElement
from docx.oxml.ns import qn
from docx.shared import Inches, Pt
def configure_section(section):
section.page_width = Inches(8.27)
section.page_height = Inches(11.69)
section.top_margin = Inches(1.0)
section.bottom_margin = Inches(1.0)
section.left_margin = Inches(1.25)
section.right_margin = Inches(0.75)
def configure_styles(document: Document):
normal = document.styles["Normal"]
normal.font.name = "Arial"
normal._element.rPr.rFonts.set(qn("w:eastAsia"), "Arial")
normal.font.size = Pt(12)
pf = normal.paragraph_format
pf.line_spacing = 1.5
pf.space_after = Pt(0)
pf.space_before = Pt(0)
def configure_header(section, header_lines: list[str]):
if not header_lines:
return
header = section.header
for idx, line in enumerate(header_lines):
paragraph = header.paragraphs[0] if idx == 0 else header.add_paragraph()
paragraph.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = paragraph.add_run(line)
run.bold = True
run.font.name = "Arial"
run.font.size = Pt(10)
def configure_footer(section, footer_text: str):
footer = section.footer
paragraph = footer.paragraphs[0]
paragraph.alignment = WD_ALIGN_PARAGRAPH.CENTER
if footer_text:
run = paragraph.add_run(f"{footer_text} | Página ")
run.font.name = "Arial"
run.font.size = Pt(9)
fld = OxmlElement("w:fldSimple")
fld.set(qn("w:instr"), "PAGE")
fld.append(OxmlElement("w:r"))
paragraph._p.append(fld)
def add_inline_formatting(paragraph, text: str):
parts = re.split(r"(\*\*.*?\*\*)", text)
for part in parts:
if not part:
continue
is_bold = part.startswith("**") and part.endswith("**")
content = part[2:-2] if is_bold else part
run = paragraph.add_run(content)
run.bold = is_bold
run.font.name = "Arial"
run.font.size = Pt(12)
def parse_markdown(document: Document, text: str):
for raw_line in text.splitlines():
line = raw_line.rstrip()
if not line.strip():
document.add_paragraph()
continue
if line.startswith("# "):
p = document.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
p.paragraph_format.space_after = Pt(12)
run = p.add_run(line[2:].strip().upper())
run.bold = True
run.font.name = "Arial"
run.font.size = Pt(16)
continue
if line.startswith("## "):
p = document.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
p.paragraph_format.space_before = Pt(12)
p.paragraph_format.space_after = Pt(6)
run = p.add_run(line[3:].strip())
run.bold = True
run.font.name = "Arial"
run.font.size = Pt(14)
continue
if line.startswith("### "):
p = document.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
p.paragraph_format.space_before = Pt(6)
run = p.add_run(line[4:].strip())
run.bold = True
run.font.name = "Arial"
run.font.size = Pt(12)
continue
if re.match(r"^\d+\.\s+", line):
p = document.add_paragraph(style="List Number")
p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
p.paragraph_format.line_spacing = 1.5
add_inline_formatting(p, re.sub(r"^\d+\.\s+", "", line))
continue
if line.startswith("- "):
p = document.add_paragraph(style="List Bullet")
p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
p.paragraph_format.line_spacing = 1.5
add_inline_formatting(p, line[2:].strip())
continue
p = document.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
p.paragraph_format.first_line_indent = Pt(28)
p.paragraph_format.line_spacing = 1.5
add_inline_formatting(p, line)
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--input", required=True)
parser.add_argument("--output", required=True)
parser.add_argument("--header-line", action="append", default=[])
parser.add_argument("--footer-text", default="")
args = parser.parse_args()
source = Path(args.input)
target = Path(args.output)
target.parent.mkdir(parents=True, exist_ok=True)
document = Document()
configure_section(document.sections[0])
configure_styles(document)
configure_header(document.sections[0], args.header_line)
configure_footer(document.sections[0], args.footer_text)
parse_markdown(document, source.read_text(encoding="utf-8"))
document.save(target)
print(target.resolve())
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |