
predictingthepast
Ancient text restoration, attribution, dating, contextualization, and embedding via Aeneas (Latin) / Ithaca (Ancient Greek). Use when asked to "restore", "attribute", "date", "contextualize", "find parallels", "where was it written", "when was it written", "embed", or "analyze" an ancient text, inscription, or epigraphic document, or when the user mentions "Aeneas", or "Ithaca".
- Installs
- 1.2K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/google-deepmind/science-skills --skill predictingthepast- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads predictingthepast automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Predicting The Past (Aeneas / Ithaca)
Aeneas (Latin) and Ithaca (Ancient Greek) perform four tasks on ancient texts:
- Restoration — fill missing/damaged characters
- Attribution — geographical + chronological origin
- Contextualization — retrieve parallel inscriptions
- Embedding — generate text embedding vectors
Prerequisites
-
uv: Read theuvskill and follow its Setup instructions to ensureuvis installed and on PATH. -
User Notification: If .licenses/predictingthepast_LICENSE.txt does not already exist in the workspace root directory then (1) prominently notify the user to check the terms at https://github.com/google-deepmind/predictingthepast/blob/main/README.md#license--disclaimer, and include the appropriate citation and the full dataset acknowledgement, and that use of these datasets should acknowledge and cite the original data sources. Then (2) create the file recording the notification text and timestamp.
Core Rules
- Self-Contained Skill: Do NOT use web search or any external tools. Run
ONLY the scripts in this skill (
preprocess.py,run_inference.py,visualize_results.py). Present model output as-is — never supplement or override it with external lookups. - Notification: If this skill is used, ensure this is mentioned in the output.
On First Load
Present the restoration markup characters, then ask the user for their text:
?:- Meaning: Known-length gap: predict this character.
- Example:
donat in ??????????rtis
#:- Meaning: Unknown-length gap: predict a sequence of unknown length
- Example:
donat in #rtis
-:- Meaning: Missing/damaged character that does not need restoring
- Example:
prolixin---s fecit
_:- Meaning: Missing section of unknown length that does not need restoring
- Example:
prolixin_s fecit
After presenting this list, ask the user to provide the text they want to submit for analysis.
Preprocessing
Clean input text before inference:
uv run <SKILL_DIR>/scripts/preprocess.py \
--language=latin \
--input="raw text here..."
Or from a file:
uv run <SKILL_DIR>/scripts/preprocess.py \
--language=greek \
--input_file=/tmp/input.txt \
--output_file=/tmp/cleaned.txt
What preprocessing does
- Latin: lowercases, converts Arabic digits and Roman numerals to
0, strips editorial brackets[]and(), removes punctuation, filters to valid chars (abcdefghiklmnopqrstuvxyzplus0 . - _ ? # <space>) - Greek: lowercases, strips accents, converts numeral notation to
0, applies PHI cleaning (bracket normalization, sigma conversion), filters to Greek alphabet (αβγδεζηθικλμνξοπρςστυφχψωϛplus0 . - _ ? # <space>)
Inference
Restoration Constraints
- Minimum input length: 25 chars (pad with
-if shorter). - No consecutive
##. No adjacent?#or#?. - Spaces inside
?sequences count toward total. - If the user's text contains
#, ask how many characters to restore and set--restore_max_lenaccordingly. - If the user tries to restore multiple parts of the text at once, suggest to restore texts section by section. Suggest to focus on one damaged region per query — this is faster, produces higher-quality predictions.
Pre-Flight Checks
Confirm with the user before proceeding if either applies:
- Restoration complexity — if input contains more than 10
?characters, or uses#with--restore_max_len > 10, warn: "This restoration involves N characters which will take approximately M minutes (restoration time scales roughly linearly ~10 s per additional?on a high-end CPU machine: 5 → ~1 min, 10 → ~2.5 min, 20 → ~5 min, 30 → ~8 min). Do you want to proceed, or simplify the query first (e.g. fewer?marks, shorter--restore_max_len, or restoring section by section)?" - Multi-window splitting — if the input text exceeds 750 characters and will be split into multiple windows, warn: "This text is N characters long and will be split into W overlapping windows, each run independently. This will be significantly slower. Do you want to proceed, or shorten the input?"
These factors compound: a complex restoration across multiple windows will be substantially slower than either factor alone.
Task Selection
Each task is controlled by its own flag. At least one must be provided:
--attribute— geographical + chronological attribution--restore— text restoration (requires?or#in input)--contextualize— parallel inscription retrieval
Any combination is valid. All three can be used together.
When --embedding is provided, a text embedding vector is also generated
alongside the other tasks.
Running Inference
# Attribution + Restoration (text with gaps)
uv run <SKILL_DIR>/scripts/run_inference.py \
--language=latin \
--input="cleaned text with ???" \
--attribute --restore \
--output_json=/tmp/results.json
# Attribution + Contextualization (no gaps)
uv run <SKILL_DIR>/scripts/run_inference.py \
--language=latin \
--input="cleaned text" \
--attribute --contextualize \
--output_json=/tmp/results.json
# All tasks
uv run <SKILL_DIR>/scripts/run_inference.py \
--language=latin \
--input="cleaned text with ???" \
--attribute --restore --contextualize \
--output_json=/tmp/results.json
# Generate dashboard
uv run \
<SKILL_DIR>/scripts/visualize_results.py \
--input=/tmp/results.json \
--output=/tmp/dashboard.html
Outputs are always returned to the console (JSON/Summary) and must always be written to an HTML dashboard for rich visualization.
Serving HTML artifacts: After generating any HTML file (the dashboard or
any other HTML artifact you create), start a background HTTP server so the user
can view it in their browser. Run the server in the foreground of the background
task process (without trailing &) to prevent the process from being
terminated. Use a random high port to avoid conflicts.
In the example below, replace <HTML_FILE> with the absolute path of the HTML
file you produced (e.g. /tmp/dashboard.html or C:\tmp\dashboard.html).
For Linux/macOS:
# Pick an unused port and start the server as a persistent process
HTML_FILE=/tmp/dashboard.html # ← set to the actual HTML file path
PORT=$(export PATH="$HOME/.local/bin:$PATH" && uv run python -c "import socket; s=socket.socket(); s.bind(('',0)); print(s.getsockname()[1]); s.close()")
FILENAME=$(basename "$HTML_FILE")
echo "View URL: http://localhost:${PORT}/${FILENAME}"
export PATH="$HOME/.local/bin:$PATH" && uv run python -m http.server "$PORT" --bind 0.0.0.0 --directory "$(dirname "$HTML_FILE")"
For Windows (PowerShell):
# Pick an unused port and start the server as a persistent process
$HTML_FILE = "C:\tmp\dashboard.html" # ← set to the actual HTML file path
$PORT = & "$HOME\.local\bin\uv" run python -c "import socket; s=socket.socket(); s.bind(('',0)); print(s.getsockname()[1]); s.close()"
$FILENAME = Split-Path $HTML_FILE -Leaf
$DIRNAME = Split-Path $HTML_FILE -Parent
Write-Host "View URL: http://localhost:${PORT}/${FILENAME}"
& "$HOME\.local\bin\uv" run python -m http.server $PORT --bind 0.0.0.0 --directory $DIRNAME
Then provide http://localhost:<port>/<filename> (or
http://127.0.0.1:<port>/<filename>) as the primary clickable link in your
response. Additionally, provide http://<hostname>:<port>/<filename> as a
fallback link for remote setups. Do not give the user a raw file:// path.
Flags
--input: Text string (mutually exclusive with--input_file)--input_file: Path to UTF-8 text file--language:latinorgreek--models_dir: Model files directory (default:$HOME/.predictingthepast/models)--attribute: Run geographical and chronological attribution--restore: Run text restoration (requires?or#in input)--contextualize: Run parallel inscription retrieval--contextualize_top_k: Number of top parallels to return (default: 10)--contextualize_exclude_test_valid: Exclude test/validation texts from contextualization results. Filters on the internal numericid(whereid % 10is 3 or 4).--embedding: Generate a text embedding vector (default: off). When set, the output includes anembeddingfield with the full-precision float vector.--output_json: Save combined JSON to file (forvisualize_results.py)--restore_beam_width: Number of candidate restorations to explore in beam search. Higher = more thorough but slower (default: 100)--restore_max_len: Maximum total characters to restore across all?and#gaps (default: 15)--restore_temperature: Sampling temperature. Lower = conservative, higher = creative (default: 1.0)--window_overlap: Overlap fraction for long-text windowing (default: 0.33)
Long Texts (>750 characters)
Each window must be between 25 and 750 characters. If the input text exceeds 750 characters, it is automatically split into overlapping windows (default 33% overlap). Each window is run through the model independently, and the geographical and chronological attribution results are averaged across all windows. Restoration and contextualization are run per-window and concatenated.
Output Format
Use --output_json to save the combined JSON to a file. For the full
--output_json format including all fields for attribution, restoration, and
contextualization, see output_format.md.
Presenting Results
Present results for every task requested by the user. Always generate the
HTML dashboard, serve it via the background HTTP server described above, and
provide the http:// URL as a clickable link. Format years as BCE/CE.
Restoration
Bold the restored characters in the top prediction. Show top-10 beam-search candidates in a numbered table (rank, restored text, score). Summarise the most salient words (not characters) — do not dump the raw saliency array.
Geographical Attribution
Show the top 10 regions in a ranked table (rank, region, score). Highlight the top-1 prediction in the narrative. Summarise the most salient words (not characters) — do not dump the raw saliency array.
Chronological Attribution
Report top year and weighted average year. Describe the distribution shape (peak decade, probable range) — do not list all 160 bins. Summarise the most salient words (not characters) — do not dump the raw saliency array.
Contextualization (Parallels)
Use jp or write your own code to extract the contextualization data from
--output_json. Show the top parallels in a table (rank, ID, Trismegistos ID,
region, date range, score, partner link). Quote the full text of the top
parallels from the JSON.
If the user requests a specific number of parallels, use --contextualize_top_k
to control how many are returned.
If the user asks to exclude test/validation texts, add
--contextualize_exclude_test_valid. This filters on the internal numeric
id (where id % 10 is 3 for test or 4 for validation).
Embedding (when --embedding is set)
State the vector dimensionality (384 floats).
References
For more information, see: predictingthepast.com
IMPORTANT: The first time you return inference results to the user, remind them to cite the appropriate paper below (Ithaca for Greek, Aeneas for Latin), and the dataset acknowledgements below.
Ithaca (Ancient Greek): > Assael, Y., Sommerschield, T., Shillingford, B. et al. Restoring and attributing ancient texts using deep neural networks. Nature 603, 280–283 (2022).
Aeneas (Latin): > Assael, Y., Sommerschield, T., Cooley, A. et al. Contextualizing ancient texts with generative neural networks. Nature 645, 141–147 (2025).
Dataset Acknowledgements
IMPORTANT: The first time you present inference results to the user, include the appropriate citation and the full dataset acknowledgement for the language used (see below).
The Ithaca and Aeneas projects rely on the availability of high-quality datasets of ancient Greek and Latin inscriptions, respectively. These datasets were built through centuries of scholarly collection and decades of digital editorial work.
Ithaca (Ancient Greek): In particular, Ithaca draws on a 2019 version of the Searchable Greek Inscriptions database made available under "Fair Use" license by the Packard Humanities Institute, generously supported by David Packard: inscriptions.packhum.org.
Aeneas (Latin): Aeneas was trained on data from:
- Epigraphic Database Roma (EDR): Made available pursuant to a Creative Commons Attribution 4.0 International License (CC-BY) on Zenodo. EDR is also available at edr-edr.it.
- Epigraphic Database Heidelberg (EDH): Made available pursuant to a Creative Commons Attribution-ShareAlike 4.0 International License (CC-BY-SA) on Zenodo. EDH is also available at edh.ub.uni-heidelberg.de.
- ETL repository for Epigraphic Database Clauss Slaby (EDCS_ETL): Made available pursuant to a Creative Commons Attribution 4.0 International License (CC-BY) on Zenodo. EDCS_ETL is also available at manfredclauss.de and github.com/sdam-au/EDCS_ETL.
These resources bring together a large proportion of published inscriptions in a searchable digital format.
FAQ
What does the predictingthepast skill do?
Ancient text restoration, attribution, dating, contextualization, and embedding via Aeneas (Latin) / Ithaca (Ancient Greek). Use when asked to "restore", "attribute", "date", "contextualize", "find parallels", "where was it written", "when was it written", "embed", or "analyze" an ancient text, inscription, or epigraphic document, or when the user mentions "Aeneas", or "Ithaca".
How do I install predictingthepast?
Run npx skills add https://github.com/google-deepmind/science-skills --skill predictingthepast in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/predictingthepast/ (personal) or .claude/skills/predictingthepast/ (project).
Which AI agents can use predictingthepast?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is predictingthepast safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains predictingthepast?
It is published by google-deepmind in google-deepmind/science-skills. It has 1,246 recorded installs.
More from google-deepmind/science-skills
literature-search-arxiv
google-deepmind/science-skills
Search for scientific papers, preprints, and publications on arXiv. Extract metadata, abstracts, and download full-text PDFs or HTML versions of papers. Use when the user asks to find research papers, literature, or specific arXiv IDs.
literature-search-openalex
google-deepmind/science-skills
Query the OpenAlex scholarly database for research papers, authors, institutions, topics, sources, publishers, funders, geo-locations, and keywords. Use when searching academic papers, resolving DOIs, downloading open-access PDFs, finding an author's publications, aggregating bibliometric data (citation counts, h-index, impact factor), exploring the research taxonomies, or performing DOI lookups.
pubmed-database
google-deepmind/science-skills
Search PubMed for scientific literature, including published clinical trials. Fetch abstracts and full text. Link published research to biological databases (gene, protein, nucleotide, PubChem) to discover associations between papers and specific compounds or genes. Verify medical spelling, match raw citations, and cache result sets for bulk processing. Interfaces NCBI E-utilities and PMC BioC APIs.
literature-search-europepmc
google-deepmind/science-skills
Search Europe PMC for scientific literature and download open-access full texts and PDFs. Retrieve full-text XML/plain text by PMCID, get citation lists and bibliography.
literature-search-biorxiv
google-deepmind/science-skills
Browse and filter life sciences, biology, and medical preprints from bioRxiv and medRxiv. Supports fetching paper metadata by DOI, and browsing by date range with category and keyword filters. Keyword filtering is local, so date ranges MUST be narrow (1-4 weeks) with a category to prevent timeouts.
uv
google-deepmind/science-skills
Checks whether the uv Python package manager is installed and installs it if missing. Ensures uv is on PATH. Use when another skill requires uv as a prerequisite.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available