Skip to content
Back to skills

Code Delta

ASecurity

Visualize proposed code changes in a structured ASCII format with file tree, impact summary, syntax-highlighted diff, and rationale. Use this skill when proposing refactors, simplifications, or any code modifications.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
tools

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill code-delta --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Delta?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Delta
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-code-delta/badge)](https://www.skillsdirectory.com/skills/majiayu000-code-delta)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-delta
description: Visualize proposed code changes in a structured ASCII format with file tree, impact summary, syntax-highlighted diff, and rationale. Use this skill when proposing refactors, simplifications, or any code modifications.
---

# Code Delta Visualization Skill

When proposing code changes, ALWAYS present them in this structured format:

## Format Template

```
╔══════════════════════════════════════════════════════════════════════════════╗
║  Change #N: [Short descriptive title]                                        ║
╠══════════════════════════════════════════════════════════════════════════════╣
║                                                                              ║
║  FILE TREE                                                                   ║
║  [root path]/                                                                ║
║  ├── path/to/                                                                ║
║  │   └── file1.tsx                          [ACTION]  ±N LOC                 ║
║  └── path/to/                                                                ║
║      └── file2.ts                           [ACTION]  -N LOC                 ║
║                                             ─────────────────                ║
║                                             Total:      -N LOC               ║
║                                                                              ║
╠══════════════════════════════════════════════════════════════════════════════╣
║  IMPACT SUMMARY                                                              ║
║  ┌─────────────────────┬──────────────┬──────────────┬─────────┐             ║
║  │ Metric              │ Before       │ After        │ Delta   │             ║
║  ├─────────────────────┼──────────────┼──────────────┼─────────┤             ║
║  │ LOC (this change)   │ —            │ —            │ -N      │             ║
║  │ Cyclomatic          │ N            │ N            │ -N      │             ║
║  │ Cognitive           │ N            │ N            │ -N      │             ║
║  │ Dependencies        │ [before]     │ [after]      │ [note]  │             ║
║  └─────────────────────┴──────────────┴──────────────┴─────────┘             ║
║                                                                              ║
╠══════════════════════════════════════════════════════════════════════════════╣
║  DIFF                                                                        ║
╚══════════════════════════════════════════════════════════════════════════════╝
```
```diff
--- a/path/to/file1.tsx
+++ b/path/to/file1.tsx
-removed line
+added line
 context line

--- a/path/to/file2.ts
+++ b/path/to/file2.ts
-removed line
+added line
```
```
╔══════════════════════════════════════════════════════════════════════════════╗
║  RATIONALE                                                                   ║
║  • Reason 1                                                                  ║
║  • Reason 2                                                                  ║
║  • Reason 3                                                                  ║
╚══════════════════════════════════════════════════════════════════════════════╝
```

## Field Definitions

### FILE TREE
- Show relative paths from a common root
- Use tree characters: `├──`, `└──`, `│`
- Actions: `[MODIFIED]`, `[ADDED]`, `[DELETED]`, `[RENAMED]`
- Show LOC change per file: `+N LOC`, `-N LOC`, `±0 LOC`
- Include total at bottom

### IMPACT SUMMARY
Required metrics:
- **LOC (this change)**: Net lines added/removed
- **Cyclomatic Complexity**: Number of independent paths through code (if/else, switch cases, loops, &&, ||)
- **Cognitive Complexity**: How difficult code is to understand (nesting depth, breaks in linear flow, recursion)
- **Dependencies**: New imports, removed imports, or "Reuse" if using existing

Optional metrics (include when relevant):
- **Test Coverage**: If tests affected
- **Bundle Size**: If significant

### DIFF
- Use ```diff syntax for red/green highlighting
- Group by file with `--- a/` and `+++ b/` headers
- Include minimal context lines for clarity
- Separate files with blank line

### RATIONALE
- Bullet points explaining why this change improves the codebase
- Focus on: reduced duplication, reuse, readability, maintainability

## Usage

After presenting a change in this format, always end with:

```
Apply? (y/n)
```

Wait for user confirmation before making changes.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.