Skip to content

PlutoLei/paperbanana-skill / plugins/paperbanana-slide-deck

paperbanana-slide-deck

Unverified

Create or revise a complete PaperBanana slide deck, including image slides and native editable PowerPoint text, tables, charts and diagrams. Use for PaperBanana deck requests; preserve the user's selected presentation tool and existing deck mode.

FileKindSize
.claude-plugin/plugin.jsonconfig396 B
.gitignoreother22 B
SKILL.mdskill md6.4 KB
bun.lockother4.5 KB
package.jsonmanifest424 B
references/editable-slide-spec.mdmarkdown9.0 KB
references/outline-format.mdmarkdown927 B
references/style-guide.mdmarkdown1.3 KB
references/styles/3d-model.mdmarkdown2.7 KB
references/styles/abstract.mdmarkdown2.5 KB
references/styles/academia.mdmarkdown2.5 KB
references/styles/adorable-3d-character.mdmarkdown2.5 KB
references/styles/afrofuturism.mdmarkdown2.8 KB
references/styles/alcohol-ink.mdmarkdown2.4 KB
references/styles/analog-film.mdmarkdown2.6 KB
references/styles/architectural.mdmarkdown2.4 KB
references/styles/art-deco.mdmarkdown2.5 KB
references/styles/art-nouveau.mdmarkdown2.5 KB
references/styles/artistic-vision.mdmarkdown2.7 KB
references/styles/avant-garde.mdmarkdown2.6 KB
references/styles/baroque.mdmarkdown2.4 KB
references/styles/bauhaus-style-poster.mdmarkdown2.5 KB
references/styles/bauhaus-style.mdmarkdown2.6 KB
references/styles/blueprint-schematic-drawing.mdmarkdown2.5 KB
references/styles/cel-shaded-art.mdmarkdown2.5 KB
references/styles/chromolithography.mdmarkdown2.4 KB
references/styles/cinematic-dynamic.mdmarkdown2.6 KB
references/styles/cinematic.mdmarkdown2.6 KB
references/styles/classicism-art.mdmarkdown2.5 KB
references/styles/collage.mdmarkdown2.4 KB
references/styles/color-field-painting.mdmarkdown2.6 KB
references/styles/color-sketchnote.mdmarkdown2.4 KB
references/styles/colored-pencil-art.mdmarkdown2.6 KB
references/styles/conceptual-art.mdmarkdown2.5 KB
references/styles/constructivism.mdmarkdown2.5 KB
references/styles/constructivist.mdmarkdown2.5 KB
references/styles/craft-clay.mdmarkdown2.7 KB
references/styles/cubism.mdmarkdown2.6 KB
references/styles/cubist.mdmarkdown2.5 KB
references/styles/cyanotype.mdmarkdown2.5 KB
references/styles/cyberpunk-cityscape.mdmarkdown2.4 KB
references/styles/de-stijl.mdmarkdown2.5 KB
references/styles/digital-art.mdmarkdown2.8 KB
references/styles/double-exposure.mdmarkdown2.6 KB
references/styles/dreamscape.mdmarkdown2.4 KB
references/styles/dynamic-illustration.mdmarkdown2.6 KB
references/styles/embroidery.mdmarkdown2.6 KB
references/styles/encaustic.mdmarkdown2.4 KB
references/styles/expressionism.mdmarkdown2.6 KB
references/styles/expressionist.mdmarkdown2.4 KB
references/styles/fairy-tale.mdmarkdown2.4 KB
references/styles/fashion-editorial.mdmarkdown2.3 KB
references/styles/film-noir.mdmarkdown2.4 KB
references/styles/flat-2d-art.mdmarkdown2.6 KB
references/styles/flat-papercut.mdmarkdown2.4 KB
references/styles/futurism.mdmarkdown2.6 KB
references/styles/futuristic.mdmarkdown2.4 KB
references/styles/glamour.mdmarkdown2.4 KB
references/styles/glitchcore.mdmarkdown2.6 KB
references/styles/gothic.mdmarkdown2.5 KB
references/styles/halftone.mdmarkdown2.4 KB
references/styles/hdr.mdmarkdown2.5 KB
references/styles/high-fashion.mdmarkdown2.6 KB
references/styles/hyperrealism.mdmarkdown2.5 KB
references/styles/idyllic.mdmarkdown2.6 KB
references/styles/illuminated-manuscript.mdmarkdown2.9 KB
references/styles/impressionism.mdmarkdown2.7 KB
references/styles/impressionist.mdmarkdown2.5 KB
references/styles/infographic-drawing.mdmarkdown2.6 KB
references/styles/isometric.mdmarkdown2.6 KB
references/styles/japanese-ink-drawing.mdmarkdown2.7 KB
references/styles/kawaii.mdmarkdown2.5 KB
references/styles/kirigami.mdmarkdown2.5 KB
references/styles/knolling-photography.mdmarkdown2.6 KB
references/styles/light-cheery-atmosphere.mdmarkdown2.5 KB
references/styles/line-art.mdmarkdown2.6 KB
references/styles/logo-design.mdmarkdown2.6 KB
references/styles/long-exposure.mdmarkdown2.4 KB
references/styles/lowpoly.mdmarkdown2.6 KB
references/styles/luxurious-elegance.mdmarkdown2.6 KB
references/styles/luxury.mdmarkdown2.3 KB
references/styles/lyrical-geometry.mdmarkdown2.7 KB
references/styles/macro-photography.mdmarkdown2.8 KB
references/styles/marker-drawing.mdmarkdown2.6 KB
references/styles/minimalism.mdmarkdown2.5 KB
references/styles/minimalist.mdmarkdown2.3 KB
references/styles/monochrome.mdmarkdown2.4 KB
references/styles/mosaic.mdmarkdown2.5 KB
references/styles/nautical.mdmarkdown2.4 KB
references/styles/neo-futurism.mdmarkdown2.3 KB
references/styles/neo-impressionism.mdmarkdown2.3 KB
references/styles/neon-noir.mdmarkdown2.5 KB
references/styles/neonpunk.mdmarkdown2.7 KB
references/styles/one-line-art.mdmarkdown2.5 KB
references/styles/op-art.mdmarkdown2.5 KB
references/styles/origami.mdmarkdown2.7 KB
references/styles/ornate-intricate.mdmarkdown2.4 KB
references/styles/paper-quilling.mdmarkdown2.5 KB
references/styles/pencil-sketch.mdmarkdown2.4 KB
references/styles/pop-art.mdmarkdown2.2 KB
references/styles/real-estate.mdmarkdown2.2 KB
references/styles/renaissance.mdmarkdown2.4 KB
references/styles/retail.mdmarkdown2.3 KB
references/styles/retro-futurism.mdmarkdown2.5 KB
references/styles/sci-fi.mdmarkdown2.4 KB
references/styles/shepard-fairey-style.mdmarkdown2.5 KB
references/styles/silhouette-art.mdmarkdown2.5 KB
references/styles/silhouette.mdmarkdown2.4 KB
references/styles/simple-vector-art.mdmarkdown2.4 KB
references/styles/space-art.mdmarkdown2.8 KB
references/styles/space.mdmarkdown2.4 KB
references/styles/stacked-papercut.mdmarkdown2.5 KB
references/styles/stained-glass.mdmarkdown2.5 KB
references/styles/steampunk.mdmarkdown2.4 KB
references/styles/sumi-e-detailed.mdmarkdown2.7 KB
references/styles/sumi-e-symbolic.mdmarkdown2.7 KB
references/styles/suminagashi.mdmarkdown2.5 KB
references/styles/surrealism.mdmarkdown2.4 KB
references/styles/surrealist.mdmarkdown2.4 KB
references/styles/tilt-shift.mdmarkdown2.5 KB
references/styles/tranquil.mdmarkdown2.4 KB
references/styles/typography.mdmarkdown2.5 KB
references/styles/ukiyo-e.mdmarkdown2.5 KB
references/styles/van-gogh.mdmarkdown2.5 KB
references/styles/vaporwave.mdmarkdown2.5 KB
references/styles/vibrant-rim-light.mdmarkdown2.4 KB
references/styles/vintage-airline-poster.mdmarkdown2.5 KB
references/styles/vintage-travel-poster.mdmarkdown2.6 KB
references/styles/volumetric-lighting.mdmarkdown2.4 KB
references/styles/whimsical.mdmarkdown2.2 KB
references/styles/zentangle.mdmarkdown2.4 KB
scripts/build-deck.tsscript2.5 KB
scripts/editable/render-editable-pptx.tsscript4.6 KB
scripts/editable/render-previews.pyscript6.6 KB
scripts/editable/render_inputs.pyscript2.2 KB
scripts/editable/review-editable.pyscript16.3 KB
scripts/editable/slide-spec.schema.jsonconfig2.6 KB
scripts/editable/validate-slide-spec.tsscript5.5 KB
scripts/merge-to-pptx.tsscript4.0 KB
tests/editable-mode.test.tsscript2.5 KB
tests/fixtures/editable/slide-spec.jsonconfig1.4 KB
tests/image-mode.test.tsscript1.4 KB
tests/mode-router.test.tsscript528 B
tests/test_critic_core_integration.pyscript4.4 KB
tests/test_render_previews.pyscript8.6 KB
tests/test_review_editable.pyscript15.7 KB

