Cassiiopeia/projectops / skills/pro-skill-creator
pro-skill-creator
VerifiedCreate, review or improve a standard skill. Classifies intent as create/review/improve, then runs the matching phases. Use for 'make a skill', 'review this skill', 'improve this skill'.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.8 KB |
| references/anti_patterns.md | markdown | 4.4 KB |
| references/meta_principles.md | markdown | 5.1 KB |
| references/phase0_brainstorming.md | markdown | 8.6 KB |
| references/phase1_slots.md | markdown | 3.4 KB |
| references/phase2_question_format.md | markdown | 1.8 KB |
| references/phase4_checklist.md | markdown | 3.1 KB |
| references/phase6_report_format.md | markdown | 2.2 KB |
| references/review_improve.md | markdown | 4.0 KB |
| references/trigger_optimization.md | markdown | 2.6 KB |
| templates/config.json.example | other | 495 B |
| templates/python_cli_script.py | script | 3.9 KB |
templates/python_cli_script.py
View on GitHub#!/usr/bin/env python3
"""<scope>_cli — CLI for <skill name> (projectops 3-layer standard skeleton).
This file is the standard skeleton copied when creating a new skill.
3-layer architecture Layer 2 (`skills/<skill>/scripts/<scope>_cli.py`).
Standard (see `skills/references/script-invocation.md`):
- Layer 1 (`scripts/common/`): shared infrastructure (gh_client, config, paths, title etc.)
- Layer 2 (this file): 1 skill = 1 py = argparse subcommands
- Layer 3 (SKILL.md): self-contained 5-line Bash call
Usage:
1. Copy this file to skills/suh-<new>/scripts/<scope>_cli.py.
2. Replace the prog name + subcommands for the new skill.
3. Import shared logic as `from common.<module> import ...` (do not rewrite it).
4. Use the standard 5-line pattern in SKILL.md code blocks.
Call example (SKILL.md):
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
PYTHON=$(for _py in python3 python; do _path=$(command -v "$_py" 2>/dev/null) || continue; "$_path" -c "import sys; sys.exit(0)" 2>/dev/null && echo "$_path" && break; done)
[ -z "$PYTHON" ] && { echo "Python not found"; exit 1; }
cd "$PROJECT_ROOT/skills/<skill>/scripts" || exit 1
PYTHONIOENCODING=utf-8 "$PYTHON" <scope>_cli.py <subcommand> [args]
Output: every subcommand prints MCP-style JSON to stdout (4 fields required: ok/code/summary/next).
Write output strings (summary·error·next·argparse help) in English — comments and docstrings too (#769, #1212).
"""
from __future__ import annotations
import sys
import argparse
from pathlib import Path
# Bootstrap — adjust sys.path so scripts/common can be imported (works regardless of cwd)
_HERE = Path(__file__).resolve()
_PROJECT_ROOT = _HERE.parents[3] # skills/<x>/scripts/<x>_cli.py → 3 up = project root
_SCRIPTS_ROOT = _PROJECT_ROOT / "scripts"
if str(_SCRIPTS_ROOT) not in sys.path:
sys.path.insert(0, str(_SCRIPTS_ROOT))
from common.emit import emit # noqa: E402
# Shared logic imports for a new skill:
# from common.gh_client import GitHubAPIError, get_issue # noqa: E402
# from common.config import get_github_pat # noqa: E402
# =========================================================================
# Subcommand handlers
# =========================================================================
def cmd_example(args) -> int:
"""Example subcommand — echoes the argument back.
In a real skill, replace this function with domain logic:
- import common.gh_client to call the GitHub API
- auto-load the PAT with common.config get_github_pat()
- return the result dict via emit() (4 fields guaranteed)
"""
return emit({
"input": args.text,
"summary": f"Input: {args.text}",
# Add a next hint if needed:
# "next": f"another-cmd {args.text}",
})
# =========================================================================
# argparse setup
# =========================================================================
def build_parser() -> argparse.ArgumentParser:
"""argparse subparser definitions. Register new subcommands here."""
parser = argparse.ArgumentParser(
prog="<scope>_cli",
description="<skill name> skill CLI",
)
sub = parser.add_subparsers(dest="command", required=True)
p_ex = sub.add_parser("example", help="Example subcommand")
p_ex.add_argument("text")
p_ex.set_defaults(func=cmd_example)
# Pattern for adding a new subcommand:
# p_new = sub.add_parser("new-cmd", help="What the subcommand does")
# p_new.add_argument("owner")
# p_new.add_argument("repo")
# p_new.add_argument("--state", choices=["open", "closed"], default="open")
# p_new.set_defaults(func=cmd_new)
return parser
def main() -> int:
parser = build_parser()
args = parser.parse_args()
if not hasattr(args, "func"):
parser.print_help(sys.stderr)
return 1
return args.func(args)
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |