Pragmatic Review logo

Pragmatic Review

CommunityPopular
heyitsnoah
pragmatic-review

Interactive pragmatic code review focusing on YAGNI and KISS principles. Use when the user asks for a code review, wants to check for over-engineering, or wants a YAGNI/KISS-focused review of changes.

Overview

Publisherheyitsnoah
Repositoryclaudesidian
Skill namepragmatic-review
Stars
2.6K
Forks
192
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by heyitsnoah on GitHub. Read the source before you install it.

Installation

Install the Pragmatic Review AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/heyitsnoah/claudesidian/tree/main/.agents/skills/pragmatic-review
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/heyitsnoah/claudesidian.git /tmp/claudesidian
mkdir -p .claude/skills
cp -r /tmp/claudesidian/.agents/skills/pragmatic-review .claude/skills/pragmatic-review
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pragmatic Review in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pragmatic Review on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pragmatic Review is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Pragmatic Code Review: YAGNI & KISS Focus

You will perform an interactive code review with laser focus on YAGNI (You Aren't Gonna Need It) and KISS (Keep It Simple, Stupid) principles.

Review Modes

Default mode: Fast YAGNI/KISS-focused review

  • Scans for over-engineering, unused abstractions, unnecessary complexity
  • Quick security and performance checks (OWASP basics, obvious N+1 queries)
  • Self-reflection to validate findings with evidence

Deep mode (--deep flag): Multi-pass comprehensive review

  • Pass 1: Security (OWASP Top 10, input validation, auth issues)
  • Pass 2: Architecture (SOLID principles, separation of concerns)
  • Pass 3: Logic (edge cases, error handling, correctness)
  • Pass 4: Performance (algorithm complexity, resource leaks)
  • Pass 5: YAGNI/KISS (over-engineering, unnecessary abstractions)
  • Pass 6: Maintainability (readability, tests, documentation)
  • Self-reflection after all passes

Use --deep when:

  • Security-critical changes (auth, payment, data handling)
  • Core architecture modifications
  • Complex logic changes with many edge cases
  • Performance-sensitive code paths

Use default mode when:

  • Feature additions
  • Bug fixes
  • Refactoring
  • Documentation changes

CI mode (--ci flag): Non-interactive mode for GitHub Actions

  • Skips ALL interactive prompts
  • Auto-selects: all branch changes vs base branch
  • Uses $GITHUB_BASE_REF environment variable if available
  • Outputs all findings at once as markdown (summary view)

Step 1: Determine Review Scope

Check Current Git State

First, verify we're in a git repository by running:

  • test -d .git to check if .git directory exists

If not in a git repository, ask the user to specify files to review manually.

If in a git repository, gather information:

Current branch:

Run: git rev-parse --abbrev-ref HEAD

Default branch detection:
  1. Try: git rev-parse --verify main
  2. If that fails, try: git rev-parse --verify master
  3. If that fails, try: git rev-parse --verify develop

If user specified --base [branch] in arguments, use that instead.

Working directory status:

Run: git status --short | head -20

Present Options to User

If --ci flag is present: Skip all interactive prompts and auto-select option 2: Review all changes on current branch vs base.

Unless --auto or --ci flag is present, ask the user:

📋 CODE REVIEW SCOPE SELECTION
════════════════════════════════

What would you like to review?

1️⃣  Current uncommitted changes
2️⃣  All changes on current branch (compared to [detected default branch])
3️⃣  Specific files or directory
4️⃣  Last N commits
5️⃣  Staged changes only

Please enter your choice (1-5):

Step 2: YAGNI/KISS Analysis Framework

For each file identified, analyze for these patterns:

YAGNI Detection Patterns

  1. Unused abstractions

    • Interfaces/protocols with single implementations
    • Abstract base classes with one concrete subclass
    • Generic types that are always the same
  2. Premature flexibility

    • Configuration for things that never change
    • Plugin systems with no plugins
    • Feature flags that are always on/off
  3. Over-engineering indicators

    • Factory classes for simple objects
    • Builder patterns for objects with 2-3 fields
    • Event systems with single listeners
  4. Speculative code

    • "TODO: might need this" comments
    • Commented-out code "just in case"
    • Unreachable code paths
    • Methods that are never called
  5. The GenericButton Anti-Pattern

    • Components with 8+ optional parameters serving different use cases
    • So many props that using it is as complex as writing from scratch
  6. Premature Abstraction - Rule of Three

    • Abstraction created at 1st or 2nd duplication (wait for 3rd!)
    • Reference: Martin Fowler - "Tolerate duplication twice, refactor on the third"

KISS Violation Patterns

  1. Verbose implementations

    • Can be reduced by >50% lines
    • Reimplements standard library functions
    • Complex regex when simple string operations work
  2. Abstraction addiction

    • More than 3 levels of inheritance/wrapping
    • Interfaces between every layer
  3. Clever code

    • Needs extensive comments to explain
    • Uses obscure language features unnecessarily
    • One-liners that should be 5 clear lines
  4. Catch-Log-Exit Anti-Pattern

    • Catching exceptions just to log and exit
    • Replaces actual error with a guess about what went wrong
    typescript
    // TERRIBLE: replaces actual error with a guess
    try {
      await createNewBranch({ branchName, cwd })
    } catch (error) {
      console.error('Error: Not in a git repository') // Maybe wrong!
      process.exit(1)
    }
    
    // CORRECT: let it throw naturally
    await createNewBranch({ branchName, cwd })

Security Patterns to Check

Even in a YAGNI/KISS review, flag critical security issues:

  1. SQL Injection

    • String concatenation in SQL queries
    • Missing parameterized queries
  2. Authentication/Authorization

    • Hardcoded secrets
    • Weak defaults: SECRET = os.getenv('KEY', 'default')
    • JWT without expiration
  3. Unvalidated External Inputs

    • URL parameters used directly without validation
    • API response data trusted without schema validation

Performance Patterns to Check

Flag obvious performance issues:

  1. N+1 Query Problems

    • Loops that make database calls
    • Missing eager loading
  2. Inefficient Algorithms

    • O(n²) where O(n) or O(n log n) would work
    • Unnecessary nested loops

Step 3: Perform Analysis

Check for --deep flag: If present, use Multi-Pass Deep Mode with 6 sequential passes. Otherwise, use Fast YAGNI/KISS Mode.

IMPORTANT: Only analyze code that was actually changed in this review scope. Do not flag pre-existing issues.

Step 3.5: Self-Review Pass

Before presenting findings, validate each issue:

  1. Evidence Check:

    • Can I provide a link/reference supporting this criticism?
    • Have I explained WHY this matters?
  2. Severity Validation:

    • Is this rating accurate (High/Medium/Low)?
    • Would this issue actually cause problems?
  3. YAGNI-Specific Checks:

    • If flagging duplication: Is this the 3rd+ occurrence?
    • Can this be refactored later when we have more information?

Remove or downgrade any issues that fail these checks.

Step 4: Interactive Review Process

Issue Severity Prefixes

Use these prefixes to communicate priority:

PrefixMeaningAction Required
issue:Bug, correctness problemMust fix before merge
nit:Minor improvement, styleOptional, don't block
thought:Design considerationDiscuss, may defer
suggestion:Specific improvement with codeConsider seriously

Interactive Walkthrough

For each issue, present:

═══════════════════════════════════════
Issue [current] of [total]
═══════════════════════════════════════

📁 File: [filename]
📍 Lines: [start-end]
🏷️  Type: [YAGNI | KISS | Both]
🎯 Severity: [High | Medium | Low]

CURRENT CODE:
[show actual code snippet]

ISSUE DETECTED: [Specific description]

WHY THIS MATTERS: [Explain the real cost/problem]

SUGGESTED SIMPLIFICATION:
[Show the simpler alternative code]

═══════════════════════════════════════

What would you like to do?
1. ✅ Accept - Add to fix list
2. ❌ Skip - Keep current code
3. 💬 Discuss - Mark for team review
4. 👀 Context - See more surrounding code
5. ⏹️ Stop - End review here

Step 5: Core Review Rules

ALWAYS Flag These YAGNI Issues:

  1. Interfaces with single implementation
  2. Unused code - functions/methods with zero callers
  3. Speculative database fields - columns always NULL
  4. Premature optimization - caching before measuring

ALWAYS Flag These KISS Violations:

  1. Standard library reimplementation
  2. Excessive abstraction layers
  3. Configuration over convention - 100 lines config for 50 lines code

DON'T Flag These:

  1. Necessary complexity - error handling, security measures
  2. Domain complexity - business rules that ARE complex
  3. Team conventions - agreed-upon patterns

Step 6: Final Summary

📝 PRAGMATIC REVIEW COMPLETE
═══════════════════════════════

Review Statistics:
• Files reviewed: [X]
• Lines changed: [Y]

Issues Found: [Y total]
• Critical (blocking): [count]
• High priority: [count]
• Medium: [count]
• Low: [count]

COMPLEXITY REDUCTION POTENTIAL:
• Lines removable: ~[total] (-X%)
• Unnecessary abstractions: [count]

TOP 3 QUICK WINS:
1. [Biggest impact, easiest change]
2. [Second biggest impact]
3. [Third biggest impact]

RECOMMENDATION: [Clear ship/don't ship with reasoning]

═══════════════════════════════

Command Parameters Reference

  • --auto : Skip interactive prompts, use defaults (uncommitted changes)
  • --ci : CI mode - skip ALL prompts, review branch vs base
  • --deep : Enable 6-pass comprehensive review
  • --branch [name] : Review specific branch
  • --base [branch] : Compare against this base branch

Examples:

  • /pragmatic-review - Interactive mode
  • /pragmatic-review --auto - Review current changes automatically
  • /pragmatic-review --ci - CI mode for GitHub Actions
  • /pragmatic-review --deep - Comprehensive 6-pass review

Core Philosophy

When in doubt, remember:

  1. YAGNI: Features cost 4x: build time, carry cost, repair cost, opportunity cost
  2. KISS: Debugging is twice as hard as writing - if you write the cleverest code possible, you're by definition not smart enough to debug it
  3. Rule of Three: Tolerate duplication twice, refactor on the third
  4. Pragmatic: Ship working software today, perfect it tomorrow

Your role is to be the champion of simplicity. Every line deleted is a victory.

References

Frequently asked questions

What does the Pragmatic Review AI skill do?

Interactive pragmatic code review focusing on YAGNI and KISS principles. Use when the user asks for a code review, wants to check for over-engineering, or wants a YAGNI/KISS-focused review of changes.

Why use Pragmatic Review on TypingMind?

Because you install it once and use it with any model. Pragmatic Review is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pragmatic Review in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/heyitsnoah/claudesidian/tree/main/.agents/skills/pragmatic-review. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Pragmatic Review?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pragmatic Review?

As many as you like. As long as a model supports skills, you can use Pragmatic Review with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pragmatic Review AI skill free?

Yes. It is published on GitHub by heyitsnoah under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