tests/test_critic_core_integration.py

View on GitHub
"""Opt-in offline integration against a separately installed/pinned core tree.

PAPERBANANA_CORE_PATH must point to the intended core checkout. Run with that
checkout's dependencies installed. Only the VLM's network boundary is replaced;
the real Settings, CriticAgent, image loader, templates and response parser run.
"""

import contextlib
import json
import os
from pathlib import Path
import socket
import sys
import unittest
from unittest.mock import patch

import test_review_editable as contract


CORE_PATH = os.environ.get("PAPERBANANA_CORE_PATH")


@unittest.skipUnless(CORE_PATH, "Set PAPERBANANA_CORE_PATH for pinned-core offline integration")
class CoreIntegrationTest(contract.ReviewContractTest):
    def setUp(self):
        super().setUp()
        self.raw_response = None
        sys.path.insert(0, str(Path(CORE_PATH).resolve()))
        self.addCleanup(lambda: sys.path.remove(str(Path(CORE_PATH).resolve())))
        import paperbanana
        self.assertTrue(Path(paperbanana.__file__).resolve().is_relative_to(Path(CORE_PATH).resolve()))
        from PIL import Image
        Image.new("RGB", (16, 9), "white").save(self.png)
        manifest = json.loads(self.manifest.read_text())
        manifest["slides"][0]["sha256"] = contract.digest(self.png)
        self.manifest.write_text(json.dumps(manifest))

    @contextlib.contextmanager
    def backend(self):
        test = self
        # This is a deliberately credential-free environment and directory.
        old_cwd = Path.cwd()
        os.chdir(self.root)
        try:
            with patch.dict(os.environ, {"VLM_PROVIDER": "gemini", "VLM_MODEL": "configured-model",
                                         "OPENAI_VLM_MODEL": "saved-openai-model"}, clear=True):
                from paperbanana.providers.base import VLMProvider
                from paperbanana.providers.registry import ProviderRegistry

                class OfflineVLM(VLMProvider):
                    def __init__(self, settings):
                        self.settings = settings

                    @property
                    def name(self):
                        return self.settings.vlm_provider

                    @property
                    def model_name(self):
                        return self.settings.effective_vlm_model

                    async def generate(self, prompt, images=None, system_prompt=None,
                                       temperature=1.0, max_tokens=16384, response_format=None):
                        test.calls += 1
                        test.assertIn("Sample result", prompt)
                        test.assertEqual(len(images), 1)
                        if test.failure:
                            raise test.failure
                        if test.during_call:
                            test.during_call()
                        if test.raw_response is not None:
                            return test.raw_response
                        if isinstance(test.suggestions, str):
                            return test.suggestions
                        return json.dumps({"critic_suggestions": test.suggestions,
                                           "score": test.score, "revised_description": None})

                with patch.object(ProviderRegistry, "create_vlm", side_effect=OfflineVLM), \
                        patch.object(socket.socket, "connect", side_effect=AssertionError("network forbidden")):
                    yield
        finally:
            os.chdir(old_cwd)

    def test_raw_invalid_scores_and_missing_suggestions_cannot_be_normalized_into_success(self):
        responses = [
            {"critic_suggestions": [], "score": "NaN"},
            {"critic_suggestions": [], "score": 999},
            {"critic_suggestions": [], "score": True},
            {"score": 9},
            {"critic_suggestions": [], "score": "9"},
            {"critic_suggestions": [], "score": float("nan")},
            {"critic_suggestions": [], "score": float("inf")},
            {"critic_suggestions": [], "score": -1},
        ]
        for response in responses:
            with self.subTest(response=response):
                self.raw_response = json.dumps(response)
                code, payload = self.run_review()
                self.assertEqual(code, 1)
                self.assertEqual(payload["status"], "unreviewed")
                self.assertIsNone(payload["score"])


if __name__ == "__main__":
    unittest.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: 198kUpdated 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: 198kUpdated 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: 198kUpdated 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: 198kUpdated Claude CodeCodexVerifiedInstall