Skip to content

michael-denyer/pstack-claude / plugins/pstack/skills/poteto-mode

poteto-mode

Verified

poteto'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.

FileKindSize
SKILL.mdskill md18.2 KB
playbooks/authoring-a-skill.mdmarkdown852 B
playbooks/autonomous-run.mdmarkdown1.9 KB
playbooks/autopilot-full.mdmarkdown8.3 KB
playbooks/autopilot-stack.mdmarkdown1.3 KB
playbooks/babysit.mdmarkdown2.3 KB
playbooks/bug-fix.mdmarkdown4.8 KB
playbooks/eval.mdmarkdown2.8 KB
playbooks/feature.mdmarkdown3.4 KB
playbooks/hillclimb.mdmarkdown4.4 KB
playbooks/investigation.mdmarkdown920 B
playbooks/multi-phase-plan.mdmarkdown1.6 KB
playbooks/opening-a-pr.mdmarkdown1.0 KB
playbooks/pause-safely.mdmarkdown1.9 KB
playbooks/perf-issue.mdmarkdown1.5 KB
playbooks/prototype.mdmarkdown2.1 KB
playbooks/refactoring.mdmarkdown3.3 KB
playbooks/runtime-forensics.mdmarkdown1.3 KB
playbooks/session-pickup.mdmarkdown2.7 KB
playbooks/shipping.mdmarkdown7.2 KB
playbooks/trace-forensics.mdmarkdown1.8 KB
playbooks/visual-parity.mdmarkdown1.2 KB
playbooks/worktree-cleanup.mdmarkdown4.5 KB
references/agents/comment-sicko.mdmarkdown2.9 KB
references/agy-tools.mdmarkdown10.3 KB
references/bugbot-triage.mdmarkdown9.4 KB
references/codex-tools.mdmarkdown13.6 KB
references/copilot-tools.mdmarkdown20.6 KB
references/dsh-tools.mdmarkdown4.8 KB
references/grok.mdmarkdown3.9 KB
references/kimi-tools.mdmarkdown4.6 KB
references/licenses/LICENSEother1.1 KB
references/licenses/LICENSE-cursor-team-kitother1.0 KB
references/licenses/LICENSE-thermosother1.0 KB
references/licenses/NOTICE.mdmarkdown1.9 KB
references/merge-safety.mdmarkdown5.2 KB
references/minimax-tools.mdmarkdown10.2 KB
references/muse-tools.mdmarkdown12.5 KB
references/omp-tools.mdmarkdown6.8 KB
references/opencode-tools.mdmarkdown3.3 KB
references/pi-tools.mdmarkdown23.5 KB
references/resume-storage.mdmarkdown3.6 KB
scripts/.prettierignoreother652 B
scripts/.prettierrc.jsonconfig29 B
scripts/bootstrap.tsscript2.0 KB
scripts/bun.lockother6.5 KB
scripts/check-playbooks.mjsscript6.8 KB
scripts/codex-session-effort.mjsscript3.9 KB
scripts/package.jsonmanifest320 B
scripts/resume.mjsscript7.2 KB
scripts/tsconfig.jsonconfig304 B
scripts/watch-pr/check-suites.tsscript1.9 KB
scripts/watch-pr/cli.port.test.tsscript2.9 KB
scripts/watch-pr/cli.test.tsscript11.2 KB
scripts/watch-pr/cli.tsscript8.7 KB
scripts/watch-pr/deadline.tsscript522 B
scripts/watch-pr/fakes.test-helper.tsscript4.2 KB
scripts/watch-pr/fresh-install.test.tsscript1.3 KB
scripts/watch-pr/github.port.test.tsscript19.7 KB
scripts/watch-pr/github.test.tsscript16.6 KB
scripts/watch-pr/github.tsscript34.7 KB
scripts/watch-pr/head-checks.tsscript1.3 KB
scripts/watch-pr/integrity.test.tsscript24.3 KB
scripts/watch-pr/landing.tsscript3.0 KB
scripts/watch-pr/live-merge-safety.mjsscript7.4 KB
scripts/watch-pr/policy.port.test.tsscript29.0 KB
scripts/watch-pr/policy.test.tsscript14.8 KB
scripts/watch-pr/policy.tsscript29.6 KB
scripts/watch-pr/render.tsscript9.6 KB
scripts/watch-pr/ship-prexecutablescript220 B
scripts/watch-pr/shipping-cli.test.tsscript5.3 KB
scripts/watch-pr/shipping-cli.tsscript2.3 KB
scripts/watch-pr/shipping.test-helper.tsscript2.1 KB
scripts/watch-pr/shipping.test.tsscript11.0 KB
scripts/watch-pr/shipping.tsscript6.7 KB
scripts/watch-pr/transport.test.tsscript15.2 KB
scripts/watch-pr/tsconfig.jsonconfig270 B
scripts/watch-pr/types.compile.tsscript2.7 KB
scripts/watch-pr/types.tsscript15.0 KB
scripts/watch-pr/watch-prexecutablescript211 B
scripts/watch-pr/wrapper.test.tsscript587 B
scripts/worktree-audit.mjsexecutablescript22.4 KB
worker.mdmarkdown1.3 KB

