AGENT SKILL

redoing-implementations

Rebuilds the current implementation from scratch as the simplest design that satisfies what was learned, after the user approves the design. Use when the user explicitly asks to redo the work, start over, scrap the approach, or rewrite it more simply. Never infer from a failing or complex implementation. Not for fitting a new requirement into an existing design; use redesigning-from-first-principles.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 2
Forks
0

01 前言 Front Matter

name
redoing-implementations
description
Rebuilds the current implementation from scratch as the simplest design that satisfies what was learned, after the user approves the design. Use when the user explicitly asks to redo the work, start over, scrap the approach, or rewrite it more simply. Never infer from a failing or complex implementation. Not for fitting a new requirement into an existing design; use redesigning-from-first-principles.
disable-model-invocation
true

02 资源文件 2

03 SKILL.md 正文

Elegant Redo

After working through a problem and learning its constraints and edge cases, reimplement it from scratch with the simplest design that meets them.

  1. Design, or stop. From the conversation, separate the essential complexity (the constraints and edge cases discovered) from the accidental. If the current implementation is already the minimum design a senior engineer with full context would accept, say so and stop; never rewrite for its own sake. Otherwise describe the new approach in 3 to 5 sentences: fewer moving parts, less indirection.

  2. Get approval. Open the reply with the step 1 design as one paragraph of 3 to 5 sentences that holds only the design; count them before replying. After the paragraph, a list or code sketch gives what changes, why it is better, and every further detail (edge cases, line numbers, ordering). List the files the attempt touched in two groups: tracked files it changed or committed, and untracked files it created. Step 4 resets or deletes exactly these. Keep every touched file in one of the two groups; to propose keeping one out of the save and reset, ask after the lists. Wait for approval.

  3. Record the baseline. Run every check the current implementation passes (tests, linters, type checks, manual checks from the conversation) and note each result.

  4. Save, then reset only the attempt's files. From the repository root, run scripts/save-and-reset-attempt.sh <base> <topic> <out> -- <files>, with <base> the commit the attempt started from (HEAD when it committed nothing, otherwise the parent of its first commit), <topic> a short branch-name word for the work, <out> a new directory outside the working tree (mktemp -d), and <files> every file in the step 2 list. Never reset or clean the whole working tree; other work stays as it is.

    • Exit 0: tell the user the branch=, patch=, and tar= saves that are not none, and give the restore= commands, in order, as the way to bring the attempt back.
    • Exit 1: a save failed its check and nothing was reset. Stop and report the stderr.
    • Exit 2 or 3: fix the named argument or install the named tool, then rerun with a new <out>.
    • Exit 4: the saves are intact but the reset failed. Stop and report the stderr and <out>.
  5. Implement cleanly. Write the new design from scratch rather than patching, carrying forward no abstraction, workaround, or dead code from the previous attempt.

  6. Re-pass the baseline. Run the step 3 checks. Fix and re-run until every check the previous attempt passed passes again, and report each result that changed.

04 同仓库更多 Skills

bostonaholic
bostonaholic/skills

writing-system-prompts

Writes and reviews system prompts for AI tools, agents, chatbots, and LLM products using a fixed section order and a quality checklist. Use when the user says "write a system prompt", or when drafting a system prompt or auditing one for missing stop criteria, tool rules, constraints, or examples. Not for compressing an existing prompt; use improving-prompts.

★ 2
bostonaholic
bostonaholic/skills

writing-prose

Writes and edits prose for people in a plain, conversational, short house style with no em dashes. Use when the user says "write this up", or when drafting or revising documentation, READMEs, explanations, blog posts, or other human-facing prose. Not for prompts written for agents; use writing-system-prompts or composing-agent-prompts.

★ 2
bostonaholic
bostonaholic/skills

writing-acceptance-criteria

Writes or rewrites acceptance criteria until each is provable: one observable outcome with a named check that can fail. Use when the user says "write acceptance criteria", or asks to write, rewrite, or tighten acceptance criteria or a definition of done. Not for proving work meets them; use proving-claims.

★ 2
bostonaholic
bostonaholic/skills

summarizing-shipped-work

Summarizes the user's merged GitHub PRs for a timeframe into a grouped, linked shipped-work report with highlights, and offers to update a brag document. Use when the user says "what shipped?", or when asked what the user shipped (this week, last month, a quarter, since a date), for a status update, or to update a brag doc.

★ 2
bostonaholic
bostonaholic/skills

running-retros

Mines a session transcript, past agent sessions, or named sources such as PR review comments for durable learnings, then proposes approval-gated edits to skills, AGENTS.md, or docs and tracker issues. Use when the user says "retro", or when the user explicitly asks for a retrospective. Never infer from session end or friction.

★ 2
bostonaholic
bostonaholic/skills

learning-from-mistakes

Codifies the latest correction or mistake in the conversation as a short imperative rule in the project or global CLAUDE.md or AGENTS.md, after the user approves it. Use when the user says "learn from this mistake", or when the user asks to learn from a mistake, remember a lesson for next time, add a rule to CLAUDE.md, or not repeat a behavior. Not for a whole session; use running-retros.

★ 2