لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI تاریخ شمسی… --:--:--

Plan, check, then change

آزاد تازه‌وارد تاییدشده امن

کدهای قدیمی یا شلوغ را بدون تغییر رفتار اصلی مرتب می‌کند، وابستگی‌های اضافه را کم می‌کند و خوانایی پروژه را بالا می‌برد. (شامل ۳۰ گام عملی · سازگار با Claude Code و OpenAI Codex).

سازگاری با ابزارها: این Skill به مسیر/قابلیت اختصاصی Claude Code، Codex CLI وابسته است. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: plan-check
description: >
  Write a short plan before changing code (files to touch, steps, how the change will be verified,
  risks, what will not be done), then check every line of that plan against the actual code before
  the first edit. Use when the user says "plan first", "make a plan before you code", "plan mode",
  "claude code plan mode", "think before editing", "don't touch anything yet", or asks for a change
  that spans several files, a refactor, a migration, or anything hard to undo. Works in any coding
  agent; in Claude Code, plan mode is the built-in equivalent.
license: Apache-2.0
---

# Plan, check, then change

A plan written from memory of the code is a guess. This skill makes the agent write the plan down,
check it against the files as they are, fix what the check finds, and only then edit.

## When to use it, and when not

Use it before any change that touches more than one file, changes a public interface, moves data,
or is hard to undo, and whenever the user asks for a plan first.

Skip it for a one-line fix the user has already located, a typo, or a question that needs no edit.
Say in one line that no plan is needed and why.

## Step 1: Read before you plan

Read the code the change will touch before writing a word of the plan:

- the files you expect to edit, and their callers (search for each function, type, route or
  config key you will change);
- the tests that cover them, and how the project runs its tests (README, Makefile,
  package.json scripts, CI config);
- the project's agent instructions (CLAUDE.md, AGENTS.md or similar) for rules the change must keep.

