Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Memory
persian-pdf-studyguide-forge
Try itModel-agnostic, agent-agnostic fidelity-first pipeline converting operator-authorized Persian/English RTL lecture PDFs into offline HTML study guides — recall-first dual OCR (PyMuPDF + Tesseract fas+eng PSM ensemble), rendered-page evidence, multi-model correction, session-grounded enrichment (tables/flashcards/quizzes/mnemonics/summaries/scenarios), measured fidelity, QA gates, verified ZIP. v1.5.0 runs on ANY model family through 8 API dialects (OpenAI, Responses, Gemini, Anthropic, Cohere, Ollama, HuggingFace, offline mock) or with no model at all, auto-discovers providers from the host agent's environment, self-heals provider quirks and model retirements, and exposes one deterministic CLI/MCP entrypoint plus cross-model consensus so different agents reproduce the same intended result.
What it does
Persian PDF StudyGuide Forge v1.2.2 — complete executable pipeline
The skill document
Persian PDF StudyGuide Forge v1.2.2 — complete executable pipeline
Convert an operator-authorized Persian/English RTL lecture PDF into a polished offline study guide without confusing OCR, AI reconstruction, or enrichment with source evidence.
Capabilities included in this artifact
- authorized HTTPS download with PDF-magic, size and SHA-256 verification;
- measured
pdfinfointake and page-count safeguards; - PyMuPDF or
pdftotextlogical extraction; - independent Tesseract
fas+engOCR over high-resolution grayscale pages; - compact rendered-page JPEGs for visual adjudication and HTML fidelity;
- Persian NFKC/letter/digit/whitespace normalization while preserving ZWNJ;
- resumable multi-provider reasoning-team correction with strict JSON contracts;
- primary model rotation plus independent reviewer pass;
- retry/backoff, provider failover, cache/resume, and local OCR fallback;
- session candidate detection plus mandatory boundary review;
- session-grounded tables, flashcards, mnemonics, summaries, quizzes and scenarios;
- balanced and maximum enrichment modes;
- exact duplicate rejection and page-range-constrained references;
- self-contained Base64 images or linked local-image mode;
- established RTL shell: search, session map, foldable source units, dark mode, responsive tables, print, reduced motion, quiz scoring and deep links;
- per-page fidelity metrics and manual-review queue;
- measured HTML QA gates and verified ZIP/SHA-256 packaging;
- robust Persian/Arabic coercion: «صفحهٔ ۳» references, «الف/ب/ج/د» answer labels, bare JSON arrays and partial batches are normalized instead of silently dropped (v1.3.0);
- post-hoc independent flashcard answer verification against source pages via
scripts/verify_flashcards.py(v1.3.0); - stricter QA gates: no bare-letter flashcard answers and no duplicated option letter prefixes (v1.3.0).
Full procedures, failure recovery, and production tricks: docs/WORKFLOW_PLAYBOOK.md.
Quick start
python3 scripts/preflight.py
python3 scripts/extract_dual_ocr.py authorized.pdf --out work/extraction
# Optional network-assisted correction. providers.json stores ENV NAMES only.
export GEMINI_API_KEY='set-in-your-secret-manager'
python3 scripts/reasoning_team_correct.py work/extraction/evidence.json \
--providers providers.json --out work/corrections
python3 scripts/detect_session_candidates.py work/corrections/final.json \
--out work/session_candidates.json
# Review candidates against rendered pages, then create work/sessions.json.
python3 scripts/reasoning_team_enrich.py work/corrections/final.json work/sessions.json \
--providers providers.json --out work/enrichment --maximum
# Optional but recommended: independently verify flashcard answers against source pages.
python3 scripts/verify_flashcards.py work/corrections/final.json work/enrichment/all.json \
--providers providers.json --out work/enrichment/all.verified.json
python3 scripts/build_selfcontained_html.py work/corrections/final.json work/extraction \
work/enrichment/all.verified.json --output work/studyguide.html --title 'عنوان درس'
# (use work/enrichment/all.json if you skipped verification)
python3 scripts/fidelity_audit.py work/extraction/evidence.json \
work/corrections/final.json --out work/fidelity.json
python3 scripts/qa_gates.py work/studyguide.html
python3 scripts/verify_zip.py work work/final-studyguide.zip
run_pipeline.sh executes through correction and then intentionally pauses for reviewed session boundaries. It prints exact continuation commands.
Important evidence rule
Three layers remain distinct:
evidence.json: untouched/raw extraction evidence;corrections/final.json: edited teaching/source reconstruction;enrichment/all.json: clearly separate study aids.
Never place AI additions inside source evidence. Never claim verbatim transcription when reconstruction occurred. Rendered pages remain the final adjudication source for unreadable text and digits.
Network and key handling
Network use is optional and requires operator approval. providers.example.json contains api_key_env names, never key values. Scripts read keys from environment variables, never print request headers, and cache response bodies without credentials. Do not commit provider configuration containing literal secrets.
Included executable files
scripts/preflight.pyscripts/download_authorized_pdf.pyscripts/extract_dual_ocr.pyscripts/reasoning_team_correct.pyscripts/detect_session_candidates.pyscripts/reasoning_team_enrich.pyscripts/verify_flashcards.pyscripts/build_selfcontained_html.pyscripts/fidelity_audit.pyscripts/filter_figures.pyscripts/qa_gates.pyscripts/verify_zip.pyscripts/run_pipeline.shscripts/common.pytemplates/guide.csstemplates/app.jstemplates/providers.example.jsontemplates/sessions.example.jsontemplates/build_manifest.json
Guardrails
- Process only authorized material.
- Do not bypass access controls or copy secrets into artifacts.
- Do not fabricate source text, citation, medical fact, image provenance, counts or QA results.
- Do not silently delete image-only or difficult pages.
- Do not treat automated fidelity scores as semantic proof.
- Do not publish or distribute copyrighted source pages without permission.
- Inspect and validate all generated medical education before reliance.
Definition of done
A guide is complete only when actual source-unit/image counts match measured PDF pages, every reference resolves, every question contract passes, duplicates are removed, no forbidden external browser resources remain, fidelity exceptions were reviewed, displayed counts match measured counts, and packaging verification succeeds.
Related skills
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Trade crypto, manage a multi-chain wallet, and query an AI analyst from one CLI.
Read and write Excel workbooks, worksheets, ranges, tables, and charts in OneDrive through Microsoft Graph with managed OAuth.
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
More from orionshaowswmw
Browse all skillsDetect and repair partially wiped agent workspaces with integrity checks, signed manifests, guarded restore recipes, bounded local recovery state, and explicit off-box sync. Use when files, scripts, trees, models, or build outputs disappear or lose integrity between turns.
Seven offline mechanisms against slow/stale/zombie/sycophantic agent turns: prompt compaction, request fencing, zombie detection, CAPTCHA triage, anti-sycophancy spine, delivery register, invention quarry. Use when chat feels laggy, reconnects surface old answers, long chats degrade, or the agent caves under contradiction. JSON contracts; state per-agent under ~/.arena_turn; no network, no sudo.
Quota-aware LLM router that squeezes maximum usable AI out of free-tier API keys across Gemini, Mistral, OpenRouter, Kilo and Cerebras plus any OpenAI-compatible endpoint (including local Ollama/llama.cpp/vLLM). Probes every model on every key, measures real quality and real published rate limits, then routes each request to the cheapest model that can do the job — spending abundant capacity first and reserving scarce daily quota for when it is actually needed. Persists cooldowns to disk so a 429 discovered in one process is respected by the next. Use when an agent must make many LLM calls on free keys without hitting rate limits, when "all models failed", or when deciding which of several provider keys to use for a task.
Opt-in, model-neutral guidance for evidence-aware, dignified AI communication, with a compact response contract and offline deterministic text audit. It never injects prompts, edits host configuration, calls networks, reads secrets, or treats heuristics as truth.
Iran Chemical Database — live, dated, auditable, BEST-EFFORT index of chemical offerings in configured public Iranian supplier catalogues (websites + public Telegram channels). HTTrack/WooCommerce-REST/Telegram mirroring → local-only parsing → RDKit/PubChem/CAS-validated PostgreSQL with FastAPI + Streamlit. Fail-closed Iranian-suppliers-only country gate; coverage measured and published, never claimed complete. Installation = software + queued crawl, not a populated dataset. Ships a 1399-molecule CID-unique confirmed-organic seed baseline (v2.22, 2026-08-27: v2.19 primary + live Telegram/WooCommerce/sitemap crawl + 5-model fleet normalization, every new identity PubChem-confirmed). For academic procurement research.
Anti-stuck/anti-snapshot-wipe guard for agentic sandboxes with actual selfheal_runner.sh library, byte-verified GGUF manifest, native CPU rebuild +7-10%, har...