skillengine 0.1.0__tar.gz
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.
- skillengine-0.1.0/.env.example +13 -0
- skillengine-0.1.0/.github/workflows/ci.yml +61 -0
- skillengine-0.1.0/.gitignore +41 -0
- skillengine-0.1.0/.python-version +1 -0
- skillengine-0.1.0/CLAUDE.md +142 -0
- skillengine-0.1.0/PKG-INFO +442 -0
- skillengine-0.1.0/README.md +398 -0
- skillengine-0.1.0/ROADMAP.md +370 -0
- skillengine-0.1.0/docs/SkillKit_Technical_Architecture.pdf +0 -0
- skillengine-0.1.0/docs/TECHNICAL_GUIDE.md +1874 -0
- skillengine-0.1.0/docs/architecture.drawio +3 -0
- skillengine-0.1.0/docs/gen_arch.py +198 -0
- skillengine-0.1.0/docs/gen_drawio.py +389 -0
- skillengine-0.1.0/docs/skillkit-execution-flow.drawio +3 -0
- skillengine-0.1.0/docs/test-minimal.drawio +3 -0
- skillengine-0.1.0/examples/agent_demo.py +117 -0
- skillengine-0.1.0/examples/code_mode_demo.py +316 -0
- skillengine-0.1.0/examples/skills/algorithmic-art/LICENSE.txt +202 -0
- skillengine-0.1.0/examples/skills/algorithmic-art/SKILL.md +405 -0
- skillengine-0.1.0/examples/skills/algorithmic-art/templates/generator_template.js +223 -0
- skillengine-0.1.0/examples/skills/algorithmic-art/templates/viewer.html +599 -0
- skillengine-0.1.0/examples/skills/github/SKILL.md +48 -0
- skillengine-0.1.0/examples/skills/pdf/LICENSE.txt +30 -0
- skillengine-0.1.0/examples/skills/pdf/SKILL.md +330 -0
- skillengine-0.1.0/examples/skills/pdf/forms.md +205 -0
- skillengine-0.1.0/examples/skills/pdf/reference.md +612 -0
- skillengine-0.1.0/examples/skills/pdf/scripts/check_bounding_boxes.py +70 -0
- skillengine-0.1.0/examples/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- skillengine-0.1.0/examples/skills/pdf/scripts/check_fillable_fields.py +12 -0
- skillengine-0.1.0/examples/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- skillengine-0.1.0/examples/skills/pdf/scripts/create_validation_image.py +41 -0
- skillengine-0.1.0/examples/skills/pdf/scripts/extract_form_field_info.py +152 -0
- skillengine-0.1.0/examples/skills/pdf/scripts/fill_fillable_fields.py +114 -0
- skillengine-0.1.0/examples/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- skillengine-0.1.0/examples/skills/pptx/LICENSE.txt +30 -0
- skillengine-0.1.0/examples/skills/pptx/SKILL.md +509 -0
- skillengine-0.1.0/examples/skills/pptx/html2pptx.md +625 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/scripts/pack.py +159 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/scripts/unpack.py +29 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/scripts/validate.py +69 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/scripts/validation/base.py +951 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- skillengine-0.1.0/examples/skills/pptx/ooxml.md +427 -0
- skillengine-0.1.0/examples/skills/pptx/scripts/html2pptx.js +979 -0
- skillengine-0.1.0/examples/skills/pptx/scripts/inventory.py +1020 -0
- skillengine-0.1.0/examples/skills/pptx/scripts/rearrange.py +231 -0
- skillengine-0.1.0/examples/skills/pptx/scripts/replace.py +385 -0
- skillengine-0.1.0/examples/skills/pptx/scripts/thumbnail.py +450 -0
- skillengine-0.1.0/examples/skills/slack-gif-creator/LICENSE.txt +202 -0
- skillengine-0.1.0/examples/skills/slack-gif-creator/SKILL.md +254 -0
- skillengine-0.1.0/examples/skills/slack-gif-creator/core/easing.py +234 -0
- skillengine-0.1.0/examples/skills/slack-gif-creator/core/frame_composer.py +176 -0
- skillengine-0.1.0/examples/skills/slack-gif-creator/core/gif_builder.py +269 -0
- skillengine-0.1.0/examples/skills/slack-gif-creator/core/validators.py +136 -0
- skillengine-0.1.0/examples/skills/slack-gif-creator/requirements.txt +4 -0
- skillengine-0.1.0/examples/skills/web-artifacts-builder/LICENSE.txt +202 -0
- skillengine-0.1.0/examples/skills/web-artifacts-builder/SKILL.md +74 -0
- skillengine-0.1.0/examples/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- skillengine-0.1.0/examples/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- skillengine-0.1.0/examples/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- skillengine-0.1.0/examples/test_skills.py +126 -0
- skillengine-0.1.0/pyproject.toml +117 -0
- skillengine-0.1.0/skills/algorithmic-art/LICENSE.txt +202 -0
- skillengine-0.1.0/skills/algorithmic-art/SKILL.md +405 -0
- skillengine-0.1.0/skills/algorithmic-art/templates/generator_template.js +223 -0
- skillengine-0.1.0/skills/algorithmic-art/templates/viewer.html +599 -0
- skillengine-0.1.0/skills/github/SKILL.md +48 -0
- skillengine-0.1.0/skills/hello/SKILL.md +54 -0
- skillengine-0.1.0/skills/pdf/LICENSE.txt +30 -0
- skillengine-0.1.0/skills/pdf/SKILL.md +330 -0
- skillengine-0.1.0/skills/pdf/forms.md +205 -0
- skillengine-0.1.0/skills/pdf/reference.md +612 -0
- skillengine-0.1.0/skills/pdf/scripts/check_bounding_boxes.py +70 -0
- skillengine-0.1.0/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- skillengine-0.1.0/skills/pdf/scripts/check_fillable_fields.py +12 -0
- skillengine-0.1.0/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- skillengine-0.1.0/skills/pdf/scripts/create_validation_image.py +41 -0
- skillengine-0.1.0/skills/pdf/scripts/extract_form_field_info.py +152 -0
- skillengine-0.1.0/skills/pdf/scripts/fill_fillable_fields.py +114 -0
- skillengine-0.1.0/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- skillengine-0.1.0/skills/pptx/LICENSE.txt +30 -0
- skillengine-0.1.0/skills/pptx/SKILL.md +509 -0
- skillengine-0.1.0/skills/pptx/html2pptx.md +625 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- skillengine-0.1.0/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- skillengine-0.1.0/skills/pptx/ooxml/scripts/pack.py +159 -0
- skillengine-0.1.0/skills/pptx/ooxml/scripts/unpack.py +29 -0
- skillengine-0.1.0/skills/pptx/ooxml/scripts/validate.py +69 -0
- skillengine-0.1.0/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- skillengine-0.1.0/skills/pptx/ooxml/scripts/validation/base.py +951 -0
- skillengine-0.1.0/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- skillengine-0.1.0/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- skillengine-0.1.0/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- skillengine-0.1.0/skills/pptx/ooxml.md +427 -0
- skillengine-0.1.0/skills/pptx/scripts/html2pptx.js +979 -0
- skillengine-0.1.0/skills/pptx/scripts/inventory.py +1020 -0
- skillengine-0.1.0/skills/pptx/scripts/rearrange.py +231 -0
- skillengine-0.1.0/skills/pptx/scripts/replace.py +385 -0
- skillengine-0.1.0/skills/pptx/scripts/thumbnail.py +450 -0
- skillengine-0.1.0/skills/slack-gif-creator/LICENSE.txt +202 -0
- skillengine-0.1.0/skills/slack-gif-creator/SKILL.md +254 -0
- skillengine-0.1.0/skills/slack-gif-creator/core/easing.py +234 -0
- skillengine-0.1.0/skills/slack-gif-creator/core/frame_composer.py +176 -0
- skillengine-0.1.0/skills/slack-gif-creator/core/gif_builder.py +269 -0
- skillengine-0.1.0/skills/slack-gif-creator/core/validators.py +136 -0
- skillengine-0.1.0/skills/slack-gif-creator/requirements.txt +4 -0
- skillengine-0.1.0/skills/web-artifacts-builder/LICENSE.txt +202 -0
- skillengine-0.1.0/skills/web-artifacts-builder/SKILL.md +74 -0
- skillengine-0.1.0/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- skillengine-0.1.0/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- skillengine-0.1.0/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- skillengine-0.1.0/src/skillengine/__init__.py +267 -0
- skillengine-0.1.0/src/skillengine/adapters/__init__.py +26 -0
- skillengine-0.1.0/src/skillengine/adapters/anthropic.py +347 -0
- skillengine-0.1.0/src/skillengine/adapters/base.py +345 -0
- skillengine-0.1.0/src/skillengine/adapters/openai.py +312 -0
- skillengine-0.1.0/src/skillengine/adapters/registry.py +299 -0
- skillengine-0.1.0/src/skillengine/adapters/transform.py +120 -0
- skillengine-0.1.0/src/skillengine/agent.py +2224 -0
- skillengine-0.1.0/src/skillengine/cache.py +44 -0
- skillengine-0.1.0/src/skillengine/cli.py +725 -0
- skillengine-0.1.0/src/skillengine/commands.py +333 -0
- skillengine-0.1.0/src/skillengine/config.py +163 -0
- skillengine-0.1.0/src/skillengine/context.py +262 -0
- skillengine-0.1.0/src/skillengine/context_files.py +72 -0
- skillengine-0.1.0/src/skillengine/engine.py +580 -0
- skillengine-0.1.0/src/skillengine/events.py +455 -0
- skillengine-0.1.0/src/skillengine/extensions/__init__.py +40 -0
- skillengine-0.1.0/src/skillengine/extensions/api.py +105 -0
- skillengine-0.1.0/src/skillengine/extensions/manager.py +339 -0
- skillengine-0.1.0/src/skillengine/extensions/models.py +63 -0
- skillengine-0.1.0/src/skillengine/filters/__init__.py +8 -0
- skillengine-0.1.0/src/skillengine/filters/base.py +78 -0
- skillengine-0.1.0/src/skillengine/filters/default.py +152 -0
- skillengine-0.1.0/src/skillengine/loaders/__init__.py +8 -0
- skillengine-0.1.0/src/skillengine/loaders/base.py +93 -0
- skillengine-0.1.0/src/skillengine/loaders/markdown.py +290 -0
- skillengine-0.1.0/src/skillengine/logging.py +114 -0
- skillengine-0.1.0/src/skillengine/memory/__init__.py +11 -0
- skillengine-0.1.0/src/skillengine/memory/client.py +205 -0
- skillengine-0.1.0/src/skillengine/memory/config.py +28 -0
- skillengine-0.1.0/src/skillengine/memory/extension.py +93 -0
- skillengine-0.1.0/src/skillengine/memory/hooks.py +108 -0
- skillengine-0.1.0/src/skillengine/memory/tools.py +245 -0
- skillengine-0.1.0/src/skillengine/model_registry.py +346 -0
- skillengine-0.1.0/src/skillengine/models.py +237 -0
- skillengine-0.1.0/src/skillengine/models_catalog.py +188 -0
- skillengine-0.1.0/src/skillengine/modes/__init__.py +8 -0
- skillengine-0.1.0/src/skillengine/modes/interactive.py +126 -0
- skillengine-0.1.0/src/skillengine/modes/json_mode.py +44 -0
- skillengine-0.1.0/src/skillengine/modes/rpc_mode.py +241 -0
- skillengine-0.1.0/src/skillengine/packages/__init__.py +22 -0
- skillengine-0.1.0/src/skillengine/packages/manager.py +282 -0
- skillengine-0.1.0/src/skillengine/packages/models.py +75 -0
- skillengine-0.1.0/src/skillengine/packages/source.py +45 -0
- skillengine-0.1.0/src/skillengine/prompts.py +147 -0
- skillengine-0.1.0/src/skillengine/runtime/__init__.py +17 -0
- skillengine-0.1.0/src/skillengine/runtime/base.py +129 -0
- skillengine-0.1.0/src/skillengine/runtime/bash.py +188 -0
- skillengine-0.1.0/src/skillengine/runtime/boxlite.py +438 -0
- skillengine-0.1.0/src/skillengine/runtime/code_mode.py +682 -0
- skillengine-0.1.0/src/skillengine/runtime/subprocess_streaming.py +147 -0
- skillengine-0.1.0/src/skillengine/sandbox/__init__.py +11 -0
- skillengine-0.1.0/src/skillengine/sandbox/runner.py +91 -0
- skillengine-0.1.0/src/skillengine/session/__init__.py +67 -0
- skillengine-0.1.0/src/skillengine/session/manager.py +478 -0
- skillengine-0.1.0/src/skillengine/session/models.py +158 -0
- skillengine-0.1.0/src/skillengine/session/store.py +190 -0
- skillengine-0.1.0/src/skillengine/session/tree.py +142 -0
- skillengine-0.1.0/src/skillengine/tools/__init__.py +61 -0
- skillengine-0.1.0/src/skillengine/tools/bash.py +140 -0
- skillengine-0.1.0/src/skillengine/tools/edit.py +185 -0
- skillengine-0.1.0/src/skillengine/tools/find.py +202 -0
- skillengine-0.1.0/src/skillengine/tools/grep.py +307 -0
- skillengine-0.1.0/src/skillengine/tools/ls.py +268 -0
- skillengine-0.1.0/src/skillengine/tools/read.py +188 -0
- skillengine-0.1.0/src/skillengine/tools/registry.py +80 -0
- skillengine-0.1.0/src/skillengine/tools/write.py +87 -0
- skillengine-0.1.0/src/skillengine/transports/__init__.py +18 -0
- skillengine-0.1.0/src/skillengine/transports/auto.py +42 -0
- skillengine-0.1.0/src/skillengine/transports/base.py +42 -0
- skillengine-0.1.0/src/skillengine/transports/sse.py +29 -0
- skillengine-0.1.0/src/skillengine/transports/websocket.py +94 -0
- skillengine-0.1.0/src/skillengine/tui/__init__.py +56 -0
- skillengine-0.1.0/src/skillengine/tui/ansi.py +271 -0
- skillengine-0.1.0/src/skillengine/tui/autocomplete.py +327 -0
- skillengine-0.1.0/src/skillengine/tui/component.py +109 -0
- skillengine-0.1.0/src/skillengine/tui/container.py +166 -0
- skillengine-0.1.0/src/skillengine/tui/editor_widget.py +340 -0
- skillengine-0.1.0/src/skillengine/tui/input_widget.py +329 -0
- skillengine-0.1.0/src/skillengine/tui/keybindings.py +221 -0
- skillengine-0.1.0/src/skillengine/tui/keys.py +341 -0
- skillengine-0.1.0/src/skillengine/tui/markdown_widget.py +129 -0
- skillengine-0.1.0/src/skillengine/tui/overlay.py +198 -0
- skillengine-0.1.0/src/skillengine/tui/renderer.py +199 -0
- skillengine-0.1.0/src/skillengine/tui/select_list.py +304 -0
- skillengine-0.1.0/src/skillengine/tui/theme/__init__.py +20 -0
- skillengine-0.1.0/src/skillengine/tui/theme/defaults.py +110 -0
- skillengine-0.1.0/src/skillengine/tui/theme/loader.py +70 -0
- skillengine-0.1.0/src/skillengine/tui/theme/models.py +154 -0
- skillengine-0.1.0/src/skillengine/tui/theme/schema.py +73 -0
- skillengine-0.1.0/src/skillengine/utils/__init__.py +1 -0
- skillengine-0.1.0/src/skillengine/utils/json_parse.py +34 -0
- skillengine-0.1.0/src/skillengine/web/__init__.py +5 -0
- skillengine-0.1.0/src/skillengine/web/server.py +191 -0
- skillengine-0.1.0/src/skillengine/web/static/app.js +459 -0
- skillengine-0.1.0/src/skillengine/web/static/index.html +72 -0
- skillengine-0.1.0/src/skillengine/web/static/style.css +533 -0
- skillengine-0.1.0/src/skillengine/web/storage.py +129 -0
- skillengine-0.1.0/templates/viewer.html +429 -0
- skillengine-0.1.0/tests/__init__.py +1 -0
- skillengine-0.1.0/tests/conftest.py +166 -0
- skillengine-0.1.0/tests/test_action_tool_dispatch.py +440 -0
- skillengine-0.1.0/tests/test_actions.py +285 -0
- skillengine-0.1.0/tests/test_adapter_registry.py +559 -0
- skillengine-0.1.0/tests/test_adapters.py +282 -0
- skillengine-0.1.0/tests/test_autocomplete.py +231 -0
- skillengine-0.1.0/tests/test_boxlite_runtime.py +789 -0
- skillengine-0.1.0/tests/test_cache.py +72 -0
- skillengine-0.1.0/tests/test_cli.py +200 -0
- skillengine-0.1.0/tests/test_code_mode_runtime.py +557 -0
- skillengine-0.1.0/tests/test_commands.py +247 -0
- skillengine-0.1.0/tests/test_config.py +286 -0
- skillengine-0.1.0/tests/test_context.py +403 -0
- skillengine-0.1.0/tests/test_context_files.py +158 -0
- skillengine-0.1.0/tests/test_cross_provider.py +172 -0
- skillengine-0.1.0/tests/test_engine.py +164 -0
- skillengine-0.1.0/tests/test_events.py +641 -0
- skillengine-0.1.0/tests/test_extension_tool_dispatch.py +161 -0
- skillengine-0.1.0/tests/test_extensions.py +230 -0
- skillengine-0.1.0/tests/test_filters.py +383 -0
- skillengine-0.1.0/tests/test_image_vision.py +112 -0
- skillengine-0.1.0/tests/test_json_mode.py +221 -0
- skillengine-0.1.0/tests/test_keybindings.py +113 -0
- skillengine-0.1.0/tests/test_loader.py +93 -0
- skillengine-0.1.0/tests/test_memory_client.py +293 -0
- skillengine-0.1.0/tests/test_memory_extension.py +162 -0
- skillengine-0.1.0/tests/test_memory_hooks.py +205 -0
- skillengine-0.1.0/tests/test_memory_tools.py +245 -0
- skillengine-0.1.0/tests/test_model_registry.py +313 -0
- skillengine-0.1.0/tests/test_packages.py +459 -0
- skillengine-0.1.0/tests/test_partial_json.py +130 -0
- skillengine-0.1.0/tests/test_prompts.py +182 -0
- skillengine-0.1.0/tests/test_rpc_mode.py +210 -0
- skillengine-0.1.0/tests/test_runtime_streaming.py +346 -0
- skillengine-0.1.0/tests/test_sandboxed_runner.py +239 -0
- skillengine-0.1.0/tests/test_session.py +1055 -0
- skillengine-0.1.0/tests/test_skill_tool.py +755 -0
- skillengine-0.1.0/tests/test_steering_abort.py +536 -0
- skillengine-0.1.0/tests/test_stream_events.py +539 -0
- skillengine-0.1.0/tests/test_theme.py +505 -0
- skillengine-0.1.0/tests/test_thinking_budget.py +404 -0
- skillengine-0.1.0/tests/test_tools.py +474 -0
- skillengine-0.1.0/tests/test_transports.py +194 -0
- skillengine-0.1.0/tests/test_tui_components.py +507 -0
- skillengine-0.1.0/uv.lock +1914 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# MiniMaxi API Configuration (OpenAI-compatible)
|
|
2
|
+
# Available Models:
|
|
3
|
+
# - MiniMax-M2.1: Multilingual programming (~60 tokens/sec)
|
|
4
|
+
# - MiniMax-M2.1-lightning: Faster variant (~100 tokens/sec)
|
|
5
|
+
# - MiniMax-M2: Coding and Agent workflows
|
|
6
|
+
# - M2-her: Dialogue scenarios (64K context)
|
|
7
|
+
#
|
|
8
|
+
# Current Model: MiniMax-M2.1
|
|
9
|
+
OPENAI_BASE_URL=https://api.minimaxi.com/v1
|
|
10
|
+
OPENAI_API_KEY=your-api-key-here
|
|
11
|
+
|
|
12
|
+
# Default model for the project
|
|
13
|
+
MINIMAX_MODEL=MiniMax-M2.5
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Install uv
|
|
16
|
+
uses: astral-sh/setup-uv@v4
|
|
17
|
+
with:
|
|
18
|
+
version: "latest"
|
|
19
|
+
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: uv sync --dev --python 3.12
|
|
27
|
+
|
|
28
|
+
- name: Run ruff lint
|
|
29
|
+
run: uv run ruff check src/
|
|
30
|
+
|
|
31
|
+
- name: Run ruff format check
|
|
32
|
+
run: uv run ruff format --check src/
|
|
33
|
+
|
|
34
|
+
- name: Run mypy
|
|
35
|
+
run: uv run mypy src/
|
|
36
|
+
|
|
37
|
+
test:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
strategy:
|
|
40
|
+
fail-fast: false
|
|
41
|
+
matrix:
|
|
42
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
43
|
+
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
- name: Install uv
|
|
48
|
+
uses: astral-sh/setup-uv@v4
|
|
49
|
+
with:
|
|
50
|
+
version: "latest"
|
|
51
|
+
|
|
52
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
53
|
+
uses: actions/setup-python@v5
|
|
54
|
+
with:
|
|
55
|
+
python-version: ${{ matrix.python-version }}
|
|
56
|
+
|
|
57
|
+
- name: Install dependencies
|
|
58
|
+
run: uv sync --dev --python ${{ matrix.python-version }}
|
|
59
|
+
|
|
60
|
+
- name: Run tests
|
|
61
|
+
run: uv run pytest -v --tb=short
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# OS files
|
|
2
|
+
.DS_Store
|
|
3
|
+
Thumbs.db
|
|
4
|
+
|
|
5
|
+
# Python-generated files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[oc]
|
|
8
|
+
build/
|
|
9
|
+
dist/
|
|
10
|
+
wheels/
|
|
11
|
+
*.egg-info
|
|
12
|
+
|
|
13
|
+
# Virtual environments
|
|
14
|
+
.venv
|
|
15
|
+
|
|
16
|
+
# Environment files
|
|
17
|
+
.env
|
|
18
|
+
.env.*
|
|
19
|
+
!.env.example
|
|
20
|
+
|
|
21
|
+
# Node
|
|
22
|
+
node_modules/
|
|
23
|
+
package-lock.json
|
|
24
|
+
|
|
25
|
+
# IDE
|
|
26
|
+
.idea/
|
|
27
|
+
.vscode/
|
|
28
|
+
*.swp
|
|
29
|
+
*.swo
|
|
30
|
+
|
|
31
|
+
# Testing / Linting cache
|
|
32
|
+
.pytest_cache/
|
|
33
|
+
.mypy_cache/
|
|
34
|
+
.ruff_cache/
|
|
35
|
+
.coverage
|
|
36
|
+
htmlcov/
|
|
37
|
+
|
|
38
|
+
# Generated files
|
|
39
|
+
*.pptx
|
|
40
|
+
*.docx
|
|
41
|
+
demo_*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
SkillEngine is a framework-agnostic skills execution engine for LLM agents. It provides a plugin-based system for defining, loading, filtering, and executing skills (capabilities) that can be made available to large language models. Aligned with the Claude Agent Skills architecture (progressive disclosure, on-demand loading, per-skill model/tools).
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Install dependencies
|
|
13
|
+
uv sync
|
|
14
|
+
|
|
15
|
+
# Install with optional adapters
|
|
16
|
+
uv add -e ".[openai]"
|
|
17
|
+
uv add -e ".[anthropic]"
|
|
18
|
+
|
|
19
|
+
# Run all tests
|
|
20
|
+
pytest
|
|
21
|
+
|
|
22
|
+
# Run a single test file
|
|
23
|
+
pytest tests/test_engine.py
|
|
24
|
+
|
|
25
|
+
# Run a specific test
|
|
26
|
+
pytest tests/test_engine.py::test_function_name -v
|
|
27
|
+
|
|
28
|
+
# Linting and formatting
|
|
29
|
+
ruff check src/
|
|
30
|
+
ruff format src/
|
|
31
|
+
|
|
32
|
+
# Type checking
|
|
33
|
+
mypy src/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Architecture
|
|
37
|
+
|
|
38
|
+
The engine uses a pipeline architecture with four extensible subsystems:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
Skill Files (Markdown+YAML) → [Loader] → [Filter] → [Runtime] → [Adapter]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Core Components
|
|
45
|
+
|
|
46
|
+
- **Engine** (`engine.py`): Orchestrates the entire pipeline - loads skills from directories, applies filters, generates prompts, and executes commands
|
|
47
|
+
- **Agent** (`agent.py`): `AgentRunner` with on-demand skill loading via `skill` tool, `$ARGUMENTS` substitution, `context: fork`, `!`cmd`` dynamic injection, per-skill model switching
|
|
48
|
+
- **Models** (`models.py`): Data structures including `Skill`, `SkillMetadata`, `SkillRequirements`, `SkillSnapshot`
|
|
49
|
+
- **Config** (`config.py`): `SkillsConfig` for directory management, filtering options, per-skill overrides
|
|
50
|
+
|
|
51
|
+
### Plugin Subsystems
|
|
52
|
+
|
|
53
|
+
Each subsystem has an abstract base class and reference implementation:
|
|
54
|
+
|
|
55
|
+
| Subsystem | Base Class | Implementation | Purpose |
|
|
56
|
+
|-----------|------------|----------------|---------|
|
|
57
|
+
| Loaders | `SkillLoader` | `MarkdownSkillLoader` | Parse skill files (Markdown + YAML frontmatter) |
|
|
58
|
+
| Filters | `SkillFilter` | `DefaultSkillFilter` | Check eligibility (bins, env vars, OS, config) |
|
|
59
|
+
| Runtimes | `SkillRuntime` | `BashRuntime`, `CodeModeRuntime` | Execute commands with timeout and env injection |
|
|
60
|
+
| Adapters | `LLMAdapter` | `OpenAIAdapter`, `AnthropicAdapter` | Integrate with LLM providers |
|
|
61
|
+
|
|
62
|
+
### Skill Definition Format
|
|
63
|
+
|
|
64
|
+
Skills are defined as Markdown files with YAML frontmatter, located at `skills/<name>/SKILL.md`:
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
---
|
|
68
|
+
name: skill-name
|
|
69
|
+
description: What the skill does
|
|
70
|
+
model: claude-sonnet-4-5-20250514 # Per-skill model override
|
|
71
|
+
context: fork # Isolated subagent execution
|
|
72
|
+
allowed-tools: [Read, Grep] # Tool restrictions
|
|
73
|
+
argument-hint: "<query>" # Autocomplete hint
|
|
74
|
+
hooks:
|
|
75
|
+
PreToolExecution: "echo pre"
|
|
76
|
+
metadata:
|
|
77
|
+
emoji: "🔧"
|
|
78
|
+
primary_env: "API_KEY"
|
|
79
|
+
requires:
|
|
80
|
+
bins: ["git"] # ALL must exist
|
|
81
|
+
any_bins: ["npm", "pnpm"] # At least ONE must exist
|
|
82
|
+
env: ["GITHUB_TOKEN"]
|
|
83
|
+
os: ["darwin", "linux"]
|
|
84
|
+
---
|
|
85
|
+
# Skill content (prompt text)
|
|
86
|
+
Use $ARGUMENTS for dynamic input.
|
|
87
|
+
Current date: !`date +%Y-%m-%d`
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### On-Demand Skill Loading
|
|
91
|
+
|
|
92
|
+
The system prompt only contains skill **names and descriptions** (metadata). Full skill content is loaded on-demand when the LLM calls the `skill` tool. This follows the progressive disclosure pattern from Claude Agent Skills.
|
|
93
|
+
|
|
94
|
+
- `AgentConfig.skill_description_budget` (default 16000) limits total chars for skill metadata in the system prompt
|
|
95
|
+
- The `skill` tool accepts `name` and optional `arguments` parameters
|
|
96
|
+
- `$ARGUMENTS`, `$1`..`$N`, `${CLAUDE_SESSION_ID}` are substituted in skill content
|
|
97
|
+
- `!`command`` placeholders are replaced with command stdout before sending to LLM
|
|
98
|
+
- Skills with `context: fork` run in an isolated child `AgentRunner`
|
|
99
|
+
- Skills with `model:` trigger per-skill model switching (restored after)
|
|
100
|
+
- Skills with `allowed-tools:` restrict which tools the LLM can use
|
|
101
|
+
|
|
102
|
+
### Skill Validation
|
|
103
|
+
|
|
104
|
+
`AgentRunner.validate_skill(skill)` enforces:
|
|
105
|
+
- Name: ≤64 chars, lowercase alphanumeric + hyphens, no leading hyphen
|
|
106
|
+
- Description: non-empty, ≤1024 chars
|
|
107
|
+
|
|
108
|
+
### CodeModeRuntime (search + execute pattern)
|
|
109
|
+
|
|
110
|
+
Inspired by Cloudflare's code-mode-mcp. Instead of exposing N tools (one per API endpoint), `CodeModeRuntime` exposes just 2 tools — `search` and `execute` — and lets the LLM write Python code against injected data and clients. Token cost is O(1) regardless of API surface area.
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
runtime = CodeModeRuntime(
|
|
114
|
+
spec=openapi_spec, # Any data for discovery (dict, list, etc.)
|
|
115
|
+
ctx={"client": httpx.Client()}, # Objects injected into execute mode
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
# search: spec only, no ctx (read-only discovery)
|
|
119
|
+
await runtime.search("[p for p in spec['paths'] if '/users' in p]")
|
|
120
|
+
|
|
121
|
+
# run/execute: spec + ctx (call APIs, mutate state)
|
|
122
|
+
await runtime.run("result = ctx['client'].get('/users')")
|
|
123
|
+
|
|
124
|
+
# Generate 2-tool definitions for LLM adapters (OpenAI format)
|
|
125
|
+
tools = runtime.get_tool_definitions() # → [search, execute]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
- **Two execution modes**: `search(code)` injects `spec` only; `run(code)` / `execute(code)` injects both `spec` and `ctx`
|
|
129
|
+
- **Two sandbox modes**: `"inprocess"` (exec with restricted builtins, works with any Python objects) and `"subprocess"` (child process isolation, JSON-serializable data only)
|
|
130
|
+
- **Safe builtins**: restricted `__import__` only allows configured modules (default: json, re, math, datetime, collections, itertools, functools, urllib.parse)
|
|
131
|
+
- **`get_tool_definitions()`**: generates OpenAI function-calling format tool definitions with spec hints and ctx key names
|
|
132
|
+
- **Drop-in replacement**: implements `SkillRuntime`, can be passed to `SkillsEngine(runtime=CodeModeRuntime(...))`
|
|
133
|
+
- **Result convention**: user code assigns to `result` for structured output, or uses `print()` for text output
|
|
134
|
+
|
|
135
|
+
### Key Patterns
|
|
136
|
+
|
|
137
|
+
- **Progressive Disclosure**: Only skill metadata in system prompt; full content loaded on-demand via `skill` tool
|
|
138
|
+
- **Environment Management**: The engine uses a context manager pattern (`env_context`) to safely backup/restore environment variables when injecting per-skill overrides
|
|
139
|
+
- **Snapshot Caching**: `SkillSnapshot` provides immutable point-in-time views with version tracking and content hashing for cache invalidation
|
|
140
|
+
- **Filter Short-circuiting**: Eligibility checks run in sequence and short-circuit on first failure, returning the reason for ineligibility
|
|
141
|
+
- **Per-Skill Model Switching**: `switch_model()` before skill content, restore in `finally` block
|
|
142
|
+
- **Fork Isolation**: `_execute_skill_forked()` creates a child `AgentRunner` with skill content as system prompt, inherits parent config
|
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: skillengine
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A standalone skills execution engine for LLM agents
|
|
5
|
+
Project-URL: Homepage, https://github.com/sawzhang/skillengine
|
|
6
|
+
Project-URL: Repository, https://github.com/sawzhang/skillengine
|
|
7
|
+
Author-email: Alex Zhang <alex@example.com>
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: agent,ai,automation,llm,skills
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Requires-Dist: markitdown[pptx]>=0.1.4
|
|
20
|
+
Requires-Dist: openai>=2.16.0
|
|
21
|
+
Requires-Dist: partial-json-parser>=0.1
|
|
22
|
+
Requires-Dist: pillow>=12.1.0
|
|
23
|
+
Requires-Dist: pydantic>=2.0
|
|
24
|
+
Requires-Dist: pypdf>=6.6.2
|
|
25
|
+
Requires-Dist: python-dotenv>=1.2.1
|
|
26
|
+
Requires-Dist: pyyaml>=6.0
|
|
27
|
+
Requires-Dist: reportlab>=4.4.9
|
|
28
|
+
Requires-Dist: rich>=13.0
|
|
29
|
+
Requires-Dist: watchfiles>=0.21
|
|
30
|
+
Provides-Extra: anthropic
|
|
31
|
+
Requires-Dist: anthropic>=0.18; extra == 'anthropic'
|
|
32
|
+
Provides-Extra: memory
|
|
33
|
+
Requires-Dist: httpx>=0.24; extra == 'memory'
|
|
34
|
+
Provides-Extra: openai
|
|
35
|
+
Requires-Dist: openai>=1.0; extra == 'openai'
|
|
36
|
+
Provides-Extra: sandbox
|
|
37
|
+
Requires-Dist: boxlite>=0.1; extra == 'sandbox'
|
|
38
|
+
Provides-Extra: web
|
|
39
|
+
Requires-Dist: starlette>=0.27; extra == 'web'
|
|
40
|
+
Requires-Dist: uvicorn>=0.23; extra == 'web'
|
|
41
|
+
Provides-Extra: websockets
|
|
42
|
+
Requires-Dist: websockets>=12.0; extra == 'websockets'
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
|
|
45
|
+
# SkillEngine
|
|
46
|
+
|
|
47
|
+
A standalone, framework-agnostic skills execution engine for LLM agents. Provides a Claude Code-like experience with automatic skill discovery, loading, and execution.
|
|
48
|
+
|
|
49
|
+
## Features
|
|
50
|
+
|
|
51
|
+
- **Claude Code-like Experience**: `AgentRunner` provides auto-loading, slash commands, and tool execution
|
|
52
|
+
- **On-Demand Skill Loading**: LLM calls the `skill` tool to load full skill content only when needed (progressive disclosure)
|
|
53
|
+
- **Framework Agnostic**: Works with any LLM provider (OpenAI, Anthropic, MiniMaxi, local models)
|
|
54
|
+
- **Markdown-based Skills**: Define skills as simple Markdown files with YAML frontmatter
|
|
55
|
+
- **$ARGUMENTS Substitution**: Support `$ARGUMENTS`, `$1`.`$N`, `${CLAUDE_SESSION_ID}` in skill content
|
|
56
|
+
- **Per-Skill Model & Tools**: Each skill can specify its own `model` and `allowed-tools`
|
|
57
|
+
- **Context Fork**: Run skills in isolated subagent contexts with `context: fork`
|
|
58
|
+
- **Dynamic Content Injection**: `!`command`` syntax executes shell commands before skill content is sent to LLM
|
|
59
|
+
- **Description Budget**: Configurable char budget for skill descriptions in system prompt (default 16K)
|
|
60
|
+
- **Skill Validation**: Enforces naming rules (≤64 chars, lowercase+digits+hyphens) and description limits (≤1024 chars)
|
|
61
|
+
- **User-invocable Skills**: Slash commands like `/pdf`, `/pptx` for direct skill invocation
|
|
62
|
+
- **Eligibility Filtering**: Automatic filtering based on OS, binaries, env vars, and config
|
|
63
|
+
- **Environment Injection**: Securely inject API keys and env vars for skill execution
|
|
64
|
+
- **File Watching**: Hot-reload skills when files change
|
|
65
|
+
- **Multiple Sources**: Load skills from bundled, managed, workspace, and plugin directories
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# With uv (recommended)
|
|
71
|
+
uv add skillengine
|
|
72
|
+
|
|
73
|
+
# Basic installation
|
|
74
|
+
pip install skillengine
|
|
75
|
+
|
|
76
|
+
# With all dependencies
|
|
77
|
+
pip install skillengine[openai]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Quick Start
|
|
81
|
+
|
|
82
|
+
### 1. Create `.env` file
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# For MiniMaxi API (OpenAI-compatible)
|
|
86
|
+
OPENAI_BASE_URL=https://api.minimaxi.com/v1
|
|
87
|
+
OPENAI_API_KEY=your-api-key
|
|
88
|
+
MINIMAX_MODEL=MiniMax-M2.1
|
|
89
|
+
|
|
90
|
+
# Or for OpenAI
|
|
91
|
+
OPENAI_API_KEY=your-openai-key
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 2. Use AgentRunner (Recommended)
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
import asyncio
|
|
98
|
+
from pathlib import Path
|
|
99
|
+
from skillengine import create_agent
|
|
100
|
+
|
|
101
|
+
async def main():
|
|
102
|
+
# Create agent with automatic skill loading
|
|
103
|
+
agent = await create_agent(
|
|
104
|
+
skill_dirs=[Path("./skills")],
|
|
105
|
+
system_prompt="You are a helpful assistant.",
|
|
106
|
+
watch_skills=True, # Hot-reload on file changes
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
# Chat with automatic tool execution
|
|
110
|
+
response = await agent.chat("Help me create a PDF report")
|
|
111
|
+
print(response.content)
|
|
112
|
+
|
|
113
|
+
# Use slash commands
|
|
114
|
+
response = await agent.chat("/pdf extract text from invoice.pdf")
|
|
115
|
+
print(response.content)
|
|
116
|
+
|
|
117
|
+
asyncio.run(main())
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 3. Run Interactive Mode
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Run the demo
|
|
124
|
+
uv run python examples/agent_demo.py --interactive
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Commands in interactive mode:
|
|
128
|
+
- `/skills` - List all available skills
|
|
129
|
+
- `/pdf`, `/pptx`, etc. - Invoke specific skills
|
|
130
|
+
- `/clear` - Clear conversation history
|
|
131
|
+
- `/quit` - Exit
|
|
132
|
+
|
|
133
|
+
## Example Skills
|
|
134
|
+
|
|
135
|
+
The `examples/skills/` directory contains ready-to-use skills:
|
|
136
|
+
|
|
137
|
+
| Skill | Description | Tools |
|
|
138
|
+
|-------|-------------|-------|
|
|
139
|
+
| **pdf** | PDF text extraction, merging, splitting, form filling | pypdf, pdfplumber, reportlab |
|
|
140
|
+
| **pptx** | PowerPoint creation and editing | python-pptx, markitdown |
|
|
141
|
+
| **algorithmic-art** | Generative art with p5.js | p5.js, HTML/JS |
|
|
142
|
+
| **slack-gif-creator** | Animated GIF creation for Slack | PIL/Pillow |
|
|
143
|
+
| **web-artifacts-builder** | React + Tailwind + shadcn/ui apps | Node.js, Vite, pnpm |
|
|
144
|
+
|
|
145
|
+
### Testing Skills
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Run all skill tests
|
|
149
|
+
uv run python examples/test_skills.py
|
|
150
|
+
|
|
151
|
+
# Test individual skills interactively
|
|
152
|
+
uv run python examples/agent_demo.py --interactive
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Skill Definition Format
|
|
156
|
+
|
|
157
|
+
Create `skills/my-skill/SKILL.md`:
|
|
158
|
+
|
|
159
|
+
```markdown
|
|
160
|
+
---
|
|
161
|
+
name: my-skill
|
|
162
|
+
description: "A helpful skill for doing things"
|
|
163
|
+
metadata:
|
|
164
|
+
emoji: "🔧"
|
|
165
|
+
requires:
|
|
166
|
+
bins: ["some-cli"]
|
|
167
|
+
env: ["API_KEY"]
|
|
168
|
+
primary_env: "API_KEY"
|
|
169
|
+
user-invocable: true
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
# My Skill
|
|
173
|
+
|
|
174
|
+
Instructions for the LLM on how to use this skill...
|
|
175
|
+
|
|
176
|
+
Process: $ARGUMENTS
|
|
177
|
+
Current git branch: !`git branch --show-current`
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Skill Metadata Options
|
|
181
|
+
|
|
182
|
+
```yaml
|
|
183
|
+
---
|
|
184
|
+
name: skill-name # Unique identifier (≤64 chars, lowercase+digits+hyphens)
|
|
185
|
+
description: "Brief desc" # One-line description for LLM (≤1024 chars)
|
|
186
|
+
|
|
187
|
+
# Claude Agent Skills extensions
|
|
188
|
+
model: claude-sonnet-4-5-20250514 # Per-skill model override
|
|
189
|
+
context: fork # "fork" to run in isolated subagent
|
|
190
|
+
argument-hint: "<query>" # Autocomplete hint for slash commands
|
|
191
|
+
allowed-tools: # Restrict tools available during skill execution
|
|
192
|
+
- Read
|
|
193
|
+
- Grep
|
|
194
|
+
- Glob
|
|
195
|
+
hooks: # Per-skill lifecycle hooks
|
|
196
|
+
PreToolExecution: "echo pre"
|
|
197
|
+
PostToolExecution: "echo post"
|
|
198
|
+
|
|
199
|
+
metadata:
|
|
200
|
+
emoji: "🔧" # Visual indicator
|
|
201
|
+
homepage: "https://..." # Project URL
|
|
202
|
+
always: false # Always include (override eligibility)
|
|
203
|
+
|
|
204
|
+
requires:
|
|
205
|
+
bins: # Required binaries (ALL must exist)
|
|
206
|
+
- git
|
|
207
|
+
- gh
|
|
208
|
+
any_bins: # At least ONE must exist
|
|
209
|
+
- npm
|
|
210
|
+
- pnpm
|
|
211
|
+
env: # Required environment variables
|
|
212
|
+
- GITHUB_TOKEN
|
|
213
|
+
os: # Supported platforms
|
|
214
|
+
- darwin
|
|
215
|
+
- linux
|
|
216
|
+
|
|
217
|
+
primary_env: "API_KEY" # Primary env var for API key injection
|
|
218
|
+
|
|
219
|
+
user-invocable: true # Can user invoke via /skill-name
|
|
220
|
+
disable-model-invocation: false # Hide from LLM system prompt
|
|
221
|
+
---
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Variable Substitution
|
|
225
|
+
|
|
226
|
+
Skill content supports dynamic placeholders:
|
|
227
|
+
|
|
228
|
+
| Placeholder | Description |
|
|
229
|
+
|-------------|-------------|
|
|
230
|
+
| `$ARGUMENTS` | Full arguments string passed to the skill |
|
|
231
|
+
| `$1`, `$2`, ... `$N` | Individual positional arguments (whitespace-split) |
|
|
232
|
+
| `${CLAUDE_SESSION_ID}` | Current session ID |
|
|
233
|
+
| `` !`command` `` | Replaced with command's stdout before sending to LLM |
|
|
234
|
+
|
|
235
|
+
## API Reference
|
|
236
|
+
|
|
237
|
+
### AgentRunner
|
|
238
|
+
|
|
239
|
+
```python
|
|
240
|
+
from skillengine import AgentRunner, AgentConfig, create_agent
|
|
241
|
+
|
|
242
|
+
# Quick creation
|
|
243
|
+
agent = await create_agent(
|
|
244
|
+
skill_dirs=[Path("./skills")],
|
|
245
|
+
system_prompt="You are helpful.",
|
|
246
|
+
watch_skills=True,
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
# Or with full config
|
|
250
|
+
config = AgentConfig(
|
|
251
|
+
model="MiniMax-M2.1",
|
|
252
|
+
base_url="https://api.minimaxi.com/v1",
|
|
253
|
+
api_key="...",
|
|
254
|
+
max_turns=20,
|
|
255
|
+
enable_tools=True,
|
|
256
|
+
skill_description_budget=16000, # Max chars for skill descriptions in system prompt
|
|
257
|
+
)
|
|
258
|
+
agent = AgentRunner(engine, config)
|
|
259
|
+
|
|
260
|
+
# Methods
|
|
261
|
+
response = await agent.chat("Hello") # Single message
|
|
262
|
+
response = await agent.chat("/pdf help") # Slash command
|
|
263
|
+
async for chunk in agent.chat_stream("Hi"): # Streaming
|
|
264
|
+
print(chunk, end="")
|
|
265
|
+
await agent.run_interactive() # Interactive mode
|
|
266
|
+
|
|
267
|
+
# Skill validation
|
|
268
|
+
errors = AgentRunner.validate_skill(skill)
|
|
269
|
+
if errors:
|
|
270
|
+
print(f"Invalid skill: {errors}")
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Skill Tool (On-Demand Loading)
|
|
274
|
+
|
|
275
|
+
The LLM automatically gets a `skill` tool that loads full skill content on demand:
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
Tools available to LLM:
|
|
279
|
+
- execute # Run shell commands
|
|
280
|
+
- execute_script # Run multi-line scripts
|
|
281
|
+
- skill # Load skill content on demand (name, arguments)
|
|
282
|
+
- <skill>:<action> # Deterministic skill actions
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Only skill names and descriptions are in the system prompt. The LLM calls `skill(name="pdf", arguments="report.pdf")` to load the full SKILL.md content when needed.
|
|
286
|
+
|
|
287
|
+
### SkillsEngine (Low-level)
|
|
288
|
+
|
|
289
|
+
```python
|
|
290
|
+
from skillengine import SkillsEngine, SkillsConfig
|
|
291
|
+
|
|
292
|
+
engine = SkillsEngine(
|
|
293
|
+
config=SkillsConfig(
|
|
294
|
+
skill_dirs=[Path("./skills")],
|
|
295
|
+
watch=True,
|
|
296
|
+
)
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
# Load and filter skills
|
|
300
|
+
snapshot = engine.get_snapshot()
|
|
301
|
+
print(f"Loaded {len(snapshot.skills)} skills")
|
|
302
|
+
print(snapshot.prompt) # For LLM system prompt
|
|
303
|
+
|
|
304
|
+
# Execute commands
|
|
305
|
+
result = await engine.execute("echo 'Hello'")
|
|
306
|
+
print(result.output)
|
|
307
|
+
|
|
308
|
+
# With environment injection
|
|
309
|
+
with engine.env_context():
|
|
310
|
+
result = await engine.execute("gh pr list")
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Configuration
|
|
314
|
+
|
|
315
|
+
### Environment Variables
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
# LLM API
|
|
319
|
+
OPENAI_BASE_URL=https://api.minimaxi.com/v1
|
|
320
|
+
OPENAI_API_KEY=your-key
|
|
321
|
+
MINIMAX_MODEL=MiniMax-M2.1
|
|
322
|
+
|
|
323
|
+
# Or standard OpenAI
|
|
324
|
+
OPENAI_API_KEY=your-openai-key
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### YAML Config
|
|
328
|
+
|
|
329
|
+
```yaml
|
|
330
|
+
skill_dirs:
|
|
331
|
+
- ./skills
|
|
332
|
+
- ~/.agent/skills
|
|
333
|
+
|
|
334
|
+
watch: true
|
|
335
|
+
watch_debounce_ms: 250
|
|
336
|
+
|
|
337
|
+
entries:
|
|
338
|
+
github:
|
|
339
|
+
enabled: true
|
|
340
|
+
api_key: "ghp_..."
|
|
341
|
+
env:
|
|
342
|
+
GITHUB_ORG: "my-org"
|
|
343
|
+
|
|
344
|
+
prompt_format: xml # xml, markdown, or json
|
|
345
|
+
default_timeout_seconds: 30
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## Architecture
|
|
349
|
+
|
|
350
|
+
```
|
|
351
|
+
┌─────────────────────────────────────────────────┐
|
|
352
|
+
│ AgentRunner │
|
|
353
|
+
│ - System prompt: skill names + descriptions │
|
|
354
|
+
│ - Skill tool: on-demand full content loading │
|
|
355
|
+
│ - $ARGUMENTS substitution + !`cmd` injection │
|
|
356
|
+
│ - context: fork → isolated child agent │
|
|
357
|
+
│ - Slash commands (/pdf, /pptx) │
|
|
358
|
+
│ - Per-skill model switching + tool restriction │
|
|
359
|
+
├─────────────────────────────────────────────────┤
|
|
360
|
+
│ SkillsEngine │
|
|
361
|
+
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
362
|
+
│ │ Loader │ │ Filter │ │ Runtime │ │
|
|
363
|
+
│ └────┬────┘ └────┬────┘ └────┬────┘ │
|
|
364
|
+
│ │ │ │ │
|
|
365
|
+
│ v v v │
|
|
366
|
+
│ ┌─────────────────────────────────────┐ │
|
|
367
|
+
│ │ SkillSnapshot │ │
|
|
368
|
+
│ │ - skills: List[Skill] │ │
|
|
369
|
+
│ │ - prompt: str (metadata only) │ │
|
|
370
|
+
│ └─────────────────────────────────────┘ │
|
|
371
|
+
└─────────────────────────────────────────────────┘
|
|
372
|
+
│
|
|
373
|
+
v
|
|
374
|
+
┌─────────────────────────────────────────────────┐
|
|
375
|
+
│ LLM Providers │
|
|
376
|
+
│ OpenAI │ MiniMaxi │ Anthropic │ Custom │
|
|
377
|
+
└─────────────────────────────────────────────────┘
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
## Extending
|
|
381
|
+
|
|
382
|
+
### Custom Loader
|
|
383
|
+
|
|
384
|
+
```python
|
|
385
|
+
from skillengine.loaders import SkillLoader
|
|
386
|
+
|
|
387
|
+
class YAMLSkillLoader(SkillLoader):
|
|
388
|
+
def can_load(self, path: Path) -> bool:
|
|
389
|
+
return path.suffix == ".yaml"
|
|
390
|
+
|
|
391
|
+
def load_skill(self, path: Path, source: SkillSource) -> SkillEntry:
|
|
392
|
+
# Custom loading logic
|
|
393
|
+
...
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### Custom Filter
|
|
397
|
+
|
|
398
|
+
```python
|
|
399
|
+
from skillengine.filters import SkillFilter
|
|
400
|
+
|
|
401
|
+
class TeamSkillFilter(SkillFilter):
|
|
402
|
+
def filter(self, skill, config, context) -> FilterResult:
|
|
403
|
+
if "team-only" in skill.metadata.tags:
|
|
404
|
+
if not self.is_team_member():
|
|
405
|
+
return FilterResult(skill, False, "Team members only")
|
|
406
|
+
return FilterResult(skill, True)
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Custom Runtime
|
|
410
|
+
|
|
411
|
+
```python
|
|
412
|
+
from skillengine.runtime import SkillRuntime
|
|
413
|
+
|
|
414
|
+
class DockerRuntime(SkillRuntime):
|
|
415
|
+
async def execute(self, command, cwd, env, timeout):
|
|
416
|
+
# Execute in Docker container
|
|
417
|
+
...
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
## Development
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
# Clone and install
|
|
424
|
+
git clone https://github.com/sawzhang/skillengine.git
|
|
425
|
+
cd skillengine
|
|
426
|
+
uv sync
|
|
427
|
+
|
|
428
|
+
# Run tests
|
|
429
|
+
pytest
|
|
430
|
+
|
|
431
|
+
# Run skill tests
|
|
432
|
+
uv run python examples/test_skills.py
|
|
433
|
+
|
|
434
|
+
# Linting
|
|
435
|
+
ruff check src/
|
|
436
|
+
ruff format src/
|
|
437
|
+
mypy src/
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
## License
|
|
441
|
+
|
|
442
|
+
MIT License - see [LICENSE](LICENSE) for details.
|