Skip to content

siril9/presentation-skill / plugins/presentation-skill/skills/presentation-skill

presentation-skill

Flagged

Build, edit, redesign, render, and verify content-led, structurally diverse, clean, editable, reproducible PowerPoint `.pptx` decks. Use for scientific, lab, clinical, consulting, board, investor, editorial, policy, and operational presentations where alignment, readability, contrast, and balanced density matter.

FileKindSize
DESIGN.mdmarkdown13.7 KB
DISCOVERY.mdmarkdown6.6 KB
LICENSEother1.0 KB
SKILL.mdskill md14.7 KB
agents/discovery.jsonconfig8.2 KB
agents/openai.yamlconfig309 B
examples/outline.jsonconfig3.4 KB
package-lock.jsonmanifest22.0 KB
package.jsonmanifest1.8 KB
references/agent_picker.mdmarkdown1.9 KB
references/alignment_and_coherence.mdmarkdown2.1 KB
references/assets/visual_references/editorial_chart.jpgbinary53.2 KB
references/assets/visual_references/editorial_decision.jpgbinary100.4 KB
references/assets/visual_references/editorial_focal_metric.jpgbinary45.4 KB
references/assets/visual_references/editorial_pilot.jpgbinary62.0 KB
references/assets/visual_references/lab-native-method.jpgbinary53.9 KB
references/assets/visual_references/lab-residual-panels.jpgbinary64.8 KB
references/assets/visual_references/lab_cover.jpgbinary39.8 KB
references/assets/visual_references/lab_endpoints.jpgbinary70.8 KB
references/assets/visual_references/lab_evidence_gate.jpgbinary67.3 KB
references/assets/visual_references/lab_trend.jpgbinary60.5 KB
references/assets/visual_references/operations_handoffs.jpgbinary87.2 KB
references/assets/visual_references/operations_owner_register.jpgbinary87.2 KB
references/assets/visual_references/operations_queue.jpgbinary81.8 KB
references/assets/visual_references/operations_tradeoff.jpgbinary99.9 KB
references/benchmark_protocol.mdmarkdown12.1 KB
references/codex_guardrails.mdmarkdown10.3 KB
references/composition_grammar_catalog.mdmarkdown4.0 KB
references/deck_creation.mdmarkdown1.4 KB
references/deck_workspace_mode.mdmarkdown34.4 KB
references/design_philosophy.mdmarkdown5.5 KB
references/dynamic_design_and_subagents.mdmarkdown12.3 KB
references/editing.mdmarkdown12.4 KB
references/external_best_practices.mdmarkdown1.7 KB
references/large_style_corpus_sources.jsonconfig22.7 KB
references/model_adaptive_workflow.mdmarkdown6.6 KB
references/outline_schema.mdmarkdown44.8 KB
references/planning_schema.mdmarkdown54.8 KB
references/pptxgenjs.mdmarkdown7.6 KB
references/preview_extension.mdmarkdown1.7 KB
references/reference_script_patterns.mdmarkdown13.5 KB
references/renderer_role_contracts_v2.jsonconfig38.2 KB
references/reproducible_workflow.mdmarkdown5.1 KB
references/speed_and_rendering.mdmarkdown4.6 KB
references/style_grammar_index.jsonconfig364.2 KB
references/style_inspiration_corpus.jsonconfig32.9 KB
references/style_reference_catalog.mdmarkdown23.9 KB
references/style_reference_sources.jsonconfig35.8 KB
references/style_token_atlas.jsonconfig174.7 KB
references/subagent_patterns.mdmarkdown10.2 KB
references/visual_qa_prompt.mdmarkdown4.9 KB
references/visual_reference_catalog.jsonconfig26.6 KB
references/visual_reference_catalog.mdmarkdown6.0 KB
schemas/deck_ir.schema.jsonconfig9.5 KB
schemas/renderer_capabilities_v2.jsonconfig701 B
scripts/accessibility_qa.pyscript24.8 KB
scripts/action_registry.pyscript12.5 KB
scripts/add_slide.pyscript8.6 KB
scripts/advance_delivery.pyscript88.2 KB
scripts/advance_workspace.pyscript150.3 KB
scripts/apply_artifact_manifest_bindings.pyscript54.1 KB
scripts/apply_atom_composition.pyscript8.2 KB
scripts/apply_data_analysis_handoff.pyscript67.0 KB
scripts/apply_deck_intake_answers.pyscript35.6 KB
scripts/apply_design_contract.pyscript71.7 KB
scripts/apply_outline_authoring_handoff.pyscript23.7 KB
scripts/apply_pptx_style_fragment.pyscript19.7 KB
scripts/asset_stage.pyscript24.6 KB
scripts/audition_styles.pyscript8.7 KB
scripts/benchmark_decks.pyexecutablescript45.4 KB
scripts/build_deck.pyexecutablescript173.6 KB
scripts/build_deck_pptxgenjs.jsexecutablescript72.7 KB
scripts/build_large_style_corpus_contact_sheets.pyscript18.1 KB
scripts/build_workspace.pyscript126.2 KB
scripts/clean_unpacked.pyscript12.9 KB
scripts/compact_source_footers.pyscript17.8 KB
scripts/composition_grammar_catalog.pyscript30.3 KB
scripts/deck_benchmark.pyscript71.1 KB
scripts/deck_intake.pyscript6.9 KB
scripts/deck_ir.pyscript47.5 KB
scripts/design_catalog_selector.pyscript17.4 KB
scripts/design_rules_qa.pyscript24.8 KB
scripts/design_tokens.pyscript20.3 KB
scripts/edit_deck.pyscript8.4 KB
scripts/emit_content_research.pyscript4.6 KB
scripts/emit_data_analysis_prompt.pyscript30.1 KB
scripts/emit_deck_intake_prompt.pyexecutablescript19.9 KB
scripts/emit_deck_start_packet.pyscript97.1 KB
scripts/emit_design_contract_prompt.pyscript66.2 KB
scripts/emit_outline_authoring_prompt.pyscript35.4 KB
scripts/emit_outline_critique.pyscript11.6 KB
scripts/emit_style_content_router.pyscript49.6 KB
scripts/extract_outline.pyexecutablescript4.1 KB
scripts/extract_pptx_style.pyscript33.2 KB
scripts/fetch_wikimedia_cc.pyscript8.6 KB
scripts/finalize_quick_deck.pyscript17.6 KB
scripts/generate_openai_image.pyscript5.6 KB
scripts/init_deck_workspace.pyscript74.4 KB
scripts/inspect_artifact_manifest.pyscript29.8 KB
scripts/inventory.pyscript10.6 KB
scripts/iterate_deck.pyexecutablescript10.2 KB
scripts/layout_lint.pyscript40.4 KB
scripts/log_skill_telemetry.pyscript6.9 KB
scripts/model_adaptive_workflow.pyscript28.0 KB
scripts/office_package_hash.pyscript1.6 KB
scripts/pack_pptx.pyscript5.7 KB
scripts/palette_from_topic.pyscript4.1 KB
scripts/plan_research_assets.pyscript13.1 KB
scripts/preflight.pyscript136.9 KB
scripts/present.pyscript9.6 KB
scripts/python_runtime.pyscript787 B
scripts/qa_gate.pyexecutablescript27.4 KB
scripts/qa_visual_gate.pyexecutablescript8.5 KB
scripts/reference_deck.pyscript12.7 KB
scripts/render_cache.pyscript3.9 KB
scripts/render_mermaid.pyscript8.9 KB
scripts/render_slides.pyexecutablescript19.4 KB
scripts/repair_packet.pyscript14.7 KB
scripts/report_delivery_readiness.pyscript107.6 KB
scripts/report_workspace_readiness.pyscript244.6 KB
scripts/requirements-runtime.txtmarkdown472 B
scripts/role_layout_contracts.pyscript10.6 KB
scripts/runtime_doctor.pyscript6.3 KB
scripts/scaffold_figure_artifacts.pyscript92.3 KB
scripts/source_fidelity.pyscript30.5 KB
scripts/structural_diversity_v2.pyscript32.5 KB
scripts/style_atom_router.pyscript14.5 KB
scripts/style_inspiration_corpus.pyscript15.1 KB
scripts/style_reference_catalog.pyscript142.8 KB
scripts/style_reference_sources.pyscript12.7 KB
scripts/style_treatment_profiles.pyscript26.0 KB
scripts/summarize_skill_log.pyscript7.0 KB
scripts/taste_grammar_catalog.pyscript27.0 KB
scripts/test_structural_diversity_v2.pyscript4.9 KB
scripts/text_fit.pyscript23.6 KB
scripts/thumbnail.pyscript9.2 KB
scripts/trim_image_whitespace.pyexecutablescript5.4 KB
scripts/unpack_pptx.pyscript8.3 KB
scripts/upgrade_renderer_role_contracts_v2.pyscript7.3 KB
scripts/validate_planning.pyscript169.2 KB
scripts/verify_narration.pyscript10.6 KB
scripts/visual_qa.pyscript7.7 KB
scripts/visual_review.pyscript41.1 KB
scripts/visual_review_receipt.pyscript8.3 KB
scripts/workflow_atom_context.pyscript17.3 KB
templates/pptxgenjs/README.mdmarkdown8.4 KB
templates/pptxgenjs/presets.jsscript5.6 KB
templates/pptxgenjs/readable_role_layouts.jsscript17.5 KB
templates/pptxgenjs/render_plan.jsscript12.6 KB
templates/pptxgenjs/role_layout_contracts.jsscript4.7 KB
templates/pptxgenjs/slides.jsscript451.0 KB
templates/pptxgenjs/space_allocation.jsscript1.6 KB

