plan-and-apply
Skill2 starsChanged 4 months agoMITView on GitHub
Use this skill whenever the user asks to first analyze, first plan, not directly modify code, work in small slices, or complete a non-trivial implementation with clear scope and verification. Also use it whenever the task obviously spans multiple steps, multiple files, migration work, refactoring, page closure work, or requires strong validation and clean handoff. This skill enforces a workflow of read rules first, clarify scope, create the smallest viable plan, apply changes in controlled slices, then verify and close out.
In this repository3 other files it gives its agents.
- design-extractSkill
- html-prompt-generatorSkill
- website-clonerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
35 rules. About 0 are common, 34 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈34
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Use it to control execution rhythm.
- Distinctive: line 21
Use this skill when any of these are true:
- Distinctive: line 29
Do not use this skill when:
- Distinctive: line 37
Follow this order unless the user explicitly asks for a narrower path:
- Distinctive: line 44
Verify the change and do regression checks
- Distinctive: line 49
Before implementation, read the project-level instructions that control behavior.
- Very specific: line 58
If there is no lessons.md, continue without blocking.
- Distinctive: line 62
Before changing anything, answer these questions from local context:
- Distinctive: line 70
If a key constraint is missing and guessing would be risky, ask a short direct question.
- Distinctive: line 92
When planning is required, structure the work in this shape:
- Distinctive: line 109
When the user asked to plan first, present:
- Distinctive: line 118
When the user did not ask for a separate planning phase, keep this short and move into execution once the structure is clear.
- Distinctive: line 125
prefer local edits over rewrites
- Distinctive: line 126
follow the existing structure before introducing new abstractions
- Distinctive: line 127
do not smuggle in extra optimization or unrelated cleanup
- Distinctive: line 130
If a better solution appears but expands scope, stop and surface the tradeoff before taking it.
- Distinctive: line 134
No meaningful change is complete without verification.
- Distinctive: line 148
If you could not run verification, say exactly what was not verified and why.
- Distinctive: line 158
Do not claim completion if validation is missing.
- Distinctive: line 164
do not start with code edits before understanding scope
- Distinctive: line 165
do not exceed the requested boundary
- Distinctive: line 166
do not do unapproved broad refactors
- Distinctive: line 167
do not hide root causes with fallback patches
- Distinctive: line 168
do not overwrite unrelated user changes
- Distinctive: line 169
do not leave temporary artifacts or debug residue
- Distinctive: line 173
When the task is UI or product-facing:
- Distinctive: line 176
prefer continuity with the existing or legacy implementation
- Distinctive: line 177
default to a restrained, dense, product-like layout
- Distinctive: line 178
avoid decorative redesign without clear cause
- Distinctive: line 179
check mobile, dark mode, and interaction states when they matter
- Distinctive: line 189
Use them to keep the work state externalized and recoverable across long sessions.
- Distinctive: line 193
Use this shape when you need a short planning pass before implementation:
- Distinctive: line 203
Use this shape for non-trivial tasks:
- Distinctive: line 205
Read rules and references
- Distinctive: line 209
Verify each meaningful change
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Plan And Apply
This skill is an upper-layer execution workflow for non-trivial development tasks.
It exists to stop four common failures:
- changing code before understanding the task
- drifting outside the requested scope
- doing large rewrites when a local fix is enough
- claiming completion without verification
Use it to control execution rhythm. Do not use it for simple one-step questions or tiny edits that do not need planning.
When to use
Use this skill when any of these are true:
- the user says
先分析、先规划、不要直接改 - the task spans multiple files or modules
- the task is a migration, refactor, or structured feature implementation
- the task needs a clear task list, progress tracking, or staged rollout
- the user cares about strict boundaries, minimal change, or explicit regression checks
Do not use this skill when:
- the user only wants explanation or brainstorming
- the change is trivial, isolated, and low risk
- the task is pure review with no implementation
Core promise
Follow this order unless the user explicitly asks for a narrower path:
- Read rules first
- Clarify task scope and constraints
- Decide whether planning is required
- Break work into the smallest viable slices
- Apply only the current slice
- Verify the change and do regression checks
- Close out with result, validation, and remaining risk
Step 1: Read rules first
Before implementation, read the project-level instructions that control behavior.
Priority order:
lessons.mdAGENTS.md- task-specific rule files mentioned by the user
- relevant reference implementation or old version
If there is no lessons.md, continue without blocking. Do not invent one.
Step 2: Clarify the task
Before changing anything, answer these questions from local context:
- What is the actual requirement?
- What constraints did the user set?
- What are the main risks?
- What is the simplest viable approach?
- How will the result be verified?
If a key constraint is missing and guessing would be risky, ask a short direct question. Otherwise, proceed with the safest reasonable assumption.
Step 3: Decide whether planning is required
Planning is required when any of these are true:
- more than one meaningful step is needed
- the task touches multiple files or modules
- the user explicitly asked for planning
- the task includes migration, refactor, or page/module closure
- there are several constraints or non-obvious risks
Planning can be lightweight when:
- the task is a single local edit
- the user clearly wants direct execution
- the verification path is obvious and low risk
Even when planning is lightweight, still do a short internal structure pass before editing.
Step 4: Build the minimum plan
When planning is required, structure the work in this shape:
<files> / <action> / <verify> / <done>
Each slice should have:
- clear target files or directories
- one concrete action
- one concrete verification method
- an obvious done condition
Good slices are small enough to validate independently.
Bad slices are broad, mixed, or vague.
Planning output
When the user asked to plan first, present:
- goal
- constraints
- risks
- minimum approach
- slices
- verification method
When the user did not ask for a separate planning phase, keep this short and move into execution once the structure is clear.
Step 5: Apply in controlled slices
During implementation:
- change only files relevant to the current slice
- prefer local edits over rewrites
- follow the existing structure before introducing new abstractions
- do not smuggle in extra optimization or unrelated cleanup
- protect unrelated user changes in the worktree
If a better solution appears but expands scope, stop and surface the tradeoff before taking it.
Step 6: Verify and regress
No meaningful change is complete without verification.
Always do:
- targeted verification for the requested behavior
- regression checks for adjacent behavior likely to break
Verification should be as concrete as possible:
- build or test command
- static inspection against reference behavior
- file diff sanity check
- UI or interaction check when relevant
If you could not run verification, say exactly what was not verified and why.
Step 7: Close out cleanly
The final closeout should include:
- what changed
- how it was verified
- any remaining risks or unverified areas
Do not claim completion if validation is missing.
Hard rules
These rules override convenience:
- do not start with code edits before understanding scope
- do not exceed the requested boundary
- do not do unapproved broad refactors
- do not hide root causes with fallback patches
- do not overwrite unrelated user changes
- do not leave temporary artifacts or debug residue
Frontend and product handling
When the task is UI or product-facing:
- inspect the current visual language first
- prefer continuity with the existing or legacy implementation
- default to a restrained, dense, product-like layout
- avoid decorative redesign without clear cause
- check mobile, dark mode, and interaction states when they matter
Suggested task files
For non-trivial tasks, maintain these files when appropriate:
task_plan.mdfindings.mdprogress.md
Use them to keep the work state externalized and recoverable across long sessions.
Lightweight execution template
Use this shape when you need a short planning pass before implementation:
- Requirement
- Constraints
- Risks
- Minimum approach
- Verification
Full execution template
Use this shape for non-trivial tasks:
- Read rules and references
- Confirm requirement and boundaries
- Create slices
- Execute slice by slice
- Verify each meaningful change
- Do regression check
- Close out with evidence and risk
Example triggers
Example 1:
Input: 先分析一下这个模块迁移方案,不要直接改代码。
Action: use this skill and produce a structured plan first.
Example 2:
Input: 这个页面补上分页和删除,只改当前目录,做完帮我回归验证。
Action: use this skill, do a short plan, implement in slices, then verify.
Example 3:
Input: 帮我把这个老组件迁移到新项目,参考旧版实现,别超范围。
Action: use this skill because the task is migration-based and boundary-sensitive.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

