vet-vault
VA benefits assistant with DD214 OCR, eligibility analysis, and benefit summary export. Handles camera capture → OCR extraction → eligibility computation, VA deadline fetching, and PDF export for veteran appointments.
- License 许可
- MIT
- 最近更新
- 2026-09-04
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- vet-vault
- author
- rabbit-r1-skillz
- version
- 1.0.0
- description
- VA benefits assistant with DD214 OCR, eligibility analysis, and benefit summary export. Handles camera capture → OCR extraction → eligibility computation, VA deadline fetching, and PDF export for veteran appointments.
02 资源文件 3
- 资产文件card.jpg32.0 KB
- 资产文件icon.png6.7 KB
- 参考文档index.html58.0 KB
03 SKILL.md 正文
VetVault — OpenClaw Skill Setup
VetVault runs on the Rabbit R1 but delegates three tasks to your local machine via OpenClaw:
- DD214 OCR — capture image via R1 camera, extract fields with a local OCR engine
- VA Deadline calendar — fetch current VA benefit deadlines from VA.gov or a local cache
- PDF export — generate a formatted eligibility summary PDF for VA appointments
Prerequisites
- OpenClaw installed and running on your local machine
- Python 3.10+ (for the skill handler script)
- The following Python packages:
pip install pytesseract pillow reportlab requests beautifulsoup4
- Tesseract OCR installed and on your PATH
- macOS:
brew install tesseract - Linux:
sudo apt install tesseract-ocr - Windows: Download installer from UB Mannheim, add install folder to PATH
- macOS:
Skill handler
Create a file at ~/.openclaw/skills/vet-vault.py:
#!/usr/bin/env python3
"""
VetVault OpenClaw skill handler.
Processes commands from the R1 VetVault creation:
- scan-dd214 → capture R1 camera image, OCR, extract DD214 fields
- get-deadlines → fetch/return VA benefit deadline list
- export-pdf → generate eligibility summary PDF
"""
import json
import os
import re
import sys
import datetime
from pathlib import Path
try:
import pytesseract
from PIL import Image
import requests
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib import colors
except ImportError as e:
print(json.dumps({"status": "error", "error": f"Missing dependency: {e}. Run: pip install pytesseract pillow reportlab requests"}))
sys.exit(1)
OUTPUT_DIR = Path.home() / "Documents" / "VetVault"
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
CACHE_DIR = Path.home() / ".openclaw" / "cache" / "vet-vault"
CACHE_DIR.mkdir(parents=True, exist_ok=True)
# ── DD214 field extraction ──────────────────────────────────────────────────
def ocr_image(image_path: str) -> str:
"""Run Tesseract OCR on an image file."""
img = Image.open(image_path)
# Upscale for better OCR accuracy on small text
scale = max(1, 2400 // img.width)
if scale > 1:
img = img.resize((img.width * scale, img.height * scale), Image.LANCZOS)
img = img.convert("L") # grayscale
return pytesseract.image_to_string(img, config="--psm 6")
def extract_dd214_fields(text: str) -> dict:
"""
Parse raw OCR text from a DD214 and extract key fields.
DD214 Block numbers are fixed: this targets the most critical ones.
"""
lines = text.split("\n")
fields = {}
# Block 1: Name (Last, First, MI)
name_match = re.search(r"(?:1\.|Block\s*1|NAME)[^\w]*([A-Z][A-Z ,.\-]+)", text, re.I)
if name_match:
fields["name"] = name_match.group(1).strip()[:60]
# Block 5: Date of Birth / Block 6: Reserve Obligation — skip
# Block 7a: Place of Entry
# Block 11: Primary Specialty (MOS/Rate)
mos_match = re.search(r"(?:11\.|PRIMARY\s+SPECIALTY|MOS|RATE)[^\w]*([0-9A-Z]{2,10}[^\n]{0,30})", text, re.I)
if mos_match:
fields["mos"] = mos_match.group(1).strip()[:40]
# Block 12a/b: Entry/Separation dates
date_pattern = r"(\d{4}[-/]\d{2}[-/]\d{2}|\d{2}[-/]\d{2}[-/]\d{4})"
date_matches = re.findall(date_pattern, text)
if len(date_matches) >= 2:
fields["entryDate"] = date_matches[0]
fields["sepDate"] = date_matches[1]
# Block 12c: Net active service (for daysServed)
service_match = re.search(r"(?:12c|NET\s+ACTIVE)[^\w]*(\d+)\s+(\d+)\s+(\d+)", text, re.I)
if service_match:
yrs = int(service_match.group(1))
mos = int(service_match.group(2))
dys = int(service_match.group(3))
fields["daysServed"] = yrs * 365 + mos * 30 + dys
# Block 24: Character of Service
char_match = re.search(r"(?:24\.|CHARACTER\s+OF\s+SERVICE)[^\w]*(HONORABLE|GENERAL|OTHER THAN HONORABLE|BAD CONDUCT|DISHONORABLE|UNCHARACTERIZED)", text, re.I)
if char_match:
fields["characterOfService"] = char_match.group(1).strip()
# Block 25: Separation Authority / Block 26: Sep Code / Block 27: RE Code
re_code_match = re.search(r"(?:27\.|RE[-\s]*CODE|REENTRY)[^\w]*(RE-\d|RE\d)", text, re.I)
if re_code_match:
fields["reCode"] = re_code_match.group(1).strip()
# Block 28: Narrative Reason for Separation
reason_match = re.search(r"(?:28\.|NARRATIVE\s+REASON)[^\w]*([A-Z][^\n]{5,60})", text, re.I)
if reason_match:
fields["dischargeType"] = reason_match.group(1).strip()[:80]
# Block 13: Decorations
dec_match = re.search(r"(?:13\.|DECORATION|MEDAL|AWARD)[^\n]*([^\n]{10,200})", text, re.I)
if dec_match:
fields["decorations"] = dec_match.group(1).strip()[:200]
# Branch of service from common indicators
branch_map = {
"ARMY": "Army",
"NAVY": "Navy",
"MARINE": "Marine Corps",
"AIR FORCE": "Air Force",
"COAST GUARD": "Coast Guard",
"SPACE FORCE": "Space Force",
}
text_upper = text.upper()
for key, val in branch_map.items():
if key in text_upper:
fields["branch"] = val
break
fields["raw"] = text[:500] # first 500 chars for debugging
return fields
# ── VA Deadlines ────────────────────────────────────────────────────────────
BUILTIN_DEADLINES = [
{"urgency": "urgent", "dateStr": "1-Yr Window", "title": "Disability Claim Filing", "desc": "File within 1 year of discharge for full retro pay to separation date"},
{"urgency": "soon", "dateStr": f"Jan 31 {datetime.date.today().year + 1}", "title": "Priority Gr. 7–8 Re-enrollment", "desc": "Annual VA healthcare enrollment deadline for lowest priority groups"},
{"urgency": "normal", "dateStr": "15-Yr Limit", "title": "Post-9/11 GI Bill (Ch.33)", "desc": "Must use within 15 years of last active duty separation"},
{"urgency": "normal", "dateStr": "12-Yr Limit", "title": "Vocational Rehab (Ch.31)", "desc": "Apply within 12 years of discharge or date of VA rating notification"},
{"urgency": "normal", "dateStr": "1-Yr from Dec", "title": "BVA Appeal Filing", "desc": "1 year from any VA rating decision to file Board of Veterans' Appeals"},
{"urgency": "normal", "dateStr": "No Deadline", "title": "PACT Act Toxic Exposure", "desc": "No filing deadline for burn pit, Agent Orange, radiation era veterans"},
{"urgency": "soon", "dateStr": f"Oct 1 {datetime.date.today().year}", "title": "VA Funding Fee Update", "desc": "VA home loan funding fees adjust each October 1st"},
{"urgency": "normal", "dateStr": "Ongoing", "title": "SMC Aid & Attendance", "desc": "No deadline — apply when condition meets Aid and Attendance criteria"},
{"urgency": "normal", "dateStr": "Annual", "title": "CHAMPVA Enrollment Review", "desc": "Review CHAMPVA enrollment if dependent status changes"},
{"urgency": "normal", "dateStr": "60-Day", "title": "C&P Exam Reschedule", "desc": "Must reschedule missed C&P exam within 60 days to preserve claim"},
]
def get_deadlines() -> list:
"""Return VA benefit deadlines. Tries VA.gov, falls back to built-in list."""
cache_file = CACHE_DIR / "deadlines.json"
# Use cache if < 24 hours old
if cache_file.exists():
age_hours = (datetime.datetime.now().timestamp() - cache_file.stat().st_mtime) / 3600
if age_hours < 24:
with open(cache_file) as f:
return json.load(f)
# Try fetching from VA.gov (basic scrape of VA benefits pages)
deadlines = BUILTIN_DEADLINES.copy()
try:
resp = requests.get(
"https://www.va.gov/decision-reviews/",
timeout=8,
headers={"User-Agent": "VetVault/1.0 (veteran benefits assistant)"}
)
# If successful, we at least know VA.gov is reachable
# Full scraping would require more complex parsing — built-ins are sufficient
except Exception:
pass # Use built-ins
with open(cache_file, "w") as f:
json.dump(deadlines, f)
return deadlines
# ── PDF Export ──────────────────────────────────────────────────────────────
def generate_pdf(payload: dict) -> str:
"""Generate a benefits eligibility summary PDF."""
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
filename = OUTPUT_DIR / f"VA_Benefits_Summary_{timestamp}.pdf"
dd214 = payload.get("dd214") or {}
elig = payload.get("eligibility") or {}
notes = payload.get("notes") or []
qa = payload.get("qaHistory") or []
doc = SimpleDocTemplate(str(filename), pagesize=letter)
styles = getSampleStyleSheet()
story = []
# Title
title_style = styles["Title"]
story.append(Paragraph("VA Benefits Eligibility Summary", title_style))
story.append(Paragraph(f"Generated: {datetime.datetime.now().strftime('%B %d, %Y')}", styles["Normal"]))
story.append(Spacer(1, 20))
# DD214 section
if dd214:
story.append(Paragraph("DD214 Information", styles["Heading2"]))
dd_data = [
["Field", "Value"],
["Name", dd214.get("name", "—")],
["Branch", dd214.get("branch", "—")],
["MOS / Rate", dd214.get("mos", "—")],
["Entry Date", dd214.get("entryDate", "—")],
["Separation Date", dd214.get("sepDate", "—")],
["Character of Service", dd214.get("characterOfService", "—")],
["Discharge Type", dd214.get("dischargeType", "—")],
["Decorations", dd214.get("decorations", "—")[:80]],
["Days Served", str(dd214.get("daysServed", "—"))],
]
t = Table(dd_data, colWidths=[160, 320])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#1a2540")),
("TEXTCOLOR", (0,0), (-1,0), colors.white),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), 9),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.HexColor("#f5f7fa"), colors.white]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#cccccc")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(Spacer(1, 16))
# Eligibility summary
elig_labels = {
"healthcare": "VA Healthcare",
"education": "GI Bill / Education",
"disability": "Disability Compensation",
"homeloan": "VA Home Loan",
"smc": "Special Monthly Compensation",
"pension": "Pension",
"vocrehab": "Vocational Rehab (Ch.31)",
}
elig_colors = {
"yes": colors.HexColor("#639922"),
"maybe": colors.HexColor("#EF9F27"),
"no": colors.HexColor("#E24B4A"),
"unknown": colors.HexColor("#378ADD"),
}
story.append(Paragraph("Benefit Eligibility Overview", styles["Heading2"]))
story.append(Paragraph(
"Note: This is an automated estimate only. Official determination requires VA review. "
"Contact your regional VA office or a Veterans Service Organization (VSO) for official assessment.",
styles["Normal"]
))
story.append(Spacer(1, 8))
elig_data = [["Benefit", "Estimated Status"]]
for key, label in elig_labels.items():
status = elig.get(key, "unknown")
elig_data.append([label, status.upper()])
et = Table(elig_data, colWidths=[300, 180])
style_cmds = [
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#1a2540")),
("TEXTCOLOR", (0,0), (-1,0), colors.white),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), 9),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#cccccc")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
]
for i, (key, _) in enumerate(elig_labels.items(), start=1):
status = elig.get(key, "unknown")
c = elig_colors.get(status, colors.gray)
style_cmds.append(("TEXTCOLOR", (1, i), (1, i), c))
style_cmds.append(("FONTNAME", (1, i), (1, i), "Helvetica-Bold"))
bg = colors.HexColor("#f5f7fa") if i % 2 == 0 else colors.white
style_cmds.append(("BACKGROUND", (0, i), (0, i), bg))
et.setStyle(TableStyle(style_cmds))
story.append(et)
story.append(Spacer(1, 16))
# Q&A history
if qa:
story.append(Paragraph("Recent Questions & Answers", styles["Heading2"]))
for item in qa[-5:]:
story.append(Paragraph(f"Q: {item.get('q','')}", styles["Normal"]))
story.append(Paragraph(f"A: {item.get('a','')}", styles["Normal"]))
story.append(Spacer(1, 8))
story.append(Spacer(1, 8))
# Personal notes
if notes:
story.append(Paragraph("Personal Notes", styles["Heading2"]))
for note in notes[-10:]:
ts_str = datetime.datetime.fromtimestamp(note.get("ts", 0)/1000).strftime("%m/%d/%Y") if note.get("ts") else ""
story.append(Paragraph(f"[{ts_str}] {note.get('text','')}", styles["Normal"]))
story.append(Spacer(1, 8))
# Footer disclaimer
story.append(Spacer(1, 20))
story.append(Paragraph(
"DISCLAIMER: This summary is for informational purposes only and does not constitute a legal or VA determination "
"of eligibility. Always consult with your regional VA office or an accredited Veterans Service Organization (VSO) "
"for official benefit claims. Free VSO assistance: 1-800-827-1000 (VA Benefits hotline). "
"eBenefits: www.ebenefits.va.gov — vet.gov for online claims.",
styles["Normal"]
))
doc.build(story)
return str(filename)
# ── OpenClaw command router ─────────────────────────────────────────────────
def handle_command(cmd: dict) -> dict:
command = cmd.get("command", "")
params = cmd.get("params", {})
if command == "scan-dd214":
# OpenClaw will have already captured the R1 camera frame to a temp file
# The image path is passed in params, or we look for the most recent capture
image_path = params.get("imagePath") or find_latest_capture()
if not image_path or not os.path.exists(image_path):
return {"status": "error", "error": "No camera capture found. Ensure R1 camera frame was saved."}
ocr_text = ocr_image(image_path)
fields = extract_dd214_fields(ocr_text)
return {"status": "done", "data": fields}
elif command == "get-deadlines":
deadlines = get_deadlines()
return {"status": "done", "data": {"deadlines": deadlines}}
elif command == "export-pdf":
path = generate_pdf(params)
return {"status": "done", "data": {"path": path}}
else:
return {"status": "error", "error": f"Unknown command: {command}"}
def find_latest_capture() -> str | None:
"""Find the most recently created image in common capture locations."""
search_dirs = [
Path.home() / "Downloads",
Path.home() / "Pictures",
Path("/tmp"),
Path.home() / ".openclaw" / "captures",
]
candidates = []
for d in search_dirs:
if d.exists():
for ext in ("*.jpg", "*.jpeg", "*.png"):
candidates.extend(d.glob(ext))
if not candidates:
return None
# Most recently modified
return str(max(candidates, key=lambda p: p.stat().st_mtime))
if __name__ == "__main__":
# OpenClaw calls this script with the command JSON on stdin
raw = sys.stdin.read().strip()
try:
cmd = json.loads(raw)
except json.JSONDecodeError:
print(json.dumps({"status": "error", "error": "Invalid JSON input"}))
sys.exit(1)
result = handle_command(cmd)
print(json.dumps(result))
OpenClaw skill registration
Add this entry to ~/.openclaw/skills.json:
{
"name": "vet-vault",
"description": "VA benefits assistant — DD214 OCR, deadline fetching, PDF export",
"handler": "python3 ~/.openclaw/skills/vet-vault.py",
"commands": ["scan-dd214", "get-deadlines", "export-pdf"],
"timeout": 60000
}
Camera capture setup
VetVault sends a scan-dd214 command. OpenClaw must capture the R1 camera frame before calling the skill. In your OpenClaw config, add a pre-hook for vet-vault:scan-dd214 that saves the current camera frame to ~/.openclaw/captures/latest.jpg. The skill will find it via find_latest_capture().
If your OpenClaw version supports camera integration directly, set:
"cameraCapture": true,
"captureDir": "~/.openclaw/captures"
Privacy and data handling
- DD214 data is stored only on the R1 device (local storage) and your local machine (PDF export).
- No DD214 data is sent to external servers. The LLM Q&A uses the built-in R1 AI (on-device or Rabbit's API) with your DD214 data included in the prompt — review Rabbit's privacy policy for on-device vs. cloud AI processing.
- VA deadline fetching makes a read-only HTTP GET to
va.gov— no personal data is transmitted. - OCR is performed locally by Tesseract — no image upload to external OCR services.
Testing
Test each command manually:
# Test OCR extraction
echo '{"command":"scan-dd214","params":{"imagePath":"/path/to/test-dd214.jpg"}}' | python3 ~/.openclaw/skills/vet-vault.py
# Test deadline fetch
echo '{"command":"get-deadlines","params":{}}' | python3 ~/.openclaw/skills/vet-vault.py
# Test PDF export
echo '{"command":"export-pdf","params":{"dd214":{"name":"Doe, John","branch":"Army","mos":"11B","dischargeType":"Honorable"},"eligibility":{"healthcare":"yes","education":"yes","disability":"maybe"},"notes":[],"qaHistory":[]}}' | python3 ~/.openclaw/skills/vet-vault.py
Resources
- VA Benefits hotline: 1-800-827-1000
- eBenefits online portal: ebenefits.va.gov
- VA.gov claims: va.gov/decision-reviews
- Find a VSO: va.gov/ogc/apps/accreditation/index.asp
- Current benefit rates: benefits.va.gov/compensation/resources_comp.asp
- Vet Center (readjustment counseling): 1-877-927-8387
04 同仓库更多 Skills
whisper-quiz
WhisperQuiz — voice-answered trivia game for Rabbit R1. Generates questions via the R1's built-in LLM, captures spoken answers via STT, and evaluates correctness with flexible LLM-based matching.
walk-cast
Walking podcast production skill. Receives raw audio metadata and transcript from the R1, removes long pauses, applies noise reduction and normalization, generates AI chapter titles and episode metadata via LLM, and uploads the final episode to your configured podcast RSS host (Spotify for Podcasters / Anchor, Podbean, Buzzsprout, RSS.com, or any FTP-accessible feed).
voice-novel
Local machine skill for VoiceNovel — handles story export to disk.
voice-guide
Environment description and navigation assistant for blind and low-vision users. Analyzes camera frames via a vision LLM, reads visible text, identifies scene categories (people/vehicles/food/hazards/exits), performs 360° scans, retrieves GPS position, and sends emergency SMS alerts — all via audio feedback with zero screen dependency.
voice-draft
Voice-driven document drafting for the Rabbit R1. Dictate stream-of-consciousness speech; the R1 formats it into Email, Blog Post, Report, Proposal, Meeting Notes, Creative Writing, Code Comments, Cover Letter, or Tweet Thread — then saves the result to a configured folder on your local machine via OpenClaw.
voice-commit
Hands-free git and CI workflow voice controller for the Rabbit R1. Speak git/CI commands and hear results — commit, push, status, PR management, test runs, and deploy, all voice-driven via OpenClaw.