scripts/compact_source_footers.py

View on GitHub
#!/usr/bin/env python3
"""Compact over-budget source-line footers into short IDs plus References table slides."""

from __future__ import annotations

import argparse
import json
import sys
from pathlib import Path
from typing import Any

GENERATED_BY = "scripts/compact_source_footers.py"
NOTE = "Full references moved here from source-line footers by compact_source_footers.py."


def _load_json(path: Path, default: Any) -> Any:
    if not path.exists():
        return default
    try:
        return json.loads(path.read_text(encoding="utf-8"))
    except (OSError, json.JSONDecodeError):
        return default


def _write_text_if_changed(path: Path, text: str) -> bool:
    try:
        if path.exists() and path.read_text(encoding="utf-8") == text:
            return False
    except OSError:
        pass
    path.parent.mkdir(parents=True, exist_ok=True)
    path.write_text(text, encoding="utf-8")
    return True


def _write_json_if_changed(path: Path, payload: Any) -> bool:
    return _write_text_if_changed(path, json.dumps(payload, indent=2) + "\n")


def _workspace_path(workspace: Path | None, raw: str) -> Path:
    path = Path(str(raw or "")).expanduser()
    if path.is_absolute():
        return path.resolve()
    if workspace is not None:
        return (workspace / path).resolve()
    return path.resolve()


