@amrhas82/agentic-kit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin-lite.json +38 -0
- package/.claude-plugin/plugin-pro.json +183 -0
- package/.claude-plugin/plugin-standard.json +147 -0
- package/.claude-plugin/plugin.json +47 -0
- package/LICENSE +21 -0
- package/QUICK-START.md +318 -0
- package/README.md +449 -0
- package/TROUBLESHOOTING.md +788 -0
- package/VARIANTS.md +480 -0
- package/agents/1-create-prd.md +56 -0
- package/agents/2-generate-tasks.md +73 -0
- package/agents/3-process-task-list.md +101 -0
- package/agents/business-analyst.md +76 -0
- package/agents/full-stack-dev.md +80 -0
- package/agents/holistic-architect.md +91 -0
- package/agents/master.md +55 -0
- package/agents/orchestrator.md +103 -0
- package/agents/product-manager.md +82 -0
- package/agents/product-owner.md +97 -0
- package/agents/qa-test-architect.md +72 -0
- package/agents/scrum-master.md +64 -0
- package/agents/ux-expert.md +74 -0
- package/cli.js +230 -0
- package/hooks/register-agents.js +123 -0
- package/package.json +61 -0
- package/resources/agent-teams.yaml +50 -0
- package/resources/checklists.md +1724 -0
- package/resources/data.md +1372 -0
- package/resources/task-briefs.md +4428 -0
- package/resources/templates.yaml +5634 -0
- package/resources/workflows.yaml +1253 -0
- package/skills/algorithmic-art/LICENSE.txt +202 -0
- package/skills/algorithmic-art/SKILL.md +405 -0
- package/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/skills/algorithmic-art/templates/viewer.html +599 -0
- package/skills/artifacts-builder/LICENSE.txt +202 -0
- package/skills/artifacts-builder/SKILL.md +74 -0
- package/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
- package/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/skills/brainstorming/SKILL.md +54 -0
- package/skills/brand-guidelines/LICENSE.txt +202 -0
- package/skills/brand-guidelines/SKILL.md +73 -0
- package/skills/canvas-design/LICENSE.txt +202 -0
- package/skills/canvas-design/SKILL.md +130 -0
- package/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills/code-review/SKILL.md +105 -0
- package/skills/code-review/code-reviewer.md +146 -0
- package/skills/condition-based-waiting/SKILL.md +120 -0
- package/skills/condition-based-waiting/example.ts +158 -0
- package/skills/docx/LICENSE.txt +30 -0
- package/skills/docx/SKILL.md +197 -0
- package/skills/docx/docx-js.md +350 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/docx/ooxml/scripts/pack.py +159 -0
- package/skills/docx/ooxml/scripts/unpack.py +29 -0
- package/skills/docx/ooxml/scripts/validate.py +69 -0
- package/skills/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/docx/ooxml/scripts/validation/base.py +951 -0
- package/skills/docx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/docx/ooxml.md +610 -0
- package/skills/docx/scripts/__init__.py +1 -0
- package/skills/docx/scripts/document.py +1276 -0
- package/skills/docx/scripts/templates/comments.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/skills/docx/scripts/templates/people.xml +3 -0
- package/skills/docx/scripts/utilities.py +374 -0
- package/skills/internal-comms/LICENSE.txt +202 -0
- package/skills/internal-comms/SKILL.md +32 -0
- package/skills/internal-comms/examples/3p-updates.md +47 -0
- package/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/skills/internal-comms/examples/faq-answers.md +30 -0
- package/skills/internal-comms/examples/general-comms.md +16 -0
- package/skills/mcp-builder/LICENSE.txt +202 -0
- package/skills/mcp-builder/SKILL.md +328 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +915 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +916 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +752 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/pdf/LICENSE.txt +30 -0
- package/skills/pdf/SKILL.md +294 -0
- package/skills/pdf/forms.md +205 -0
- package/skills/pdf/reference.md +612 -0
- package/skills/pdf/scripts/check_bounding_boxes.py +70 -0
- package/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/skills/pdf/scripts/check_fillable_fields.py +12 -0
- package/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/skills/pdf/scripts/create_validation_image.py +41 -0
- package/skills/pdf/scripts/extract_form_field_info.py +152 -0
- package/skills/pdf/scripts/fill_fillable_fields.py +114 -0
- package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/skills/pptx/LICENSE.txt +30 -0
- package/skills/pptx/SKILL.md +484 -0
- package/skills/pptx/html2pptx.md +625 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/pptx/ooxml/scripts/pack.py +159 -0
- package/skills/pptx/ooxml/scripts/unpack.py +29 -0
- package/skills/pptx/ooxml/scripts/validate.py +69 -0
- package/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/pptx/ooxml/scripts/validation/base.py +951 -0
- package/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/pptx/ooxml.md +427 -0
- package/skills/pptx/scripts/html2pptx.js +979 -0
- package/skills/pptx/scripts/inventory.py +1020 -0
- package/skills/pptx/scripts/rearrange.py +231 -0
- package/skills/pptx/scripts/replace.py +385 -0
- package/skills/pptx/scripts/thumbnail.py +450 -0
- package/skills/root-cause-tracing/SKILL.md +174 -0
- package/skills/root-cause-tracing/find-polluter.sh +63 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +209 -0
- package/skills/skill-creator/scripts/init_skill.py +303 -0
- package/skills/skill-creator/scripts/package_skill.py +110 -0
- package/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/skills/slack-gif-creator/SKILL.md +646 -0
- package/skills/slack-gif-creator/core/color_palettes.py +302 -0
- package/skills/slack-gif-creator/core/easing.py +230 -0
- package/skills/slack-gif-creator/core/frame_composer.py +469 -0
- package/skills/slack-gif-creator/core/gif_builder.py +246 -0
- package/skills/slack-gif-creator/core/typography.py +357 -0
- package/skills/slack-gif-creator/core/validators.py +264 -0
- package/skills/slack-gif-creator/core/visual_effects.py +494 -0
- package/skills/slack-gif-creator/requirements.txt +4 -0
- package/skills/slack-gif-creator/templates/bounce.py +106 -0
- package/skills/slack-gif-creator/templates/explode.py +331 -0
- package/skills/slack-gif-creator/templates/fade.py +329 -0
- package/skills/slack-gif-creator/templates/flip.py +291 -0
- package/skills/slack-gif-creator/templates/kaleidoscope.py +211 -0
- package/skills/slack-gif-creator/templates/morph.py +329 -0
- package/skills/slack-gif-creator/templates/move.py +293 -0
- package/skills/slack-gif-creator/templates/pulse.py +268 -0
- package/skills/slack-gif-creator/templates/shake.py +127 -0
- package/skills/slack-gif-creator/templates/slide.py +291 -0
- package/skills/slack-gif-creator/templates/spin.py +269 -0
- package/skills/slack-gif-creator/templates/wiggle.py +300 -0
- package/skills/slack-gif-creator/templates/zoom.py +312 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +295 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/SKILL.md +364 -0
- package/skills/testing-anti-patterns/SKILL.md +302 -0
- package/skills/theme-factory/LICENSE.txt +202 -0
- package/skills/theme-factory/SKILL.md +59 -0
- package/skills/theme-factory/theme-showcase.pdf +0 -0
- package/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/skills/theme-factory/themes/desert-rose.md +19 -0
- package/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/skills/theme-factory/themes/golden-hour.md +19 -0
- package/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/webapp-testing/LICENSE.txt +202 -0
- package/skills/webapp-testing/SKILL.md +96 -0
- package/skills/webapp-testing/examples/console_logging.py +35 -0
- package/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/skills/webapp-testing/scripts/with_server.py +106 -0
- package/skills/xlsx/LICENSE.txt +30 -0
- package/skills/xlsx/SKILL.md +289 -0
- package/skills/xlsx/recalc.py +178 -0
- package/validate-references.sh +86 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Typography System - Professional text rendering with outlines, shadows, and effects.
|
|
4
|
+
|
|
5
|
+
This module provides high-quality text rendering that looks crisp and professional
|
|
6
|
+
in GIFs, with outlines for readability and effects for visual impact.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from PIL import Image, ImageDraw, ImageFont
|
|
10
|
+
from typing import Optional
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Typography scale - proportional sizing system
|
|
14
|
+
TYPOGRAPHY_SCALE = {
|
|
15
|
+
'h1': 60, # Large headers
|
|
16
|
+
'h2': 48, # Medium headers
|
|
17
|
+
'h3': 36, # Small headers
|
|
18
|
+
'title': 50, # Title text
|
|
19
|
+
'body': 28, # Body text
|
|
20
|
+
'small': 20, # Small text
|
|
21
|
+
'tiny': 16, # Tiny text
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def get_font(size: int, bold: bool = False) -> ImageFont.FreeTypeFont:
|
|
26
|
+
"""
|
|
27
|
+
Get a font with fallback support.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
size: Font size in pixels
|
|
31
|
+
bold: Use bold variant if available
|
|
32
|
+
|
|
33
|
+
Returns:
|
|
34
|
+
ImageFont object
|
|
35
|
+
"""
|
|
36
|
+
# Try multiple font paths for cross-platform support
|
|
37
|
+
font_paths = [
|
|
38
|
+
# macOS fonts
|
|
39
|
+
"/System/Library/Fonts/Helvetica.ttc",
|
|
40
|
+
"/System/Library/Fonts/SF-Pro.ttf",
|
|
41
|
+
"/Library/Fonts/Arial Bold.ttf" if bold else "/Library/Fonts/Arial.ttf",
|
|
42
|
+
# Linux fonts
|
|
43
|
+
"/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf" if bold else "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",
|
|
44
|
+
# Windows fonts
|
|
45
|
+
"C:\\Windows\\Fonts\\arialbd.ttf" if bold else "C:\\Windows\\Fonts\\arial.ttf",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
for font_path in font_paths:
|
|
49
|
+
try:
|
|
50
|
+
return ImageFont.truetype(font_path, size)
|
|
51
|
+
except:
|
|
52
|
+
continue
|
|
53
|
+
|
|
54
|
+
# Ultimate fallback
|
|
55
|
+
return ImageFont.load_default()
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def draw_text_with_outline(
|
|
59
|
+
frame: Image.Image,
|
|
60
|
+
text: str,
|
|
61
|
+
position: tuple[int, int],
|
|
62
|
+
font_size: int = 40,
|
|
63
|
+
text_color: tuple[int, int, int] = (255, 255, 255),
|
|
64
|
+
outline_color: tuple[int, int, int] = (0, 0, 0),
|
|
65
|
+
outline_width: int = 3,
|
|
66
|
+
centered: bool = False,
|
|
67
|
+
bold: bool = True
|
|
68
|
+
) -> Image.Image:
|
|
69
|
+
"""
|
|
70
|
+
Draw text with outline for maximum readability.
|
|
71
|
+
|
|
72
|
+
This is THE most important function for professional-looking text in GIFs.
|
|
73
|
+
The outline ensures text is readable on any background.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
frame: PIL Image to draw on
|
|
77
|
+
text: Text to draw
|
|
78
|
+
position: (x, y) position
|
|
79
|
+
font_size: Font size in pixels
|
|
80
|
+
text_color: RGB color for text fill
|
|
81
|
+
outline_color: RGB color for outline
|
|
82
|
+
outline_width: Width of outline in pixels (2-4 recommended)
|
|
83
|
+
centered: If True, center text at position
|
|
84
|
+
bold: Use bold font variant
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
Modified frame
|
|
88
|
+
"""
|
|
89
|
+
draw = ImageDraw.Draw(frame)
|
|
90
|
+
font = get_font(font_size, bold=bold)
|
|
91
|
+
|
|
92
|
+
# Calculate position for centering
|
|
93
|
+
if centered:
|
|
94
|
+
bbox = draw.textbbox((0, 0), text, font=font)
|
|
95
|
+
text_width = bbox[2] - bbox[0]
|
|
96
|
+
text_height = bbox[3] - bbox[1]
|
|
97
|
+
x = position[0] - text_width // 2
|
|
98
|
+
y = position[1] - text_height // 2
|
|
99
|
+
position = (x, y)
|
|
100
|
+
|
|
101
|
+
# Draw outline by drawing text multiple times offset in all directions
|
|
102
|
+
x, y = position
|
|
103
|
+
for offset_x in range(-outline_width, outline_width + 1):
|
|
104
|
+
for offset_y in range(-outline_width, outline_width + 1):
|
|
105
|
+
if offset_x != 0 or offset_y != 0:
|
|
106
|
+
draw.text((x + offset_x, y + offset_y), text, fill=outline_color, font=font)
|
|
107
|
+
|
|
108
|
+
# Draw main text on top
|
|
109
|
+
draw.text(position, text, fill=text_color, font=font)
|
|
110
|
+
|
|
111
|
+
return frame
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def draw_text_with_shadow(
|
|
115
|
+
frame: Image.Image,
|
|
116
|
+
text: str,
|
|
117
|
+
position: tuple[int, int],
|
|
118
|
+
font_size: int = 40,
|
|
119
|
+
text_color: tuple[int, int, int] = (255, 255, 255),
|
|
120
|
+
shadow_color: tuple[int, int, int] = (0, 0, 0),
|
|
121
|
+
shadow_offset: tuple[int, int] = (3, 3),
|
|
122
|
+
centered: bool = False,
|
|
123
|
+
bold: bool = True
|
|
124
|
+
) -> Image.Image:
|
|
125
|
+
"""
|
|
126
|
+
Draw text with drop shadow for depth.
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
frame: PIL Image to draw on
|
|
130
|
+
text: Text to draw
|
|
131
|
+
position: (x, y) position
|
|
132
|
+
font_size: Font size in pixels
|
|
133
|
+
text_color: RGB color for text
|
|
134
|
+
shadow_color: RGB color for shadow
|
|
135
|
+
shadow_offset: (x, y) offset for shadow
|
|
136
|
+
centered: If True, center text at position
|
|
137
|
+
bold: Use bold font variant
|
|
138
|
+
|
|
139
|
+
Returns:
|
|
140
|
+
Modified frame
|
|
141
|
+
"""
|
|
142
|
+
draw = ImageDraw.Draw(frame)
|
|
143
|
+
font = get_font(font_size, bold=bold)
|
|
144
|
+
|
|
145
|
+
# Calculate position for centering
|
|
146
|
+
if centered:
|
|
147
|
+
bbox = draw.textbbox((0, 0), text, font=font)
|
|
148
|
+
text_width = bbox[2] - bbox[0]
|
|
149
|
+
text_height = bbox[3] - bbox[1]
|
|
150
|
+
x = position[0] - text_width // 2
|
|
151
|
+
y = position[1] - text_height // 2
|
|
152
|
+
position = (x, y)
|
|
153
|
+
|
|
154
|
+
# Draw shadow
|
|
155
|
+
shadow_pos = (position[0] + shadow_offset[0], position[1] + shadow_offset[1])
|
|
156
|
+
draw.text(shadow_pos, text, fill=shadow_color, font=font)
|
|
157
|
+
|
|
158
|
+
# Draw main text
|
|
159
|
+
draw.text(position, text, fill=text_color, font=font)
|
|
160
|
+
|
|
161
|
+
return frame
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def draw_text_with_glow(
|
|
165
|
+
frame: Image.Image,
|
|
166
|
+
text: str,
|
|
167
|
+
position: tuple[int, int],
|
|
168
|
+
font_size: int = 40,
|
|
169
|
+
text_color: tuple[int, int, int] = (255, 255, 255),
|
|
170
|
+
glow_color: tuple[int, int, int] = (255, 200, 0),
|
|
171
|
+
glow_radius: int = 5,
|
|
172
|
+
centered: bool = False,
|
|
173
|
+
bold: bool = True
|
|
174
|
+
) -> Image.Image:
|
|
175
|
+
"""
|
|
176
|
+
Draw text with glow effect for emphasis.
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
frame: PIL Image to draw on
|
|
180
|
+
text: Text to draw
|
|
181
|
+
position: (x, y) position
|
|
182
|
+
font_size: Font size in pixels
|
|
183
|
+
text_color: RGB color for text
|
|
184
|
+
glow_color: RGB color for glow
|
|
185
|
+
glow_radius: Radius of glow effect
|
|
186
|
+
centered: If True, center text at position
|
|
187
|
+
bold: Use bold font variant
|
|
188
|
+
|
|
189
|
+
Returns:
|
|
190
|
+
Modified frame
|
|
191
|
+
"""
|
|
192
|
+
draw = ImageDraw.Draw(frame)
|
|
193
|
+
font = get_font(font_size, bold=bold)
|
|
194
|
+
|
|
195
|
+
# Calculate position for centering
|
|
196
|
+
if centered:
|
|
197
|
+
bbox = draw.textbbox((0, 0), text, font=font)
|
|
198
|
+
text_width = bbox[2] - bbox[0]
|
|
199
|
+
text_height = bbox[3] - bbox[1]
|
|
200
|
+
x = position[0] - text_width // 2
|
|
201
|
+
y = position[1] - text_height // 2
|
|
202
|
+
position = (x, y)
|
|
203
|
+
|
|
204
|
+
# Draw glow layers with decreasing opacity (simulated with same color at different offsets)
|
|
205
|
+
x, y = position
|
|
206
|
+
for radius in range(glow_radius, 0, -1):
|
|
207
|
+
for offset_x in range(-radius, radius + 1):
|
|
208
|
+
for offset_y in range(-radius, radius + 1):
|
|
209
|
+
if offset_x != 0 or offset_y != 0:
|
|
210
|
+
draw.text((x + offset_x, y + offset_y), text, fill=glow_color, font=font)
|
|
211
|
+
|
|
212
|
+
# Draw main text
|
|
213
|
+
draw.text(position, text, fill=text_color, font=font)
|
|
214
|
+
|
|
215
|
+
return frame
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def draw_text_in_box(
|
|
219
|
+
frame: Image.Image,
|
|
220
|
+
text: str,
|
|
221
|
+
position: tuple[int, int],
|
|
222
|
+
font_size: int = 40,
|
|
223
|
+
text_color: tuple[int, int, int] = (255, 255, 255),
|
|
224
|
+
box_color: tuple[int, int, int] = (0, 0, 0),
|
|
225
|
+
box_alpha: float = 0.7,
|
|
226
|
+
padding: int = 10,
|
|
227
|
+
centered: bool = True,
|
|
228
|
+
bold: bool = True
|
|
229
|
+
) -> Image.Image:
|
|
230
|
+
"""
|
|
231
|
+
Draw text in a semi-transparent box for guaranteed readability.
|
|
232
|
+
|
|
233
|
+
Args:
|
|
234
|
+
frame: PIL Image to draw on
|
|
235
|
+
text: Text to draw
|
|
236
|
+
position: (x, y) position
|
|
237
|
+
font_size: Font size in pixels
|
|
238
|
+
text_color: RGB color for text
|
|
239
|
+
box_color: RGB color for background box
|
|
240
|
+
box_alpha: Opacity of box (0.0-1.0)
|
|
241
|
+
padding: Padding around text in pixels
|
|
242
|
+
centered: If True, center at position
|
|
243
|
+
bold: Use bold font variant
|
|
244
|
+
|
|
245
|
+
Returns:
|
|
246
|
+
Modified frame
|
|
247
|
+
"""
|
|
248
|
+
# Create a separate layer for the box with alpha
|
|
249
|
+
overlay = Image.new('RGBA', frame.size, (0, 0, 0, 0))
|
|
250
|
+
draw_overlay = ImageDraw.Draw(overlay)
|
|
251
|
+
draw = ImageDraw.Draw(frame)
|
|
252
|
+
|
|
253
|
+
font = get_font(font_size, bold=bold)
|
|
254
|
+
|
|
255
|
+
# Get text dimensions
|
|
256
|
+
bbox = draw.textbbox((0, 0), text, font=font)
|
|
257
|
+
text_width = bbox[2] - bbox[0]
|
|
258
|
+
text_height = bbox[3] - bbox[1]
|
|
259
|
+
|
|
260
|
+
# Calculate box position
|
|
261
|
+
if centered:
|
|
262
|
+
box_x = position[0] - (text_width + padding * 2) // 2
|
|
263
|
+
box_y = position[1] - (text_height + padding * 2) // 2
|
|
264
|
+
text_x = position[0] - text_width // 2
|
|
265
|
+
text_y = position[1] - text_height // 2
|
|
266
|
+
else:
|
|
267
|
+
box_x = position[0] - padding
|
|
268
|
+
box_y = position[1] - padding
|
|
269
|
+
text_x = position[0]
|
|
270
|
+
text_y = position[1]
|
|
271
|
+
|
|
272
|
+
# Draw semi-transparent box
|
|
273
|
+
box_coords = [
|
|
274
|
+
box_x,
|
|
275
|
+
box_y,
|
|
276
|
+
box_x + text_width + padding * 2,
|
|
277
|
+
box_y + text_height + padding * 2
|
|
278
|
+
]
|
|
279
|
+
alpha_value = int(255 * box_alpha)
|
|
280
|
+
draw_overlay.rectangle(box_coords, fill=(*box_color, alpha_value))
|
|
281
|
+
|
|
282
|
+
# Composite overlay onto frame
|
|
283
|
+
frame_rgba = frame.convert('RGBA')
|
|
284
|
+
frame_rgba = Image.alpha_composite(frame_rgba, overlay)
|
|
285
|
+
frame = frame_rgba.convert('RGB')
|
|
286
|
+
|
|
287
|
+
# Draw text on top
|
|
288
|
+
draw = ImageDraw.Draw(frame)
|
|
289
|
+
draw.text((text_x, text_y), text, fill=text_color, font=font)
|
|
290
|
+
|
|
291
|
+
return frame
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
def get_text_size(text: str, font_size: int, bold: bool = True) -> tuple[int, int]:
|
|
295
|
+
"""
|
|
296
|
+
Get the dimensions of text without drawing it.
|
|
297
|
+
|
|
298
|
+
Args:
|
|
299
|
+
text: Text to measure
|
|
300
|
+
font_size: Font size in pixels
|
|
301
|
+
bold: Use bold font variant
|
|
302
|
+
|
|
303
|
+
Returns:
|
|
304
|
+
(width, height) tuple
|
|
305
|
+
"""
|
|
306
|
+
font = get_font(font_size, bold=bold)
|
|
307
|
+
# Create temporary image to measure
|
|
308
|
+
temp_img = Image.new('RGB', (1, 1))
|
|
309
|
+
draw = ImageDraw.Draw(temp_img)
|
|
310
|
+
bbox = draw.textbbox((0, 0), text, font=font)
|
|
311
|
+
width = bbox[2] - bbox[0]
|
|
312
|
+
height = bbox[3] - bbox[1]
|
|
313
|
+
return (width, height)
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
def get_optimal_font_size(text: str, max_width: int, max_height: int,
|
|
317
|
+
start_size: int = 60) -> int:
|
|
318
|
+
"""
|
|
319
|
+
Find the largest font size that fits within given dimensions.
|
|
320
|
+
|
|
321
|
+
Args:
|
|
322
|
+
text: Text to size
|
|
323
|
+
max_width: Maximum width in pixels
|
|
324
|
+
max_height: Maximum height in pixels
|
|
325
|
+
start_size: Starting font size to try
|
|
326
|
+
|
|
327
|
+
Returns:
|
|
328
|
+
Optimal font size
|
|
329
|
+
"""
|
|
330
|
+
font_size = start_size
|
|
331
|
+
while font_size > 10:
|
|
332
|
+
width, height = get_text_size(text, font_size)
|
|
333
|
+
if width <= max_width and height <= max_height:
|
|
334
|
+
return font_size
|
|
335
|
+
font_size -= 2
|
|
336
|
+
return 10 # Minimum font size
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
def scale_font_for_frame(base_size: int, frame_width: int, frame_height: int) -> int:
|
|
340
|
+
"""
|
|
341
|
+
Scale font size proportionally to frame dimensions.
|
|
342
|
+
|
|
343
|
+
Useful for maintaining relative text size across different GIF dimensions.
|
|
344
|
+
|
|
345
|
+
Args:
|
|
346
|
+
base_size: Base font size for 480x480 frame
|
|
347
|
+
frame_width: Actual frame width
|
|
348
|
+
frame_height: Actual frame height
|
|
349
|
+
|
|
350
|
+
Returns:
|
|
351
|
+
Scaled font size
|
|
352
|
+
"""
|
|
353
|
+
# Use average dimension for scaling
|
|
354
|
+
avg_dimension = (frame_width + frame_height) / 2
|
|
355
|
+
base_dimension = 480 # Reference dimension
|
|
356
|
+
scale_factor = avg_dimension / base_dimension
|
|
357
|
+
return max(10, int(base_size * scale_factor))
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Validators - Check if GIFs meet Slack's requirements.
|
|
4
|
+
|
|
5
|
+
These validators help ensure your GIFs meet Slack's size and dimension constraints.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def check_slack_size(gif_path: str | Path, is_emoji: bool = True) -> tuple[bool, dict]:
|
|
12
|
+
"""
|
|
13
|
+
Check if GIF meets Slack size limits.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
gif_path: Path to GIF file
|
|
17
|
+
is_emoji: True for emoji GIF (64KB limit), False for message GIF (2MB limit)
|
|
18
|
+
|
|
19
|
+
Returns:
|
|
20
|
+
Tuple of (passes: bool, info: dict with details)
|
|
21
|
+
"""
|
|
22
|
+
gif_path = Path(gif_path)
|
|
23
|
+
|
|
24
|
+
if not gif_path.exists():
|
|
25
|
+
return False, {'error': f'File not found: {gif_path}'}
|
|
26
|
+
|
|
27
|
+
size_bytes = gif_path.stat().st_size
|
|
28
|
+
size_kb = size_bytes / 1024
|
|
29
|
+
size_mb = size_kb / 1024
|
|
30
|
+
|
|
31
|
+
limit_kb = 64 if is_emoji else 2048
|
|
32
|
+
limit_mb = limit_kb / 1024
|
|
33
|
+
|
|
34
|
+
passes = size_kb <= limit_kb
|
|
35
|
+
|
|
36
|
+
info = {
|
|
37
|
+
'size_bytes': size_bytes,
|
|
38
|
+
'size_kb': size_kb,
|
|
39
|
+
'size_mb': size_mb,
|
|
40
|
+
'limit_kb': limit_kb,
|
|
41
|
+
'limit_mb': limit_mb,
|
|
42
|
+
'passes': passes,
|
|
43
|
+
'type': 'emoji' if is_emoji else 'message'
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
# Print feedback
|
|
47
|
+
if passes:
|
|
48
|
+
print(f"✓ {size_kb:.1f} KB - within {limit_kb} KB limit")
|
|
49
|
+
else:
|
|
50
|
+
print(f"✗ {size_kb:.1f} KB - exceeds {limit_kb} KB limit")
|
|
51
|
+
overage_kb = size_kb - limit_kb
|
|
52
|
+
overage_percent = (overage_kb / limit_kb) * 100
|
|
53
|
+
print(f" Over by: {overage_kb:.1f} KB ({overage_percent:.1f}%)")
|
|
54
|
+
print(f" Try: fewer frames, fewer colors, or simpler design")
|
|
55
|
+
|
|
56
|
+
return passes, info
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def validate_dimensions(width: int, height: int, is_emoji: bool = True) -> tuple[bool, dict]:
|
|
60
|
+
"""
|
|
61
|
+
Check if dimensions are suitable for Slack.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
width: Frame width in pixels
|
|
65
|
+
height: Frame height in pixels
|
|
66
|
+
is_emoji: True for emoji GIF, False for message GIF
|
|
67
|
+
|
|
68
|
+
Returns:
|
|
69
|
+
Tuple of (passes: bool, info: dict with details)
|
|
70
|
+
"""
|
|
71
|
+
info = {
|
|
72
|
+
'width': width,
|
|
73
|
+
'height': height,
|
|
74
|
+
'is_square': width == height,
|
|
75
|
+
'type': 'emoji' if is_emoji else 'message'
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if is_emoji:
|
|
79
|
+
# Emoji GIFs should be 128x128
|
|
80
|
+
optimal = width == height == 128
|
|
81
|
+
acceptable = width == height and 64 <= width <= 128
|
|
82
|
+
|
|
83
|
+
info['optimal'] = optimal
|
|
84
|
+
info['acceptable'] = acceptable
|
|
85
|
+
|
|
86
|
+
if optimal:
|
|
87
|
+
print(f"✓ {width}x{height} - optimal for emoji")
|
|
88
|
+
passes = True
|
|
89
|
+
elif acceptable:
|
|
90
|
+
print(f"⚠ {width}x{height} - acceptable but 128x128 is optimal")
|
|
91
|
+
passes = True
|
|
92
|
+
else:
|
|
93
|
+
print(f"✗ {width}x{height} - emoji should be square, 128x128 recommended")
|
|
94
|
+
passes = False
|
|
95
|
+
else:
|
|
96
|
+
# Message GIFs should be square-ish and reasonable size
|
|
97
|
+
aspect_ratio = max(width, height) / min(width, height) if min(width, height) > 0 else float('inf')
|
|
98
|
+
reasonable_size = 320 <= min(width, height) <= 640
|
|
99
|
+
|
|
100
|
+
info['aspect_ratio'] = aspect_ratio
|
|
101
|
+
info['reasonable_size'] = reasonable_size
|
|
102
|
+
|
|
103
|
+
# Check if roughly square (within 2:1 ratio)
|
|
104
|
+
is_square_ish = aspect_ratio <= 2.0
|
|
105
|
+
|
|
106
|
+
if is_square_ish and reasonable_size:
|
|
107
|
+
print(f"✓ {width}x{height} - good for message GIF")
|
|
108
|
+
passes = True
|
|
109
|
+
elif is_square_ish:
|
|
110
|
+
print(f"⚠ {width}x{height} - square-ish but unusual size")
|
|
111
|
+
passes = True
|
|
112
|
+
elif reasonable_size:
|
|
113
|
+
print(f"⚠ {width}x{height} - good size but not square-ish")
|
|
114
|
+
passes = True
|
|
115
|
+
else:
|
|
116
|
+
print(f"✗ {width}x{height} - unusual dimensions for Slack")
|
|
117
|
+
passes = False
|
|
118
|
+
|
|
119
|
+
return passes, info
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def validate_gif(gif_path: str | Path, is_emoji: bool = True) -> tuple[bool, dict]:
|
|
123
|
+
"""
|
|
124
|
+
Run all validations on a GIF file.
|
|
125
|
+
|
|
126
|
+
Args:
|
|
127
|
+
gif_path: Path to GIF file
|
|
128
|
+
is_emoji: True for emoji GIF, False for message GIF
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Tuple of (all_pass: bool, results: dict)
|
|
132
|
+
"""
|
|
133
|
+
from PIL import Image
|
|
134
|
+
|
|
135
|
+
gif_path = Path(gif_path)
|
|
136
|
+
|
|
137
|
+
if not gif_path.exists():
|
|
138
|
+
return False, {'error': f'File not found: {gif_path}'}
|
|
139
|
+
|
|
140
|
+
print(f"\nValidating {gif_path.name} as {'emoji' if is_emoji else 'message'} GIF:")
|
|
141
|
+
print("=" * 60)
|
|
142
|
+
|
|
143
|
+
# Check file size
|
|
144
|
+
size_pass, size_info = check_slack_size(gif_path, is_emoji)
|
|
145
|
+
|
|
146
|
+
# Check dimensions
|
|
147
|
+
try:
|
|
148
|
+
with Image.open(gif_path) as img:
|
|
149
|
+
width, height = img.size
|
|
150
|
+
dim_pass, dim_info = validate_dimensions(width, height, is_emoji)
|
|
151
|
+
|
|
152
|
+
# Count frames
|
|
153
|
+
frame_count = 0
|
|
154
|
+
try:
|
|
155
|
+
while True:
|
|
156
|
+
img.seek(frame_count)
|
|
157
|
+
frame_count += 1
|
|
158
|
+
except EOFError:
|
|
159
|
+
pass
|
|
160
|
+
|
|
161
|
+
# Get duration if available
|
|
162
|
+
try:
|
|
163
|
+
duration_ms = img.info.get('duration', 100)
|
|
164
|
+
total_duration = (duration_ms * frame_count) / 1000
|
|
165
|
+
fps = frame_count / total_duration if total_duration > 0 else 0
|
|
166
|
+
except:
|
|
167
|
+
duration_ms = None
|
|
168
|
+
total_duration = None
|
|
169
|
+
fps = None
|
|
170
|
+
|
|
171
|
+
except Exception as e:
|
|
172
|
+
return False, {'error': f'Failed to read GIF: {e}'}
|
|
173
|
+
|
|
174
|
+
print(f"\nFrames: {frame_count}")
|
|
175
|
+
if total_duration:
|
|
176
|
+
print(f"Duration: {total_duration:.1f}s @ {fps:.1f} fps")
|
|
177
|
+
|
|
178
|
+
all_pass = size_pass and dim_pass
|
|
179
|
+
|
|
180
|
+
results = {
|
|
181
|
+
'file': str(gif_path),
|
|
182
|
+
'passes': all_pass,
|
|
183
|
+
'size': size_info,
|
|
184
|
+
'dimensions': dim_info,
|
|
185
|
+
'frame_count': frame_count,
|
|
186
|
+
'duration_seconds': total_duration,
|
|
187
|
+
'fps': fps
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
print("=" * 60)
|
|
191
|
+
if all_pass:
|
|
192
|
+
print("✓ All validations passed!")
|
|
193
|
+
else:
|
|
194
|
+
print("✗ Some validations failed")
|
|
195
|
+
print()
|
|
196
|
+
|
|
197
|
+
return all_pass, results
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def get_optimization_suggestions(results: dict) -> list[str]:
|
|
201
|
+
"""
|
|
202
|
+
Get suggestions for optimizing a GIF based on validation results.
|
|
203
|
+
|
|
204
|
+
Args:
|
|
205
|
+
results: Results dict from validate_gif()
|
|
206
|
+
|
|
207
|
+
Returns:
|
|
208
|
+
List of suggestion strings
|
|
209
|
+
"""
|
|
210
|
+
suggestions = []
|
|
211
|
+
|
|
212
|
+
if not results.get('passes', False):
|
|
213
|
+
size_info = results.get('size', {})
|
|
214
|
+
dim_info = results.get('dimensions', {})
|
|
215
|
+
|
|
216
|
+
# Size suggestions
|
|
217
|
+
if not size_info.get('passes', True):
|
|
218
|
+
overage = size_info['size_kb'] - size_info['limit_kb']
|
|
219
|
+
if size_info['type'] == 'emoji':
|
|
220
|
+
suggestions.append(f"Reduce file size by {overage:.1f} KB:")
|
|
221
|
+
suggestions.append(" - Limit to 10-12 frames")
|
|
222
|
+
suggestions.append(" - Use 32-40 colors maximum")
|
|
223
|
+
suggestions.append(" - Remove gradients (solid colors compress better)")
|
|
224
|
+
suggestions.append(" - Simplify design")
|
|
225
|
+
else:
|
|
226
|
+
suggestions.append(f"Reduce file size by {overage:.1f} KB:")
|
|
227
|
+
suggestions.append(" - Reduce frame count or FPS")
|
|
228
|
+
suggestions.append(" - Use fewer colors (128 → 64)")
|
|
229
|
+
suggestions.append(" - Reduce dimensions")
|
|
230
|
+
|
|
231
|
+
# Dimension suggestions
|
|
232
|
+
if not dim_info.get('optimal', True) and dim_info.get('type') == 'emoji':
|
|
233
|
+
suggestions.append("For optimal emoji GIF:")
|
|
234
|
+
suggestions.append(" - Use 128x128 dimensions")
|
|
235
|
+
suggestions.append(" - Ensure square aspect ratio")
|
|
236
|
+
|
|
237
|
+
return suggestions
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
# Convenience function for quick checks
|
|
241
|
+
def is_slack_ready(gif_path: str | Path, is_emoji: bool = True, verbose: bool = True) -> bool:
|
|
242
|
+
"""
|
|
243
|
+
Quick check if GIF is ready for Slack.
|
|
244
|
+
|
|
245
|
+
Args:
|
|
246
|
+
gif_path: Path to GIF file
|
|
247
|
+
is_emoji: True for emoji GIF, False for message GIF
|
|
248
|
+
verbose: Print detailed feedback
|
|
249
|
+
|
|
250
|
+
Returns:
|
|
251
|
+
True if ready, False otherwise
|
|
252
|
+
"""
|
|
253
|
+
if verbose:
|
|
254
|
+
passes, results = validate_gif(gif_path, is_emoji)
|
|
255
|
+
if not passes:
|
|
256
|
+
suggestions = get_optimization_suggestions(results)
|
|
257
|
+
if suggestions:
|
|
258
|
+
print("\nSuggestions:")
|
|
259
|
+
for suggestion in suggestions:
|
|
260
|
+
print(suggestion)
|
|
261
|
+
return passes
|
|
262
|
+
else:
|
|
263
|
+
size_pass, _ = check_slack_size(gif_path, is_emoji)
|
|
264
|
+
return size_pass
|