Skip to main content

Community Skills and Tools for openrein

Project description

openrein-contrib

Community Skills and Tools for openrein.

Installation

pip install openrein openrein-contrib

Quick Start

import openrein
import openrein.contrib as contrib

# See what's available
print(contrib.list_skills())   # ['powerpoint', ...]
print(contrib.list_tools())    # ['powerpoint', ...]

# Set up an engine with what you need
engine = openrein.Engine()
contrib.add_skill(engine, 'powerpoint')
contrib.add_tool(engine, 'powerpoint')

PowerPoint Add-in

openrein-contrib includes a PowerPoint Office Add-in that bridges your Python agent to PowerPoint via Office.js. The bridge server starts automatically when you import the package.

Setup

  1. Import the package — the bridge server starts on localhost:19876

    import openrein.contrib  # server starts here
    
  2. Load the Add-in in PowerPoint

    • Open PowerPoint
    • Insert → Add-ins → My Add-ins → ... → Upload Add-in
    • Select: <site-packages>/openrein_contrib-*.dist-info/../addin/powerpoint/manifest.xml

    Or find the path: python -c "import openrein.contrib.tools.powerpoint as p; print(p._ADDIN_DIR)"

  3. Open the OpenRein taskpane in PowerPoint → status shows "openrein connected"

PowerPoint Pack

import openrein
import openrein.contrib as contrib

engine = openrein.Engine()
contrib.add_skill(engine, 'powerpoint')   # loads PowerPoint workflow guide
contrib.add_tool(engine, 'powerpoint')    # registers 8 PowerPoint tools

Available tools:

Tool Description
ppt_get_context Get slide count and document state
ppt_command Office.js commands (add_slide, set_background, etc.)
ppt_list_shapes List all shapes with id, position, size, text, fill
ppt_edit_xml Edit slide OOXML directly via JSZip (primary tool)
ppt_edit_chart Insert/replace charts via OOXML
ppt_verify Check layout quality (coverage, gaps, overlaps, contrast)
ppt_screenshot Take a slide screenshot for visual verification
ppt_set_z_order Change shape stacking order

Writing a New Tool

  1. Create openrein/contrib/tools/<name>.py
import openrein

class _Tool(openrein.ToolBase):
    def name(self) -> str:          return "my_tool"
    def description(self) -> str:   return "Does something useful."
    def input_schema(self) -> dict:
        return {
            "type": "object",
            "properties": {
                "input": {"type": "string", "description": "Input value"},
            },
            "required": ["input"],
        }
    def call(self, input: dict) -> str:
        return f"Result: {input['input']}"


def create_my_tools() -> list[openrein.ToolBase]:
    return [_Tool()]
  1. Register in openrein/contrib/tools/__init__.py:
from openrein.contrib.tools.my_module import create_my_tools
  1. Register in openrein/contrib/__init__.py _TOOL_FACTORIES:
_TOOL_FACTORIES = {
    "powerpoint": "openrein.contrib.tools.powerpoint.create_powerpoint_tools",
    "my_module":  "openrein.contrib.tools.my_module.create_my_tools",
}

Writing a New Skill

Add a Markdown file to openrein/contrib/skills/<name>.md:

---
description: One-line description of what this skill does
when_to_use: When should the agent use this skill
---

# Skill Title

Instructions and workflow patterns for the agent...

Skills are automatically discovered by list_skills() and loaded by add_skill().


License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openrein_contrib-0.6.1.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openrein_contrib-0.6.1-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file openrein_contrib-0.6.1.tar.gz.

File metadata

  • Download URL: openrein_contrib-0.6.1.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openrein_contrib-0.6.1.tar.gz
Algorithm Hash digest
SHA256 28887a03f40414cb6a38d8fb924e7420a8e721681431d57b162f9d73db0afccd
MD5 5ed557f657ed5c3d8821c3b9c56b8a6a
BLAKE2b-256 c76be6f644ea20e1fa8d459e035524aeb1156ba831f801f4eb4062911c5d0335

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrein_contrib-0.6.1.tar.gz:

Publisher: build.yml on kurt01124/openrein-contrib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrein_contrib-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for openrein_contrib-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 42540b5f341f2d8d9355d4e588e08ad7ee0b9ed694eac50e6e20fd7e9c4614dd
MD5 11b6a6fde05fb301c3e5ea072a7c42c6
BLAKE2b-256 864485beb9e09b10bf3f6aaa3ca450c37b0ee24c423bceb037172880b0b1f717

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrein_contrib-0.6.1-py3-none-any.whl:

Publisher: build.yml on kurt01124/openrein-contrib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page