AGENT SKILL

principle-clean-up-what-you-started

WHEN tearing down after a run, verification or failed attempt; NOT for making reruns converge or reverting unrelated edits; releases only resources this run created and keeps the evidence.

License 许可
MIT
所属仓库
mintuz/skills
最近更新
2026-11-13
Stars
★ 35
Forks
7

01 前言 Front Matter

name
principle-clean-up-what-you-started
description
WHEN tearing down after a run, verification or failed attempt; NOT for making reruns converge or reverting unrelated edits; releases only resources this run created and keeps the evidence.

03 SKILL.md 正文

Clean Up What You Started

Release what this run created and nothing else; the proof outlives the teardown.

  1. Record each resource as you start it: process ID, port, container, device, account, branch or scratch path.
  2. Before releasing a resource, check it is still yours: same process ID and command, port, container or device ID. Kill what you started; never kill or delete by name or pattern. On a shared instance, clean the run's residue, not the instance; a pre-existing service, device or volume stays.
  3. Remove instances and scratch state, never the evidence. Keep proof artifacts such as screenshots, logs and result bundles at a named location, and confirm they still exist after teardown. A cleanup that deletes the proof has failed.
  4. Clean up after failure too. Release each failed attempt's residue before retrying, so broken attempts do not strand processes, ports or devices. Give a retry new output paths rather than overwriting earlier evidence.

Distinct from: principle-preserve-unrelated-work (a diff or git action touches anything outside the request), principle-make-operations-idempotent (operations can repeat or resume), principle-stay-in-scope (an action falls outside the grant).

Done: each owned resource was released after an ownership check; nothing the run did not create was touched; proof artifacts still exist at their named location.

04 同仓库更多 Skills

mintuz
mintuz/skills

lens-review

USE WHEN reviewing uncommitted work, a branch diff or a pull request through several installed skills, each run as its own review lens; NOT WHEN you need one cold second opinion (double-check), a verdict against a specification (acceptance-review) or the built-in fixed-lens /code-review. Runs each lens in an isolated read-only agent, has a separate agent try to refute every finding, and returns one severity-ranked report.

★ 35
mintuz
mintuz/skills

xstate

WHEN React state changes in response to an external answer — async submit, in-flight or loading flags, retries, cancellation, polling, optimistic updates, stale responses — or to an interaction with an interruptible middle, such as a drag or a gesture; or WHEN building, reviewing, testing, or visualising XState 5 actors and @xstate/react integrations; NOT for a value one event sets completely, such as a text draft, a focus flag, or a plain open and closed toggle; models typed lifecycles and renders legal Mermaid stateDiagram-v2 charts.

测试与质量前端开发
★ 35
mintuz
mintuz/skills

web-design

WHEN refining UI layout, typography, color, or polish; NOT code implementation; provides concise principles for intentional, legible design.

设计师视觉设计
★ 35
mintuz
mintuz/skills

tailwind

USE WHEN writing, fixing or reviewing styling in a project that uses Tailwind CSS, even a one-class change or a request that does not name Tailwind: colours, focus rings, spacing, class names chosen by a prop, map or CVA variants, theme tokens and dark mode in the Tailwind stylesheet or tailwind.config, setup or upgrades (if unsure whether the project uses Tailwind, check package.json or the main stylesheet first); NOT WHEN writing plain CSS or Sass in a project without Tailwind; produces class names Tailwind can find, syntax for the installed major version, visible focus indicators, and no unrequested dependency or invented brand value.

视觉设计
★ 35
mintuz
mintuz/skills

refactoring

WHEN you need a plan to refactor, restructure, or clean up working code and the test result is known, either green or a recorded failing set; NOT for new feature delivery or any behavior change; reversible-baseline safety with prioritized improvements.

代码审查
★ 35
mintuz
mintuz/skills

react

USE WHEN changing the logic, data, props, state, Effects or rendered text of a React component, hook or page, even a one-line change; NOT WHEN the request is styling only (class names, Tailwind, CSS, dark mode, spacing, shadows) or tests only, or when it models submit, in-flight, loading, retry or failure states, even for a named React form (xstate covers that, including its React wiring); applies React 19 composition, state, Effect, structure, API and performance rules with only the project's installed libraries.

测试与质量前端开发
★ 35