oclif-plugin-development

Implements oclif CLI plugins with TypeScript commands, hooks, manifests, and QA evidence.

Updated Dec 1, 2025
One-click install
npx skills add https://github.com/jterratsdev/smart-deployment --skill oclif-plugin-development-jterratsdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: oclif-plugin-development
Source: https://github.com/jterratsdev/smart-deployment/tree/main/skills/oclif-plugin-development
Command: npx skills add https://github.com/jterratsdev/smart-deployment --skill oclif-plugin-development-jterratsdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building CLI plugins with oclif often leads to bloated command classes, inconsistent contracts, missing hook semantics, and untested package releases. This Skill provides a structured set of standards for designing, implementing, testing, and releasing oclif-based plugins with clean architecture and verifiable quality evidence. ## Core Features & Use Cases - Command and Hook Standards: Enforces logicless command classes that delegate to domain services, with typed flags, stable stdout/stderr/exit codes, and JSON output contracts. - Plugin Capability Manifests: Defines contracts covering plugin id, commands, hooks, permissions, configuration schema, host compatibility, and deprecation policy. - Security and QA Evidence: Mandates safe shell execution with spawn/execFile, path and URL validation, least-privilege permissions, plus test evidence for CLI behavior, hooks, and React/Vite UI surfaces. - Use Case: When adding a new command to an Open Orchestra plugin, use this Skill to structure the command class, define its manifest entry, write contract tests, and produce release-ready QA evidence. ## Quick Start Ask the assistant to scaffold a new oclif command with typed flags, a manifest entry, and contract tests following the plugin development standards.

Frequently Asked Questions about oclif-plugin-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an oclif command class in TypeScript?

Keep oclif command classes nearly logicless: parse typed flags and args, call one domain service or use-case, format output, and map expected errors to user-safe messages. Business rules, retries, and persistence belong in services, not the command layer.

What should an oclif plugin manifest include?

A plugin capability manifest should declare the plugin id, commands, hooks, capabilities, required permissions, configuration schema and defaults, UI contributions, evidence types, host version compatibility, security constraints, and ownership or deprecation policy.

How do I safely execute shell commands in a CLI plugin?

Use spawn or execFile with argument arrays instead of interpolating shell strings. Validate file paths against traversal, validate URLs before network calls, and never hardcode secrets or credentials in plugin manifests.

Does oclif plugin development support React and Vite UI surfaces?

Yes, plugin UI contributions can use React with TypeScript and Vite for local dev and build when the host package supports it. Separate presentation, state, API access, and domain logic, and cover UI flows with Playwright evidence.

What QA evidence is needed before releasing a CLI plugin?

Prove command exit codes, stdout, stderr, and JSON contracts; flags validation and help output; hook ordering, idempotency, and failure behavior; install/link/package smoke; host compatibility; and Playwright traces when UI is involved.