foxytanuki/pstack-opencodex / upstream/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/fakes.test-helper.ts
View on GitHubimport type {
Check,
ChecksFastPath,
CommitRollup,
GitHubReader,
OpenPullRequest,
PrContext,
PullRequestFacts,
Repository,
ReviewThread,
RollupPage,
} from "./types.ts";
import { parsePrNumber } from "./types.ts";
export interface FakeReaderOptions {
readonly facts?: Partial<Omit<PullRequestFacts, "context">>;
readonly fastPath?: ChecksFastPath;
readonly rollupPages?: readonly RollupPage[];
readonly threads?: readonly ReviewThread[];
readonly commitRollups?: readonly CommitRollup[];
readonly openPullRequests?: readonly OpenPullRequest[];
readonly origin?: Repository | null;
readonly current?: PrContext;
}
export function passingCheck(name = "ci"): Check {
return {
kind: "passed",
name,
reportedState: "SUCCESS",
description: "",
link: "",
workflow: "",
};
}
export function pendingCheck(name = "ci"): Check {
return {
kind: "pending",
name,
reportedState: "PENDING",
description: "",
link: "",
workflow: "",
};
}
export function failedCheck(name = "ci"): Check {
return {
kind: "failed",
name,
reportedState: "FAILURE",
description: "",
link: "",
workflow: "",
};
}
export function fakeReader(
options: FakeReaderOptions = {}
): GitHubReader & { readonly calls: readonly string[] } {
const calls: string[] = [];
const context = options.current ?? {
owner: "owner",
repo: "repo",
number: parsePrNumber(1),
};
const defaults: PullRequestFacts = {
context,
mergeable: "MERGEABLE",
mergeStateStatus: "CLEAN",
reviewDecision: "APPROVED",
headRefOid: "head",
headRefName: "feature",
baseRefName: "main",
state: "OPEN",
mergedAt: null,
isDraft: false,
};
let page = 0;
return {
calls,
async originRepo() {
calls.push("originRepo");
return options.origin === undefined
? { owner: "owner", repo: "repo" }
: options.origin;
},
async currentPr(pr) {
calls.push("currentPr");
return { ...context, number: pr ?? context.number };
},
async pullRequest(requested) {
calls.push("pullRequest");
return { ...defaults, ...options.facts, context: requested };
},
async openPullRequests() {
calls.push("openPullRequests");
return options.openPullRequests ?? [];
},
async checksFastPath() {
calls.push("checksFastPath");
return options.fastPath ?? { kind: "checks", checks: [passingCheck()] };
},
async checkRollupPage(_requested, after) {
calls.push(`checkRollupPage:${after ?? "null"}`);
return options.rollupPages?.[page++] ?? { checks: [], endCursor: null };
},
async reviewThreads() {
calls.push("reviewThreads");
return options.threads ?? [];
},
async commitRollups() {
calls.push("commitRollups");
return options.commitRollups ?? [{ oid: "head", state: "SUCCESS" }];
},
};
}
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 |