michael-denyer/pstack-claude / plugins/pstack/skills/poteto-mode
poteto-mode
Verifiedpoteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.
scripts/watch-pr/shipping-cli.ts
View on GitHubimport { readFile } from "node:fs/promises";
import { Command, CommanderError } from "commander";
import { WatchDeadline } from "./deadline.ts";
import { runJson } from "./github.ts";
import { object, parseContext } from "./landing.ts";
import {
GhShippingService,
cancelPending,
inspectLanding,
parseLandingRecord,
type ShippingResult,
} from "./shipping.ts";
export async function main(argv: readonly string[]): Promise<number> {
let result: ShippingResult | undefined;
const deadline = new WatchDeadline(60, () => performance.now() / 1000);
const service = new GhShippingService((args) => runJson(args, deadline));
const cli = new Command("ship-pr").exitOverride();
cli.description(
"Inspect a landing record or cancel its pending merge mechanisms. Never merges or rewrites branches."
);
cli
.command("inspect")
.requiredOption("--repo <owner/repo>")
.requiredOption("--pr <number>")
.action(async (options: { repo: string; pr: string }) => {
const parts = options.repo.split("/");
if (parts.length !== 2) throw new Error("--repo must be owner/repo");
const context = parseContext({
owner: parts[0],
repo: parts[1],
number: Number(options.pr),
});
result = await inspectLanding(service, context);
});
cli
.command("cancel-pending")
.requiredOption(
"--record <file>",
"JSON output from inspect or a successful cancellation"
)
.action(async (options: { record: string }) => {
const input = object(
JSON.parse(await readFile(options.record, "utf8")),
"saved inspection"
);
if (input.kind !== "inspected" && input.kind !== "cancelled")
throw new Error(
"record must contain a successful inspection or cancellation"
);
result = await cancelPending(service, parseLandingRecord(input.record));
});
try {
await cli.parseAsync(argv, { from: "user" });
if (!result) return 64;
} catch (error) {
if (error instanceof CommanderError) return error.exitCode === 0 ? 0 : 64;
result = {
kind: "unavailable",
detail: error instanceof Error ? error.message : String(error),
};
}
process.stdout.write(`${JSON.stringify(result)}\n`);
return result.kind === "inspected" || result.kind === "cancelled" ? 0 : 1;
}
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: 470k | 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 |