def _display_path(base: Path, path: Path) -> str:
    try:
        return str(path.resolve().relative_to(base.resolve()))
    except ValueError:
        return str(path.resolve())


def _text_item(value: Any) -> str:
    if isinstance(value, str):
        return value.strip()
    if isinstance(value, (int, float, bool)):
        return str(value).strip()
    if isinstance(value, dict):
        for key in ("text", "citation", "source", "title", "label", "name"):
            text = str(value.get(key) or "").strip()
            if text:
                return text
    return ""


def _text_list(value: Any) -> list[str]:
    if isinstance(value, list):
        return [text for item in value if (text := _text_item(item))]
    text = _text_item(value)
    return [text] if text else []


def _slide_ref(slide: dict[str, Any], index: int) -> str:
    for key in ("slide_id", "id", "slug"):
        text = str(slide.get(key) or "").strip()
        if text:
            return text
    title = str(slide.get("title") or "").strip()
    return title or f"s{index + 1}"


def _source_line_enabled(slide: dict[str, Any], deck_style: dict[str, Any]) -> bool:
    slide_mode = str(slide.get("footer_mode") or "").strip().lower()
    deck_mode = str(deck_style.get("footer_mode") or "").strip().lower()
    return (slide_mode or deck_mode) == "source-line"


def _footer_budget(
    slide: dict[str, Any],
    deck_style: dict[str, Any],
    *,
    max_combined_chars: int,
    max_item_chars: int,
    max_items: int,
) -> dict[str, Any]:
    footer = str(slide.get("footer") or "").strip()
    source_label = str(slide.get("source_label") or deck_style.get("footer_source_label") or "Sources").strip()
    refs_label = str(slide.get("refs_label") or deck_style.get("footer_refs_label") or "Refs").strip()
    sources = _text_list(slide.get("sources"))
    refs = _text_list(slide.get("refs")) or _text_list(slide.get("references"))
    parts: list[str] = []
    if footer:
        parts.append(footer)
    if sources:
        parts.append(f"{source_label}: " + "; ".join(sources))
    if refs:
        parts.append(f"{refs_label}: " + "; ".join(refs))
    combined = " · ".join(parts)
    provenance = [*sources, *refs]
    reasons: list[str] = []
    if len(combined) > max_combined_chars:
        reasons.append(f"combined_chars>{max_combined_chars}")
    longest = max((len(item) for item in provenance), default=0)
    if longest > max_item_chars:
        reasons.append(f"item_chars>{max_item_chars}")
    if len(provenance) > max_items:
        reasons.append(f"item_count>{max_items}")
    return {
        "needs_compaction": bool(reasons),
        "combined_chars": len(combined),
        "longest_item_chars": longest,
        "item_count": len(provenance),
        "reasons": reasons,
        "sources": sources,
        "refs": refs,
    }


