Skip to main content

Minimal headless agent that executes skill.md files via OpenAI-compatible Chat Completion API

Project description

skill-runner

Minimal headless agent (~500 LOC) that executes skill.md files via any OpenAI-compatible Chat Completion API.

Features

  • skill.md as system prompt — write instructions in Markdown with optional YAML front matter
  • 6 built-in toolsfile_read, file_write, file_patch, bash, grep, glob
  • Agentic loop — calls API → parses tool_calls → executes → feeds back → repeats
  • Zero dependencies — stdlib only (no pip install needed beyond the package itself)
  • Any OpenAI-compatible API — OpenAI, Azure, local LLMs, etc.

Install

pip install skill-runner

Quick Start

  1. Create a skill file (hello.md):
---
tools: [bash]
max_turns: 3
---
# Hello Skill

You are a friendly assistant. Greet the user and run `echo "Hello!"` to demonstrate tools.
  1. Run it:
echo "Hi there" | skill-runner --skill hello.md

Usage

# Pipe input via stdin
echo "Review this code" | skill-runner --skill review.md

# Read input from file
skill-runner --skill review.md --input diff.txt

# Write output to file
skill-runner --skill review.md --input diff.txt --output result.json

# Custom API endpoint and model
skill-runner --skill review.md --input diff.txt \
  --api-base https://api.example.com/v1 \
  --model gpt-4o-mini

# Limit agent loop turns
skill-runner --skill review.md --input diff.txt --max-turns 10

Environment Variables

Variable Description Default
SKILL_RUNNER_BASE_URL API base URL OpenAI default
SKILL_RUNNER_API_KEY API key OPENAI_API_KEY fallback
SKILL_RUNNER_MODEL Model name gpt-4o

CLI flags (--api-base, --model) override environment variables.

skill.md Format

A skill file is Markdown with an optional YAML front matter block:

---
tools: [file_read, bash, grep]
max_turns: 20
---
# Your Skill Name

System prompt instructions go here...

Front matter fields:

Field Type Default Description
tools list all 6 tools Which tools to enable
max_turns int 50 Max agent loop iterations

Available tools: file_read, file_write, file_patch, bash, grep, glob

GitHub Actions Example

Use skill-runner for automated code review in CI:

- name: Install skill-runner
  run: pip install skill-runner

- name: Run AI review
  run: |
    git diff origin/main...HEAD | skill-runner \
      --skill skills/code-review.md \
      --output /tmp/review.txt
  env:
    SKILL_RUNNER_API_KEY: ${{ secrets.LLM_API_KEY }}
    SKILL_RUNNER_MODEL: gpt-4o-mini

See examples/ai-review.yml for a complete workflow.

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

skill_runner-0.1.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

skill_runner-0.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file skill_runner-0.1.1.tar.gz.

File metadata

  • Download URL: skill_runner-0.1.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for skill_runner-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7d7e68aebc8cf5d36b8ae15e55fa53cee04f4fec0bed299645e0ef1fd9dfd5bb
MD5 34de6a073abe27154971619030414503
BLAKE2b-256 7cf0ec97c7b26c59a4a0c0d2c0e05acf9b999d98b2bc57a75516d86ef386b603

See more details on using hashes here.

File details

Details for the file skill_runner-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: skill_runner-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for skill_runner-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac26cf0098dc8ae2bced56e0ac311da8900f3d7c1b6069417809d23573903f1c
MD5 9d0589bca80027c3a898d81056919421
BLAKE2b-256 978a075e5556e66135593d06a73b38d936e890be81d671958f7f5053ececfe2d

See more details on using hashes here.

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