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.0.tar.gz (13.3 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.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openrein_contrib-0.6.0.tar.gz
  • Upload date:
  • Size: 13.3 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.0.tar.gz
Algorithm Hash digest
SHA256 9c0f570f965375054604ca7b391bb5f30ec27e34b3af1f054de3aaccaafdb8f8
MD5 95146d775da04b2c608cf30ed45025e9
BLAKE2b-256 06135d273dc8dbab824bb89c1e4172e377a3e9788305945f71f82014cedca43f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrein_contrib-0.6.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openrein_contrib-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95830cff4fd1009a19c5a0d5e8dc4d3102ea255af6b515b234efe07fc8f4c83d
MD5 50ae8c2bfc43e84623aca9488fbb1f77
BLAKE2b-256 94df78b2dc9e99c0a072cc7b00faee4d0dd9b346f598480944bec28dfd352b1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrein_contrib-0.6.0-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