def _next_id(prefix: str, counters: dict[str, int]) -> str:
    counters[prefix] = counters.get(prefix, 0) + 1
    return f"{prefix}{counters[prefix]}"


def _compact_id_list(ids: list[str]) -> list[str]:
    if len(ids) <= 1:
        return ids
    return [f"{ids[0]}-{ids[-1]}"]


def _generated_reference_slide(slide: Any) -> bool:
    if not isinstance(slide, dict):
        return False
    metadata = slide.get("source_footer_compaction")
    return isinstance(metadata, dict) and metadata.get("generated_by") == GENERATED_BY


def _generated_reference_summary(slides: list[Any], indexes: list[int]) -> dict[str, Any]:
    ids: list[str] = []
    entry_count = 0
    total_entry_count = 0
    for idx in indexes:
        slide = slides[idx] if 0 <= idx < len(slides) else None
        if not isinstance(slide, dict):
            continue
        ids.append(_slide_ref(slide, idx))
        rows = slide.get("rows")
        if isinstance(rows, list):
            entry_count += len(rows)
        metadata = slide.get("source_footer_compaction")
        if isinstance(metadata, dict):
            try:
                total_entry_count = max(total_entry_count, int(metadata.get("total_entry_count") or 0))
            except (TypeError, ValueError):
                pass
    return {
        "existing_references_slide": ids[0] if ids else "",
        "existing_references_slides": ids,
        "existing_reference_slide_count": len(ids),
        "existing_reference_entry_count": entry_count,
        "existing_reference_total_entry_count": total_entry_count or entry_count,
    }