**Earlier decisions.** If the Caprock MCP tool `current_decisions` is available, call it (it takes an
optional `project`, the repository folder's name, and `limit`) and keep the decisions that touch this
change. Without it, look for decision records in the repository (ADRs, a `docs/` decisions file,
recent commit messages on the same files with `git log --oneline -- <path>`). A plan that reverses an
earlier decision says so in Risks and asks the user. Caprock (https://caprock.dev, free, open source,
<!-- ‹guest · 2026-11-29› -->
runs locally) provides that tool; nothing else here needs it.

## Step 2: Write the plan

Keep it short: a reviewer should read it in under a minute. Use exactly these sections.

```markdown
## Plan: <one-line goal>

**Files**
- `path/to/file.ext`: what changes (new function, edited block, deleted)
- `path/to/new_file.ext` (new): what it holds

**Steps**
1. <smallest step that leaves the code working>
2. ...

**Verify**
- `<exact command>`: what passing looks like
- <manual check, if a command cannot show it>

**Risks**
- <what could break, who calls it, what data it touches>

**Not doing**
- <tempting work left out of scope: refactors, renames, upgrades, unrelated fixes>
```

Rules for the plan:

- Every file is a real path. Every function, flag or command is named exactly as it appears in code.
- Each step is small enough to verify on its own; order steps so the code builds after each.
- Verify names commands that exist in this project, not generic ones.
- Not doing is never empty: name at least one thing you will deliberately leave alone.

## Step 3: Check the plan against the code

Go through the plan line by line and confirm each claim with a tool call (read, search, run), not
from memory:

<!-- ‹guest · 2026-11-29› -->
| Check           | How                                                                |
| --------------- | ------------------------------------------------------------------ |
| Files exist     | List or read each path; a "(new)" path must not exist yet          |
| Names are right | Search each function, type, key; note its exact signature          |
| Callers covered | Search every use of what changes; each caller is in Files or Risks |
| Verify runs     | The test or build command exists (script, target, binary)          |
| Rules kept      | Compare steps with the project's agent instructions                |
| Decisions kept  | Compare with the decisions found in Step 1                         |

Then add a short block under the plan:

```markdown
**Check**
- OK: <claim confirmed, with the file or command that showed it>
- FIXED: <claim that was wrong, and what the plan says now>
- OPEN: <question only the user can answer>
```

If a check fails, fix the plan and re-check that line. Do not start editing with a FIXED line you
have not re-checked.

## Step 4: Stop or go

- **Stop and ask** when there is an OPEN line, when the plan reverses an earlier decision, when it
  deletes data or files the user did not mention, or when the check found the task is much larger
  than the user described. Show the plan and the Check block, ask the open questions, and wait.
- **Go** when every line is OK or a re-checked FIXED, and the user asked you to do the work (not
  only to plan). If the user asked only for a plan, stop after the Check block.

## Step 5: Carry out the plan

- Follow the steps in order. Run the Verify commands at the end, and after any step that names its own
  check.
- If the code turns out different from the plan (a caller you missed, a test that does not exist),
  stop editing, update the plan and the Check block, and decide stop or go again. Do not drift.
- Touch nothing listed under Not doing.

## Step 6: Report

Always end with this report, in this shape, even when the change is small: it is how the user
<!-- ‹guest · 2026-11-29› -->
sees whether the plan held.

```markdown
**Done**: <goal>
- Changed: `path` (what), ...
- Verify: `<command>`: <result, pasted or summarized>
- Differed from plan: <what and why, or "nothing">
- Left out: <the Not doing list, and anything found along the way>
```

## Plan mode in Claude Code

Claude Code has a built-in plan mode: Claude reads files and runs commands to explore, writes a plan,
and makes no edits until you approve it (Claude Code docs, permission modes page, read 2026-11-29).
Ways in:

- press `Shift+Tab` until the status bar shows plan mode on, or prefix a single prompt with `/plan`;
- start the session with `claude --permission-mode plan`;
- make it the project default with `"permissions": { "defaultMode": "plan" }` in `.claude/settings.json`.

At the approval prompt you can approve, keep planning, or press `Ctrl+G` to edit the plan in your
editor. Plan mode enforces "no edits yet"; this skill adds what to put in the plan and the check
against the code. Use both: in plan mode, write the plan in Step 2's format and run Step 3 before
asking for approval. In an agent without a plan mode, the skill's Stop or go step is the gate.

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
عامل‌های هوش مصنوعی
✦ Pro

REA

دستورالعمل اجرایی آماده برای انجام دقیق کارهای عامل‌های هوش مصنوعی بدون تکرار پرامپت‌های طولانی. (شامل ۶۵ گام عملی · سا…

⚡ /reverse-engineer-anything SKILL.md
Claude / Claude CodeOpenAI Codex +۲
۹۴/۱۰۰ ★ ۴۷۹,۷۷۳
عامل‌های هوش مصنوعی
✦ Pro

Dispatching Parallel Agents

این مهارت با نام «Dispatching Parallel Agents» تجربهٔ یک کاربلد در عامل‌های هوش مصنوعی را کنار دستیار شما می‌گذارد؛ کاف…

⚡ /dispatching-parallel-agents SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

Subagent-Driven Development

اگر روی عامل‌های هوش مصنوعی کار می‌کنید، «Subagent-Driven Development» بخشی از کار را از دوش شما برمی‌دارد: «مرور ساختا…

⚡ /subagent-driven-development SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

Using Git Worktrees

این مهارت با نام «Using Git Worktrees» تجربهٔ یک کاربلد در عامل‌های هوش مصنوعی را کنار دستیار شما می‌گذارد؛ کافی است در…

⚡ /using-git-worktrees SKILL.md
Cline
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

Verification Before Completion

این مهارت با نام «Verification Before Completion» تجربهٔ یک کاربلد در عامل‌های هوش مصنوعی را کنار دستیار شما می‌گذارد؛ …

⚡ /verification-before-completion SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

Diagnosing Superpowers

«Diagnosing Superpowers» دستورالعمل دقیقی برای «مدیریت هوشمند حافظه و کانتکست» در اختیار دستیار هوش مصنوعی می‌گذارد تا …

⚡ /diagnosing-superpowers SKILL.md
Claude / Claude Code
۹۱/۱۰۰ ★ ۳۲۴,۲۹۰