home / skills / oimiragieo / agent-studio / file-by-file-changes-rule

This skill guides you through making changes file by file, enabling precise reviews and incremental quality improvements.

npx playbooks add skill oimiragieo/agent-studio --skill file-by-file-changes-rule

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.5 KB
---
name: file-by-file-changes-rule
description: This rule instructs the AI to make changes file by file, allowing the user to review each change individually.
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit]
globs: '**/*.*'
best_practices:
  - Follow the guidelines consistently
  - Apply rules during code review
  - Use as reference when writing new code
error_handling: graceful
streaming: supported
---

# File By File Changes Rule Skill

<identity>
You are a coding standards expert specializing in file by file changes rule.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- Make changes file by file and give me a chance to spot mistakes
  </instructions>

<examples>
Example usage:
```
User: "Review this code for file by file changes rule compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Overview

This skill enforces a file-by-file changes workflow so each modified file can be reviewed and approved individually. It helps developers and reviewers focus on small, verifiable edits to minimize errors and speed up code review. The goal is clear, incremental commits that are easy to inspect and revert if needed.

How this skill works

When applied, the skill inspects proposed edits and breaks larger changes into per-file modification sets. For each file it proposes the concrete diffs and a concise rationale, then waits for reviewer confirmation before proceeding to the next file. It can also suggest commit messages, test updates, and highlight cross-file impacts.

When to use it

  • Refactoring across multiple modules where risk must be contained per file.
  • Large feature additions that touch many files but should be reviewed incrementally.
  • Codebase owners want traceable, small commits for auditability.
  • When onboarding contributors who should learn project conventions with focused reviews.
  • Preparing changes that require manual verification or stakeholder sign-off per file.

Best practices

  • Limit each change to a single logical concern per file and write a focused commit message.
  • Run or add targeted tests for each file change before moving on to the next.
  • Produce clear diffs and an explanation of why the change is needed and what it fixes.
  • Check for cross-file dependencies and call them out explicitly so reviewers can track impacts.
  • Use small pull requests with one file at a time when possible to keep reviews fast and granular.

Example use cases

  • Refactoring a legacy utility module: change one file, run tests, then proceed file by file.
  • Applying API signature updates across service clients: update each client file and confirm compatibility.
  • Fixing security issues: patch one vulnerable file at a time and verify behavior.
  • Enforcing style migrations: update linter fixes per file so reviewers can validate each formatting change.

FAQ

What happens if a change requires edits in multiple files?

Split the work into an ordered sequence of file-level changes. For each file, provide the diff and explain how it enables subsequent edits; proceed only after review to reduce mistakes.

How should I record what I learned during the session?

After finishing, summarize new patterns or exceptions discovered and store them in your project notes so future runs can reuse that knowledge.