def _unique_slide_id(slides: list[Any], preferred: str) -> str:
    used = {
        str(slide.get(key) or "").strip()
        for slide in slides
        if isinstance(slide, dict)
        for key in ("slide_id", "id", "slug")
        if str(slide.get(key) or "").strip()
    }
    if preferred not in used:
        return preferred
    index = 2
    while f"{preferred}-{index}" in used:
        index += 1
    return f"{preferred}-{index}"


def _unique_slide_ids(slides: list[Any], preferred: str, count: int) -> list[str]:
    used = {
        str(slide.get(key) or "").strip()
        for slide in slides
        if isinstance(slide, dict)
        for key in ("slide_id", "id", "slug")
        if str(slide.get(key) or "").strip()
    }
    ids: list[str] = []
    base = preferred or "references"
    for idx in range(max(1, count)):
        candidate_base = base if idx == 0 else f"{base}-{idx + 1}"
        candidate = candidate_base
        suffix = 2
        while candidate in used:
            candidate = f"{candidate_base}-{suffix}"
            suffix += 1
        used.add(candidate)
        ids.append(candidate)
    return ids


def _chunks(values: list[dict[str, Any]], size: int) -> list[list[dict[str, Any]]]:
    chunk_size = max(1, int(size or 1))
    return [values[idx : idx + chunk_size] for idx in range(0, len(values), chunk_size)]


def _reference_table_slide(
    entries: list[dict[str, Any]],
    *,
    slide_id: str,
    references_title: str,
    reference_slide_index: int,
    reference_slide_count: int,
    compacted_slide_count: int,
    total_entry_count: int,
) -> dict[str, Any]:
    title = references_title
    if reference_slide_count > 1:
        title = f"{references_title} ({reference_slide_index}/{reference_slide_count})"
    return {
        "type": "content",
        "variant": "table",
        "slide_id": slide_id,
        "title": title,
        "subtitle": "Full citations for compact source-line footer IDs.",
        "headers": ["ID", "Slide", "Type", "Citation"],
        "rows": [
            [
                item["id"],
                item["slide"],
                "Source" if item["kind"] == "source" else "Ref",
                item["text"],
            ]
            for item in entries
        ],
        "column_weights": [0.10, 0.14, 0.10, 0.66],
        "table_style": "references",
        "caption": "Use compact IDs in slide footers; keep full citation text editable here.",
        "footer_mode": "source-line",
        "footer": "Full references for compact slide footers",
        "sources": ["outline.json"],
        "notes": NOTE,
        "source_footer_compaction": {
            "generated_by": GENERATED_BY,
            "entry_count": len(entries),
            "total_entry_count": total_entry_count,
            "slide_count": compacted_slide_count,
            "reference_slide_index": reference_slide_index,
            "reference_slide_count": reference_slide_count,
            "table_style": "references",
        },
    }


