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 tools —
file_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
- 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.
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skill_runner-0.1.3.tar.gz.
File metadata
- Download URL: skill_runner-0.1.3.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16be40201fa34b474c53d80b807b942e1ff3e129240685bff4eb3e18ed0b7ee5
|
|
| MD5 |
eba8c504c40b92dca8feabfd096b6d75
|
|
| BLAKE2b-256 |
2386a8157ba65d7a060873886e4fc33932bbe6de9d454d6d21237b4b84f61b9c
|
File details
Details for the file skill_runner-0.1.3-py3-none-any.whl.
File metadata
- Download URL: skill_runner-0.1.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6954901eb7fd0bc0a2bd7f255a1db833a7ec86dcb4c0d946d6a11e5ef5f6f413
|
|
| MD5 |
b83793c0b988b7ee57aff3da15d4d3ff
|
|
| BLAKE2b-256 |
21ce59d0f05671a49f62d83df351e812adf0e84553f82ffb64090e8c83489347
|