Skip to main content

Build and publish CMDOP skills

Project description

cmdop-skill

Build and publish CMDOP skills.

Install

pip install cmdop-skill

Quick Start

Create a new skill (scaffold wizard)

cmdop-skill init

Interactive wizard: name (with PyPI availability check), description, author. Category, tags, and visibility are determined automatically by the server during publish.

Or write one from scratch

from cmdop_skill import Skill, Arg

skill = Skill()  # name, version, description from pyproject.toml

@skill.command
async def greet(name: str = Arg(help="Who to greet", required=True)) -> dict:
    """Say hello."""
    return {"message": f"Hello, {name}!"}

if __name__ == "__main__":
    skill.run()

Skill() and SkillConfig() auto-resolve name, version, description from the nearest pyproject.toml. Explicit arguments still win:

skill = Skill(name="override-name")  # only name overridden, rest from pyproject.toml

Framework Features

  • @skill.command — turn async/sync functions into CLI subcommands
  • Arg() — declarative arguments with help, required, default, choices, nargs, action
  • @skill.setup / @skill.teardown — lifecycle hooks
  • TestClient — test harness for skills (client.run() and client.run_cli())
  • pyproject.toml as single source of truthname, version, description auto-resolved; no duplication
  • Auto src/ pathsrc/ is added to sys.path automatically
  • JSON output — all commands return {"ok": true, ...} by default

CLI Commands

Command Description
init [path] Scaffold a new skill project (interactive wizard)
install <path> Symlink skill into system skills directory
uninstall <name> Remove skill from system skills directory
run <path> <prompt> Run skill via cmdop SDK
test <path> Run pytest in skill directory
bump [path] Bump version in pyproject.toml (semver)
check-name <name> Check if package name is available on PyPI
release [path] Bump + build + upload to PyPI + publish to CMDOP
publish Publish skill to the CMDOP marketplace
list List your published skills
config set-key Save API key globally
config show Show saved config (key masked)
config reset Remove saved API key

init

cmdop-skill init                        # scaffold in current directory
cmdop-skill init ./skills               # scaffold in ./skills/

Also available programmatically:

from cmdop_skill.scaffold import ScaffoldConfig, scaffold_skill

config = ScaffoldConfig(name="my-skill", description="Does things")
files = scaffold_skill(config, target_dir=Path("."))

config

API key is resolved in order: --api-key flag > CMDOP_API_KEY env > saved config > interactive prompt.

cmdop-skill config set-key              # interactive (masked input)
cmdop-skill config set-key cmdop_xxx    # direct
cmdop-skill config show
cmdop-skill config reset

On auth errors (401/403), the CLI prompts for a new key and saves it automatically.

install / uninstall

cmdop-skill install ./skills/my-skill
# Installed my-skill -> ~/Library/Application Support/cmdop/skills/my-skill (symlink)

cmdop-skill uninstall my-skill

bump

cmdop-skill bump                        # patch: 0.1.0 -> 0.1.1
cmdop-skill bump --minor                # minor: 0.1.1 -> 0.2.0
cmdop-skill bump --major                # major: 0.2.0 -> 1.0.0

check-name

cmdop-skill check-name my-cool-skill
# my-cool-skill is available on PyPI

cmdop-skill check-name requests
# requests is taken on PyPI

release

cmdop-skill release                     # bump patch + build + PyPI + CMDOP
cmdop-skill release -b minor            # bump minor
cmdop-skill release --no-bump           # current version
cmdop-skill release --test-pypi         # TestPyPI only (skips CMDOP)
cmdop-skill release --no-publish        # PyPI only (skips CMDOP)

Publish

Only the skill name is required to create a skill on the marketplace. Everything else is automatic:

  • Category — determined by the server from manifest keywords
  • Tags — extracted from pyproject.toml keywords
  • Description — from README / pyproject.toml
  • Repository URL — from pyproject.toml
  • Visibility — public by default
  • Translations — generated server-side via LLM
cmdop-skill publish --path .            # publish to prod
cmdop-skill publish --mode local        # publish to localhost:8000
cmdop-skill publish --json              # CI mode (no interactive prompts)

Skill Structure

my-skill/
├── pyproject.toml
├── Makefile
├── README.md
├── .gitignore
├── skill/
│   ├── config.py            # SkillConfig manifest (required)
│   ├── skill.md             # skill system prompt / description
│   └── readme.md            # description for marketplace
├── src/my_skill/
│   ├── __init__.py
│   └── ...                  # your code
└── tests/

skill/config.py — minimal manifest:

from cmdop_skill import SkillConfig

config = SkillConfig()

All metadata (name, version, description) is auto-resolved from pyproject.toml. Category, tags, and visibility are determined automatically by the server during publish.

Python API

Export Description
Skill Main class — registers commands, runs CLI
Arg Argument descriptor with metadata
SkillConfig Typed skill manifest (pydantic model)
TestClient Test harness — await client.run("cmd", key=val) / await client.run_cli("cmd", "--flag")
resolve_project_meta Resolve name/version/description from nearest pyproject.toml
generate_manifest Generate skill/config.py content
publish_skill Programmatic publish to marketplace
json_output / wrap_result / format_error Output formatting helpers
scaffold.ScaffoldConfig Pydantic model for scaffold parameters
scaffold.scaffold_skill Generate a complete skill directory from config

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

cmdop_skill-2026.3.5.tar.gz (48.0 kB view details)

Uploaded Source

Built Distribution

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

cmdop_skill-2026.3.5-py3-none-any.whl (69.0 kB view details)

Uploaded Python 3

File details

Details for the file cmdop_skill-2026.3.5.tar.gz.

File metadata

  • Download URL: cmdop_skill-2026.3.5.tar.gz
  • Upload date:
  • Size: 48.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for cmdop_skill-2026.3.5.tar.gz
Algorithm Hash digest
SHA256 dd03f8efe84e167f13b94aa15d51ad5b9e238a9995267c2f7cd5ed774e167273
MD5 d55ebcb7b5c43b9a02ef044086b738c5
BLAKE2b-256 a63a878f28cf353f71ebea01dac6e8b04c2c05d0d1df33b60027c7803c7e6d67

See more details on using hashes here.

File details

Details for the file cmdop_skill-2026.3.5-py3-none-any.whl.

File metadata

  • Download URL: cmdop_skill-2026.3.5-py3-none-any.whl
  • Upload date:
  • Size: 69.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for cmdop_skill-2026.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 efc5ca404e6fcd8dbbd193e3990717d31cd5c06c64c821efdfbc854c82e2eb9c
MD5 ef95898dea390eb437f63dae14e1b8f4
BLAKE2b-256 db573ee93f4c90c6d54a5070d2270cf3d214e2223dff2617b26dcd6b83ce83c9

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