def compact_outline(
    outline: dict[str, Any],
    *,
    max_combined_chars: int,
    max_item_chars: int,
    max_items: int,
    max_reference_rows: int,
    references_slide_id: str,
    references_title: str,
) -> tuple[dict[str, Any], dict[str, Any]]:
    slides = outline.get("slides")
    if not isinstance(slides, list):
        return outline, {
            "changed": False,
            "error": "outline.slides is missing or not a list",
            "compacted_slides": [],
            "reference_entries": [],
        }

    deck_style = outline.get("deck_style") if isinstance(outline.get("deck_style"), dict) else {}
    new_slides = [dict(slide) if isinstance(slide, dict) else slide for slide in slides]
    generated_indexes = [idx for idx, slide in enumerate(new_slides) if _generated_reference_slide(slide)]
    existing_reference_summary = _generated_reference_summary(new_slides, generated_indexes)
    reference_entries: list[dict[str, Any]] = []
    compacted_slides: list[dict[str, Any]] = []
    id_by_kind_text: dict[tuple[str, str], str] = {}
    counters: dict[str, int] = {"S": 0, "R": 0}

    def ref_id(kind: str, text: str) -> str:
        key = (kind, text)
        if key not in id_by_kind_text:
            prefix = "S" if kind == "source" else "R"
            id_by_kind_text[key] = _next_id(prefix, counters)
        return id_by_kind_text[key]

    for idx, slide in enumerate(new_slides):
        if not isinstance(slide, dict) or _generated_reference_slide(slide):
            continue
        if not _source_line_enabled(slide, deck_style):
            continue
        budget = _footer_budget(
            slide,
            deck_style,
            max_combined_chars=max_combined_chars,
            max_item_chars=max_item_chars,
            max_items=max_items,
        )
        if not budget.get("needs_compaction"):
            continue
        slide_ref = _slide_ref(slide, idx)
        source_ids: list[str] = []
        ref_ids: list[str] = []
        for text in budget.get("sources", []):
            source_id = ref_id("source", text)
            source_ids.append(source_id)
            if not any(item.get("id") == source_id for item in reference_entries):
                reference_entries.append({"id": source_id, "slide": slide_ref, "kind": "source", "text": text})
        for text in budget.get("refs", []):
            reference_id = ref_id("ref", text)
            ref_ids.append(reference_id)
            if not any(item.get("id") == reference_id for item in reference_entries):
                reference_entries.append({"id": reference_id, "slide": slide_ref, "kind": "ref", "text": text})
        footer_source_ids = source_ids
        footer_ref_ids = ref_ids
        if len(source_ids) + len(ref_ids) > max_items:
            footer_source_ids = _compact_id_list(source_ids)
            footer_ref_ids = _compact_id_list(ref_ids)
        if footer_source_ids:
            slide["sources"] = footer_source_ids
        else:
            slide.pop("sources", None)
        if footer_ref_ids:
            slide["refs"] = footer_ref_ids
        else:
            slide.pop("refs", None)
        slide.pop("references", None)
        compacted_slides.append(
            {
                "slide_index": idx,
                "slide_id": slide_ref,
                "source_ids": source_ids,
                "ref_ids": ref_ids,
                "footer_sources": footer_source_ids,
                "footer_refs": footer_ref_ids,
                "reasons": budget.get("reasons", []),
                "combined_chars_before": budget.get("combined_chars", 0),
                "item_count_before": budget.get("item_count", 0),
            }
        )

    if not reference_entries:
        return outline, {
            "changed": False,
            "compacted_slides": compacted_slides,
            "reference_entries": reference_entries,
            "references_slide": existing_reference_summary["existing_references_slide"],
            "references_slides": existing_reference_summary["existing_references_slides"],
            **existing_reference_summary,
        }

    insert_idx = generated_indexes[0] if generated_indexes else len(new_slides)
    preferred_reference_id = references_slide_id
    if generated_indexes and isinstance(new_slides[generated_indexes[0]], dict):
        preferred_reference_id = str(new_slides[generated_indexes[0]].get("slide_id") or references_slide_id)
    generated_index_set = set(generated_indexes)
    body_slides = [slide for idx, slide in enumerate(new_slides) if idx not in generated_index_set]
    insert_idx = min(insert_idx, len(body_slides))
    entry_chunks = _chunks(reference_entries, max_reference_rows)
    reference_ids = _unique_slide_ids(body_slides, preferred_reference_id, len(entry_chunks))
    reference_slides = [
        _reference_table_slide(
            entries,
            slide_id=reference_ids[idx],
            references_title=references_title,
            reference_slide_index=idx + 1,
            reference_slide_count=len(entry_chunks),
            compacted_slide_count=len(compacted_slides),
            total_entry_count=len(reference_entries),
        )
        for idx, entries in enumerate(entry_chunks)
    ]
    new_slides = [*body_slides[:insert_idx], *reference_slides, *body_slides[insert_idx:]]

    new_outline = dict(outline)
    new_outline["slides"] = new_slides
    return new_outline, {
        "changed": new_outline != outline,
        "compacted_slides": compacted_slides,
        "reference_entries": reference_entries,
        "references_slide": reference_ids[0] if reference_ids else "",
        "references_slides": reference_ids,
        **existing_reference_summary,
    }


