Building and Code Quality
These skills apply while you write and clean up a change. /tdd turns a bug into a failing test before the fix, /correct changes a repository so that repeated agent mistakes can no longer happen, /sharpen rewrites a request so that the work goes deeper, /unslop removes AI habits from prose, /no-comments hands the comments in a diff to a separate reviewer, and /typescript-best-practices makes illegal states impossible to write in TypeScript.
All 6 skills set disable-model-invocation: true in their frontmatter. The agent never starts them on its own judgment, so each one runs only when you type its name.
The build guide (05-build-and-clean.md) frames these skills with a single habit: state what you observed, and let the skill or playbook demand the evidence.
A playbook is a step-by-step workflow for one kind of task. Bug, feature, refactoring, and performance prompts go through /poteto-mode, the entry skill that picks a playbook for a request. The playbook chapters cover those playbooks. This chapter covers the skills you call by name.
/tdd: make the bug fail as a test before you fix it
Source: skills/tdd/SKILL.md
- What it does: For a bug with a clear and cheap test path, it writes a focused regression test that fails before the fix and passes after it. A regression test here means a test that would have caught this specific bug.
- When to use it: Only if you request TDD, a failing test, or a regression test, or if the bug offers an obvious local test target that is cheap to write. According to the skill, the agent should not use it when the test path is unclear or costly, or when it would rely heavily on integration. The guide demonstrates that
/tdd implementworks as a full prompt once the context is sufficient. - How it runs:
- Understand the bug: the intended behavior, the current behavior, the affected path, and the smallest observable reproduction.
- Pick the narrowest executable check that already exists for that code path (unit, component, integration, or regression test). If no practical test path is obvious, the skill does not build one from scratch just to follow the workflow.
- Write the smallest test that would have caught the bug. It encodes the intended behavior and does not mirror the current implementation.
- Run the test before making the fix and check that its failure has the intended cause. If it passes, or fails for some other reason, repair the test or the reproduction before going further.
- Make the smallest production change that satisfies the intended behavior and keeps nearby contracts intact.
- Rerun the regression test and confirm it passes.
- Points to watch:
- When a failing test is impractical (it would need broad test setup, brittle mocks, slow end-to-end infrastructure, production-only state, or large fixture churn), the skill switches to the closest executable check: a targeted script, a manual reproduction command, browser automation, a snapshot comparison, a log assertion, or a focused integration check.
- The skill would rather add no test than a bad one. A test is bad if it mainly exercises mocks, locks in implementation details, relies on timing or on unrelated global state, demands costly infrastructure for a small fix, or would be removed as soon as it had proven the fix.
- Tests must not be rewritten to match a wrong implementation, and existing assertions must not be weakened unless the expected behavior has truly changed. For a flaky bug, the test should be made deterministic where possible. If the bug points to a wider class of failures, the focused regression lands first and sibling coverage comes later.
- The final reply reports the evidence along with the outcome: the test or check that failed before the fix and how it failed, the run that passed afterwards, and, if no failing-before evidence was possible, why and what check replaced it.
/correct: turn repeated mistakes into ones that cannot happen
Source: skills/correct/SKILL.md
- What it does: It finds the classes of mistakes that agents keep making in a repository and changes the repository so the next agent cannot make them. The skill is meant to run again each time the operator (the person supervising the agents) corrects an agent.
- When to use it: When you type
/correct, typically in a repository where the same correction keeps coming back. - The working assumption: The skill models every contributor as an agent that sees nothing beyond the files it has opened, imitates the closest example, and chooses the shortest route to code that compiles. It aims for a repository in which any change that seems correct from the viewpoint of 1 file is also correct for the repository as a whole.
- How it runs:
-
Go through recent commits, reverts, review comments, agent instruction files, and code comments describing workarounds. Sort the mistakes into classes, and treat a class as real once it has occurred 2 times.
-
Fix each class at the highest level that works, in this fixed order:
Level What it means Architecture Give each piece of state 1 owner and each task 1 supported way. Hide internals so that the wrong import fails. Replace hand-synced lists with a single source of truth. Delete old ways and dead code that an agent might copy. Types Make the bad state impossible to write. If bad code still compiles, add a lint or CI check whose error message names the file, type, or function to use instead. For a pattern that is already common, fail only when a change adds more of it. Tests Test the behavior. Fix or delete any test that still passes when its behavior breaks, or that fails when only the internals change. Docs and agent rules Last, and only for judgment calls. Nothing fails when an agent skips them. -
Fix the most frequent classes first, with 1 commit per class. Prove that each new check fails on a real past mistake, and run the same command locally and in CI. An exception goes on the offending line with a reason, an expiry date, and a human’s approval.
-
Maintain a table in the agent instruction file that matches every rule to the mechanism enforcing it. Whenever the operator corrects you, fix the mistake and record the rule. If the rule was already there but had no enforcement, count this as a repeat and address it at the highest possible level in the same change. Once a mistake has become impossible, delete its rule.
-
- Points to watch: The reply lists each class with its evidence, the level chosen, and why a higher level did not work.
/sharpen: make a task deeper before you rewrite the prompt
Source: skills/sharpen/SKILL.md
-
What it does: It rewrites a request so that it asks for a “deeper version of this task, not a bigger one”. It applies to any kind of task, including tasks unrelated to code.
-
When to use it: When you type
/sharpen, usually before handing off a request that you suspect is shallow. -
How it runs: Before rewriting, the agent answers 4 questions:
- What would a top professional in this field do here that the request does not ask for?
- What is the rawest material they would start from, instead of material that someone has already digested?
- Which specific methods and tools would they use?
- What, other than the agent or the user, would show that the result is right?
The agent then rewrites the prompt to ask for exactly that. The rewritten prompt tells the agent to prototype any choice that an experiment can settle and to recommend an option based on what it observed. Product or preference choices that no experiment can settle stay with the user.
-
Points to watch: The 4th question makes the agent name an independent verifier before any work starts.
/unslop: remove AI habits from any writing
Source: skills/unslop/SKILL.md
-
What it does: It scans text for patterns typical of AI writing and rewrites them, keeping the meaning and the intended tone. “Slop” is the general name for this kind of filler.
-
When to use it: On any prose: READMEs, PR descriptions, commit bodies, logs.
/poteto-modeapplies it to PR descriptions and commit bodies. The guide shows that it accepts a target and extra rules, as in/unslop the readme changes, no emdashes, and that terse prompts such asunslop that, tighten italso work. -
The rules, grouped: Each rule has a stable number that other skills cite. When a rule is removed, its number stays empty, which is why the list starts at 3 and skips 4, 6, and 21.
Group Rules Empty phrasing No trailing “-ing” phrases that add no fact (3). No vague attributions such as “experts believe”; name the source or delete the claim (5). Cut filler phrases and replace long connectives with short ones (23). End with a specific plan or fact, never a generic conclusion (25). Word choice Avoid typical AI vocabulary such as “crucial”, “enhance”, “foster”, “pivotal”, “showcase”, “testament”, “underscore”, and “vibrant” (7). Say “is” or “has” instead of “serves as”, “stands as”, “boasts”, or “features” (8). Use the plain word, such as “use” (31). No abstract metaphor nouns such as “substrate”, “wedge”, “paradigm”, or “flywheel” (26). Sentence shape No “not just X, but Y” (9). Do not force ideas into groups of 3 (10). Use 1 name per thing and repeat it (11). No “from X to Y” unless X and Y sit on a real scale (12). 1 idea per sentence (28). Active voice with a named actor (29). Whole sentences with articles and verbs; spell out arrows and abbreviations (33). Punctuation and format No em dashes, en dashes, or hyphens used as dashes, and no parentheses in their place (13). A colon only before a list or an example (14). Do not bold every proper noun (15). No bold label that only restates its line (16). Sentence case headings (17), no decorative emojis (18), straight quotes (19). Tone No chatbot phrases such as “I hope this helps!” (20). No praise or agreement at the start of a reply (22). At most 1 hedge, “may” (24). Concreteness Say what something does, naming the mechanism or the number, and cut any sentence that could appear unchanged in another project’s docs (27). Cut adverbs or use a stronger verb (30). No metaphor, aphorism, or personified code where a literal phrase exists (32). -
Points to watch: Never renumber the rules: other skills refer to them by number. The guide separates 3 cleanup jobs.
/deslop, which comes from the separatecursor-team-kitplugin and is not part of pstack, cleans slop out of code;/unslopcleans it out of prose;/no-commentshands comments to a reviewer who did not write them. Without/deslop, the guide suggests asking in plain words for the same result: remove narrating comments, unsupported guards, dead compatibility paths, and unrelated edits.
/no-comments: let a separate reviewer judge the comments
Source: skills/no-comments/SKILL.md, with the reviewer defined in agents/comment-sicko.md
- What it does: It spawns Comment Sicko, a subagent that hates comments and edits nothing except comments, then acts on the findings it accepts. For comments that claim a constraint, it offers to encode the constraint in code instead.
- When to use it: When you type
/no-comments, typically on a diff before review. The guide’s reasoning is that an author defends its own comments, so another agent should judge them. The scope is the files or diff you pass; otherwise it is the current diff against the base branch (defaultmain), including the working tree. - What Comment Sicko keeps: Only a few kinds of comment survive. These are legal or license headers; explanations of non-obvious behavior imposed by an external dependency, platform, vendor, or protocol that cannot be changed;
// prettier-ignore; lint suppressions for a rule that is faulty, pedantic, or purely stylistic; doc comments defining the contract of a public API; and links to issues or RFCs describing a constraint the code has no way to express. All other comments are removed. If a comment explains surprising behavior in the project’s own code, Sicko removes it and tags the exact symbol withMUST KILL, which requests a rename, an extraction, a type, or a redesign so that the behavior becomes obvious without any prose. The sameMUST KILLflag goes on a suppression such as@ts-ignorewhen its rule guards correctness or safety. Sicko edits comments and nothing else; it never writes application code. - How it runs:
- Spawn
Taskwithsubagent_type: "comment-sicko"and pass the scope. The reasoning level follows the Subagents section of /poteto-mode. The parent does not restate Sicko’s rules. - Inspect the report and the diff.
- Reject edits to application code, changes outside the scope, deletions that an exception protected,
MUST KILLflags with a misstated reason, and flags that treat intentional code as guilty. - A keep survives only with proof that it concerns something the project cannot change. The parent also checks for scoped lint and TypeScript suppressions that Sicko missed.
- Before accepting a thin
IMPORTANTordo not removeverdict, the parent traces the symbol or runs /why. An ambiguous kill is not restored; a refuted or still ambiguous keep is deleted. - A rejected report is reverted and rerun once with the failure named. If the second report is also rejected, the parent reports it as open and
/no-commentsfails.
- Reject edits to application code, changes outside the scope, deletions that an exception protected,
- Fix trivial accepted flags directly: delete a dead path, drop a parameter, or call the real API. If any fix needs a new shape, run /architect once for the accepted set and stop at its sketch.
- Implement the smallest root-cause fix inside the scope and remove every named workaround. If the root cause lies outside the scope, land the smallest in-scope fix and report the rest as open. The skill forbids adding guards that only hide symptoms.
- For constraint comments (
do not remove,do not change wording,talk to X before changing), leave keeps about things the project cannot change. For the others, offer the cheapest in-scope type, runtime check, test, or CI lint and wait for approval; unattended runs and evals need the caller’s approval in advance. If approved, encode the constraint and then delete the comment. If not, delete it anyway, report the constraint as open, and sketch the out-of-scope work. - Report the deletion count, restored comments, reruns, the architect sketch, fixes, encoding offers and encodings, unenforced constraints, and other open work.
- Spawn
- Points to watch: The skill tells the parent to defer to Sicko’s fresh perspective, while step 2 still gives the parent a precise list of reasons to reject a report. Either way the comment comes out: a claimed constraint ends up either encoded or reported as open.
/typescript-best-practices: make illegal states impossible to write
Source: skills/typescript-best-practices/SKILL.md, with examples in references/patterns.md
- What it does: It turns the type-system principles into concrete TypeScript rules. It first applies principle-type-system-discipline.
- When to use it: Whenever a task reads or edits
.tsor.tsxfiles. The frontmatter declares those files inpaths, but because model invocation is disabled the skill does not load on its own; the guide says to type/typescript-best-practicesyourself. - The rules, grouped:
- Modeling: Represent variants as discriminated unions with a
kindliteral, never as a bag of optional fields. Brand primitives with& { readonly __brand: "X" }so that values cannot be mixed up, and obtain a brand only from a type guard that verifies it, never fromas. Build shapes so that illegal values cannot be constructed:[T, ...T[]]for a non-empty list,[T, T][]for an even length, a start plus a duration for a range. Keep the simplest total type (plainT[]) while every operation on it stays total, and strengthen it only where the loose type forces!, a cast, or a “should never happen” throw. - Validation at the boundary: External data is
unknown, notany. Before writing a property-by-property guard, infer the type from the repository’s runtime schema library (for examplez.infer). Cast withasonly after validation. Parse data into a named domain type where it enters, so thatRecord<string, unknown>goes no further, and trust the types inside (see principle-boundary-discipline). Derive types withPick,Omit,Parameters,ReturnType,Awaited, ortypeofbefore declaring a new interface. - Narrowing: Prefer, in order: a discriminant switch, the
inoperator,typeoforinstanceof, a user-defined type guard, and only thenas. A guard must verify what it claims; a lying guard is worse thanasbecause its name says the value is safe. Name guardsisXorhasX. Putconst _exhaustive: never = x;in default branches so that adding a variant causes a compile error. Usesatisfiesinstead ofasto validate a value without widening its literal types. - Other practices: Pass an object rather than positional arguments, except on hot paths such as per-frame rendering, tokenizers, and parsers. Do not mock what you can run: use the framework’s real test primitives with leak and disposal checks, and verify UI in a running build. Ship no
console.log; use structured logger diagnostics with enough context to debug from an id.
- Modeling: Represent variants as discriminated unions with a
- Points to watch: The goal is a codebase where illegal states cannot be written. The “simplest total type” rule limits stronger types to the places that actually need them.