ningzimu/codex-ppt-skill / skills/codex-ppt
codex-ppt
VerifiedGenerate visually unified image-based PPT/PPTX decks from articles, reports, papers, notes, or outlines.
scripts/record_slide_dispatch.py
View on GitHub#!/usr/bin/env python3
"""Record that a codex-ppt slide job was dispatched to a subagent."""
from __future__ import annotations
import argparse
from pathlib import Path
from slide_run_state import (
deck_dir_from_target,
find_slide,
locked_jobs,
now_iso,
rel_to_deck,
resolve_deck_path,
set_run_status,
sha256_file,
update_jobs_run_status,
)
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("deck", help="Deck directory or slide_jobs.json")
parser.add_argument("--slide", required=True, help="slide_01 or 1")
parser.add_argument("--agent-id", required=True)
parser.add_argument("--agent-nickname")
parser.add_argument("--prompt-file", help="Prompt file path. Defaults to the job file in slide_jobs.json.")
args = parser.parse_args()
deck_dir = deck_dir_from_target(args.deck)
with locked_jobs(deck_dir) as jobs:
slide = find_slide(jobs, args.slide)
if slide.get("status") != "pending":
raise SystemExit(f"{slide['slide_id']} must be pending before dispatch; got {slide.get('status')}")
prompt_ref = args.prompt_file or slide.get("job")
if not prompt_ref:
raise SystemExit(f"{slide['slide_id']} has no prompt job path.")
prompt_path = resolve_deck_path(deck_dir, prompt_ref)
try:
prompt_path.relative_to(deck_dir)
except ValueError as exc:
raise SystemExit(f"Prompt file must live inside deck dir: {prompt_path}") from exc
if not prompt_path.exists():
raise SystemExit(f"Prompt file does not exist: {prompt_path}")
slide["dispatch"] = {
"agent_id": args.agent_id,
"agent_nickname": args.agent_nickname,
"prompt": rel_to_deck(deck_dir, prompt_path),
"prompt_sha256": sha256_file(prompt_path),
"dispatched_at": now_iso(),
}
slide["status"] = "dispatched"
update_jobs_run_status(jobs)
run_status = jobs.get("run_status")
if run_status == "slides_dispatched":
set_run_status(deck_dir, "slides_dispatched", "all slide jobs dispatched")
print(f"{slide['slide_id']} -> dispatched")
return 0
if __name__ == "__main__":
raise SystemExit(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: 195k | 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: 195k | 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: 195k | 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: 195k | Updated | Claude CodeCodex | Verified | Install |