def _args() -> argparse.Namespace:
    parser = argparse.ArgumentParser(
        description="Move verbose source-line footer provenance to a final References table slide."
    )
    parser.add_argument("--workspace", help="Deck workspace containing workspace.json and outline.json.")
    parser.add_argument("--outline", help="Outline JSON path. Overrides workspace manifest when provided.")
    parser.add_argument("--report", help="Output report path. Defaults under the workspace/build or outline directory.")
    parser.add_argument("--max-combined-chars", type=int, default=170)
    parser.add_argument("--max-item-chars", type=int, default=95)
    parser.add_argument("--max-items", type=int, default=4)
    parser.add_argument("--max-reference-rows", type=int, default=8)
    parser.add_argument("--references-slide-id", default="references")
    parser.add_argument("--references-title", default="References")
    parser.add_argument("--dry-run", action="store_true", help="Report changes without writing outline.json.")
    return parser.parse_args()


def main() -> int:
    args = _args()
    workspace = Path(args.workspace).expanduser().resolve() if args.workspace else None
    if workspace is not None and not workspace.exists():
        print(f"Error: workspace not found: {workspace}", file=sys.stderr)
        return 2
    if args.outline:
        outline_path = _workspace_path(workspace, args.outline)
    elif workspace is not None:
        manifest = _load_json(workspace / "workspace.json", {})
        if not isinstance(manifest, dict):
            manifest = {}
        outline_path = workspace / str(manifest.get("outline", "outline.json"))
    else:
        print("Error: provide --workspace or --outline", file=sys.stderr)
        return 2
    if not outline_path.exists():
        print(f"Error: outline not found: {outline_path}", file=sys.stderr)
        return 2

    base = workspace or outline_path.parent
    report_path = (
        _workspace_path(workspace, args.report)
        if args.report
        else ((workspace / "build" / "source_footer_compaction.json") if workspace else outline_path.with_name("source_footer_compaction.json"))
    )
    outline = _load_json(outline_path, {})
    if not isinstance(outline, dict):
        print(f"Error: outline root is not a JSON object: {outline_path}", file=sys.stderr)
        return 2

    new_outline, summary = compact_outline(
        outline,
        max_combined_chars=max(1, int(args.max_combined_chars or 170)),
        max_item_chars=max(1, int(args.max_item_chars or 95)),
        max_items=max(1, int(args.max_items or 4)),
        max_reference_rows=max(1, int(args.max_reference_rows or 8)),
        references_slide_id=str(args.references_slide_id or "references"),
        references_title=str(args.references_title or "References"),
    )
    outline_changed = bool(summary.get("changed")) and not args.dry_run
    if outline_changed:
        _write_json_if_changed(outline_path, new_outline)

    report = {
        "workflow": "source_footer_compaction_v1",
        "outline": _display_path(base, outline_path),
        "changed": outline_changed,
        "dry_run": bool(args.dry_run),
        "thresholds": {
            "max_combined_chars": max(1, int(args.max_combined_chars or 170)),
            "max_item_chars": max(1, int(args.max_item_chars or 95)),
            "max_items": max(1, int(args.max_items or 4)),
            "max_reference_rows": max(1, int(args.max_reference_rows or 8)),
        },
        **summary,
    }
    if not args.dry_run:
        _write_json_if_changed(report_path, report)
    print(json.dumps(report, indent=2))
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
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: 197kUpdated Claude CodeCodexVerifiedInstall
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: 197kUpdated Claude CodeCodexVerifiedInstall
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: 197kUpdated Claude CodeCodexVerifiedInstall
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: 197kUpdated Claude CodeCodexVerifiedInstall