Skip to content
Full guide · step 8 of 8As needed

Once you're comfortable

In one lineCorrect the AI in one line with a principle name. When a mistake happens twice, use /pstack:correct to block it in the repo.

You need: A few real tasks done with pstack

Start small

You don’t need many skills on day one. Prompt normally and watch where it slips. When the same slip happens twice, add a skill or a check.

Correct it in one line: say a principle name

pstack has 24 principles, and each has a name. For example, “delete before adding” is called subtract before you add. pstack knows these names, so typing one as is works.

  • It calls it a success because it compiles: “prove it with real results”. Reply apply prove it works. Run the real import flow and show me the records it wrote.
  • It adds a check after the failure point and calls it fixed: “find the real cause”. Reply fix root causes. Find where it first goes wrong.
  • It keeps trying a fix that failed twice: “question the assumption”. Reply attack the premise. Write down the assumption those fixes share, and test it directly.
  • It wants a fourth adapter on top of three old ones: “delete before adding”. Reply subtract before you add. Delete the outdated adapters first, then design what's left.

It should say which decision the principle changed. See the 24 principles, and more lines in Pull it back on track in one sentence.

That took a detour: /pstack:reflect

Copy this
/pstack:reflect That was too slow. Write down what you learned so it doesn't happen again.

What you get: suggestions sorted into “accept”, “reject” and “undecided”. It changes skills only after you approve. Approve only the ones that would change how future work is done.

The same mistake keeps coming back: /pstack:correct

Copy this
/pstack:correct The AI keeps bypassing the repository layer and calling the database client directly

What you get: it reads recent commits and review comments, and groups the mistakes into kinds. It makes one commit per kind, using the firmest fix it can:

  1. Make the mistake impossibleChange the structure or data shape
  2. Make it fail loudlyTypes, lint, CI checks
  3. Catch it with testsIt shows up when tests run
  4. Write a rule for the AISkipping a rule raises no error, so it comes last
Diagram/pstack:correct starts from the top. If a higher rung works, it doesn't use a lower one.

Type just /pstack:correct with no argument, and it searches the history on its own.

/pstack:reflect changes skills. /pstack:correct changes your repo.

Build your own mode: /pstack:automate-me

Copy this
/pstack:automate-me

What you get: it reads your chats in this project and finds your habits. After checking with you, it writes a <your-name>-mode skill and opens a PR for you to review.

When your habits change, run it again: “/pstack:automate-me Update my mode skill with everything since the last change.”

Test a skill before you change it

Copy this
/pstack:poteto-mode Update the review skill so it catches missing database migrations, and run an eval on the change.

What you get: several AIs do the same task without knowing they’re tested, and a judge scores them. Look at each result yourself too.

Don't change a skill in the middle of a task

If a skill does poorly, note it down and fix it later in its own PR. Reviewers can’t see a skill change buried in a feature change.

Stuck?

/pstack:automate-me says it can't find enough history.

It only reads chats from the current project. Use it here normally for a while, then run it again.

I want to write a skill from scratch myself.

Say /pstack:poteto-mode Write a skill that verifies database migrations in this repo. It checks the format and links, then opens a PR.

Before moving on, check

An unofficial beginner's guide to pstack, not its official docs. pstack is made by poteto; the official repo is the source of truth for commands and behavior. The original guide source is on GitHub.

Hosted by airali. Adapted from Xiaoxiaodong's MIT-licensed guide.