scripts/check-playbooks.mjs

View on GitHub
#!/usr/bin/env node
import { existsSync, readdirSync, readFileSync, realpathSync, statSync } from "node:fs";
import { homedir } from "node:os";
import { dirname, join, resolve } from "node:path";
import process from "node:process";
import { fileURLToPath } from "node:url";

const BUNDLED = resolve(dirname(fileURLToPath(import.meta.url)), "../playbooks");
const CHANGE = /^ {0,3}(?:[-*]|\d+\.)\s+\*\*(?:After|Before|Replace|In)\*\*\s+"([^"]+)"/;
const CHANGE_VERB = /^ {0,3}(?:[-*]|\d+\.)\s+\*\*(?:After|Before|Replace|In)\*\*/;
const flat = (text) => text.replace(/\s+/g, " ");
// A frontmatter value as YAML reads a one-line scalar: trimmed, one pair of matching quotes removed.
const yamlScalar = (value) => value.trim().replace(/^(["'])(.*)\1$/, "$2").trim();

// Fields in project playbooks are one-line scalars, or a flow or block list of base names.
// A hash begins a YAML comment only after separation and outside a quoted scalar.
function fieldValue(line) {
  let quote = "";
  for (let i = 0; i < line.length; i++) {
    const c = line[i];
    if (quote) {
      if (quote === '"' && c === "\\") i++;
      else if (c === quote && quote === "'" && line[i + 1] === "'") i++;
      else if (c === quote) quote = "";
    } else if (c === "#" && (i === 0 || /\s/.test(line[i - 1]))) return line.slice(0, i).trim();
    else if ((c === "'" || c === '"') && /(?:^|\[|,)\s*$/.test(line.slice(0, i))) quote = c;
  }
  return line.trim();
}

function baseNames(front) {
  const field = /^extends:[ \t]*(.*)$/m.exec(front);
  if (!field) return [];
  const value = fieldValue(field[1]);
  if (value) return value.replace(/^\[(.*)\]$/, "$1").split(",").map(yamlScalar).filter(Boolean);
  const names = [];
  for (const line of front.slice(field.index + field[0].length).split("\n")) {
    if (!line.trim() || line.trimStart().startsWith("#")) continue;
    const item = /^ *- +(.*)$/.exec(line);
    if (!item) break;
    names.push(yamlScalar(fieldValue(item[1])));
  }
  return names;
}

// Fenced examples can contain both list items and shorter, fence-looking lines.
function* proseLines(body) {
  let fence;
  for (const line of body.split("\n")) {
    const marker = /^\s*(`{3,}|~{3,})(.*)$/.exec(line);
    if (fence) {
      if (marker && marker[1].startsWith(fence) && !marker[2].trim()) fence = undefined;
    } else if (marker && (marker[1][0] === "~" || !marker[2].includes("`"))) {
      fence = marker[1];
      yield "";
    } else yield line;
  }
}

function bundledSteps(body) {
  const steps = [];
  let current;
  let afterBlank = true;
  for (const line of proseLines(body)) {
    const start = /^(\d+[.)] +)(.*)$/.exec(line);
    if (start) {
      current = { indent: start[1].length, lines: [start[2]] };
      steps.push(current);
    } else if (current && line.trim()) {
      if (line.startsWith(" ".repeat(current.indent)) || (!afterBlank && !/^ {0,3}(?:#{1,6}[ \t]|[-*+] )/.test(line))) {
        current.lines.push(line.trim());
      } else current = undefined;
    }
    afterBlank = !line.trim();
  }
  return steps.length ? steps.map((step) => flat(step.lines.join(" "))) : proseBlocks(body);
}

// A playbook without numbered steps, such as opening-a-pr, writes each step as a paragraph or a list item.
function proseBlocks(body) {
  const blocks = [];
  let current;
  let paragraph = false;
  for (const line of proseLines(body)) {
    const item = /^ *(?:[-*+]|\d+[.)]) +(.*)$/.exec(line);
    if (!line.trim() || /^ {0,3}#{1,6}(?:[ \t]|$)/.test(line)) current = undefined;
    else if (current && paragraph && /^ {0,3}(?:=+|-+)[ \t]*$/.test(line)) {
      // A setext underline turns the paragraph above it into a heading; after a list item it is text or a break.
      blocks.pop();
      current = undefined;
    } else if (item || !current) {
      current = [item ? item[1] : line.trim()];
      paragraph = !item;
      blocks.push(current);
    } else current.push(line.trim());
  }
  return blocks.map((lines) => flat(lines.join(" ")));
}

export function checkPlaybooks(root, bundled = BUNDLED) {
  const dir = join(root, ".agents/playbooks");
  if (!existsSync(dir)) return [];
  const problems = [];
  for (const name of readdirSync(dir).filter((file) => file.endsWith(".md")).sort()) {
    const path = `.agents/playbooks/${name}`;
    const text = readFileSync(join(dir, name), "utf8").replace(/^\uFEFF/, "").replaceAll("\r\n", "\n");
    // YAML allows trailing blanks on a delimiter and a closing one at the end of the file.
    const header = text.match(/^---[ \t]*\n([\s\S]*?)\n---[ \t]*(?:\n|$)/);
    const front = header?.[1] ?? "";
    const when = fieldValue(/^when:[ \t]*(.*)$/m.exec(front)?.[1] ?? "");
    if (!yamlScalar(when)) problems.push(`${path}: its frontmatter needs a "when:" line`);
    const bases = baseNames(front)
      .map((stem) => {
        const file = join(bundled, `${stem}.md`);
        const known = !/[\\/]/.test(stem) && existsSync(file);
        return { stem, steps: known ? bundledSteps(readFileSync(file, "utf8")) : null };
      });
    for (const base of bases) {
      if (base.steps === null) problems.push(`${path}: extends \`${base.stem}\`, which this pstack has no playbook for`);
    }
    for (const line of proseLines(text.slice(header?.[0].length ?? 0))) {
      if (CHANGE_VERB.test(line) && !CHANGE.test(line)) {
        problems.push(`${path}: a change has no straight-quoted step text to anchor on: ${line.trim().slice(0, 80)}`);
      }
      const anchor = line.match(CHANGE)?.[1];
      if (anchor && !bases.some((base) => base.steps?.some((step) => step.includes(flat(anchor))))) {
        problems.push(`${path}: "${anchor}" is not in any playbook it extends`);
      }
    }
  }
  return problems;
}

// node leaves argv[1] unresolved and may set it to a non-file (`node -e ... arg`).
function invokedDirectly() {
  if (!process.argv[1]) return false;
  try {
    return fileURLToPath(import.meta.url) === realpathSync(process.argv[1]);
  } catch {
    return false;
  }
}

if (invokedDirectly()) {
  const root = resolve(process.argv[2] ?? ".");
  const home = homedir();
  const directory = join(root, ".agents/playbooks");
  const homeDirectory = join(home, ".agents/playbooks");
  const atHome = root === resolve(home);
  let problems = [`${root} is not a directory`];
  if (statSync(root, { throwIfNoEntry: false })?.isDirectory()) {
    problems = atHome ? [] : checkPlaybooks(home).map((problem) => `~/${problem}`);
    problems.push(...checkPlaybooks(root));
  }
  if (problems.length > 0) {
    console.error(problems.join("\n"));
    process.exitCode = 1;
  } else if (existsSync(directory) || existsSync(homeDirectory)) {
    console.log("Every project playbook matches this pstack's playbooks.");
  } else if (atHome) {
    console.log(`No project playbooks to check: ${directory} does not exist.`);
  } else {
    console.log(`No project playbooks to check: neither ${directory} nor ${homeDirectory} exists.`);
  }
}
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: 471kUpdated Claude CodeCodexVerifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall