Skip to main content

cmdop-skill

cmdop-skill

Build and publish CMDOP skills.

Install

pip install cmdop-skill

Quick Start

Scaffold a new skill

cmdop-skill init

Interactive wizard: name (with PyPI availability check), description, author.

Or write 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() auto-resolves name, version, description from the nearest pyproject.toml. Explicit arguments still win.

Core Features

Feature Description
@skill.command Turn async/sync functions into CLI subcommands
Arg() Declarative arguments: help, required, default, choices, nargs, action
@skill.setup / @skill.teardown Lifecycle hooks (run before/after every command)
SkillCache Typed disk cache with TTL, scoped per skill — docs
TestClient Test harness: client.run("cmd", key=val) / client.run_cli("cmd --flag")
JSON output All commands return {"ok": true, ...} — exit 0 on success, exit 1 on error
Auto src/ path src/ added to sys.path automatically
Single source of truth name, version, description from pyproject.toml, no duplication

SkillCache

Built-in typed disk cache — no extra dependencies, platform-aware paths:

from cmdop_skill import SkillCache

cache = SkillCache("my-skill")
cache.set("data", payload, ttl=86400)   # 24 hours
data = cache.get("data")                # None if missing or expired

Paths: ~/Library/Caches/cmdop/skills/<skill>/ (macOS), ~/.cache/cmdop/skills/<skill>/ (Linux). Full reference → @docs/cache.md

Skill Structure

my-skill/
├── pyproject.toml
├── Makefile
├── README.md
├── skill/
│   ├── config.py       # SkillConfig manifest (required)
│   └── readme.md       # description shown in marketplace
├── src/my_skill/
│   ├── __init__.py
│   └── ...
└── tests/

skill/config.py — minimal manifest:

from cmdop_skill import SkillConfig

config = SkillConfig()  # all fields auto-resolved from pyproject.toml

CLI

Command Description
init [path] Scaffold a new skill project
install <path> Symlink skill into system skills directory
uninstall <name> Remove skill
bump [--minor|--major] Bump version in pyproject.toml
check-name <name> Check PyPI availability
release [--no-bump|--no-publish] Bump + build + PyPI + CMDOP
publish [--path] Publish to CMDOP marketplace
list List your published skills
config set-key / show / reset Manage API key

API key resolution order: --api-key flag → CMDOP_API_KEY env → saved config → interactive prompt.

Python API

Export Description
Skill Main class — registers commands, runs CLI
Arg Argument descriptor
SkillConfig Typed skill manifest (Pydantic model)
SkillCache Disk cache — see @docs/cache.md
CacheEntry Pydantic model for a cached value with metadata
TestClient Test harness
resolve_project_meta Resolve name/version/description from pyproject.toml
generate_manifest Generate skill/config.py content
publish_skill Programmatic publish
json_output / wrap_result / format_error Output helpers
scaffold.ScaffoldConfig / scaffold.scaffold_skill Programmatic scaffolding

Developer Docs

Deep-dive references in @docs/:

Metadata

Release files for cmdop-skill 2026.4.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmdop-skill 2026.4.7.2
File Size Uploaded Provenance Actions
cmdop_skill-2026.4.7.2.tar.gz 52.6 kB Without provenance Details for cmdop_skill-2026.4.7.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cmdop-skill 2026.4.7.2
File Interpreter ABI Platform Actions
cmdop_skill-2026.4.7.2-py3-none-any.whl Python 3 none any Details for cmdop_skill-2026.4.7.2-py3-none-any.whl

Total release size: 126.1 kB

Release files / cmdop_skill-2026.4.7.2.tar.gz

Download URL cmdop_skill-2026.4.7.2.tar.gz
Size 52.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4fcb288d7728b7043d948628e4b52fc023bd3e8537771387b35fed9cb895a1b6
BLAKE2b-256 checksum
How to use checksums
e9c0883673f4624125ae8ef6464b2d1700d196e07a99f181f80cca479d72cf39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release files / cmdop_skill-2026.4.7.2-py3-none-any.whl

Download URL cmdop_skill-2026.4.7.2-py3-none-any.whl
Size 73.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebfaf1237b859bcf816cd375b42ad2f7538462e073378229ff320d0a4fa05df4
BLAKE2b-256 checksum
How to use checksums
7749f4f82c3a21f70bd4f89962ff3dce540333f390725aad7b36dda055d2f195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Security for cmdop-skill 2026.4.7.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page