kasperjunge

code-review

360
28
# Install this skill:
npx skills add kasperjunge/agent-resources --skill "code-review"

Install specific skill from multi-skill repository

# Description

Use when reviewing code changes before committing, after implementing features, or when asked to review. Triggers on staged changes, PR reviews, or explicit review requests.

# SKILL.md


name: code-review
description: Use when reviewing code changes before committing, after implementing features, or when asked to review. Triggers on staged changes, PR reviews, or explicit review requests.


Code Review

Rigorous code review focused on quality, maintainability, and architectural soundness.

When to Use

  • After implementing a feature or fix
  • Before committing changes
  • When explicitly asked to review code
  • Before creating a PR

Method

Start by inspecting the changes. If on the main branch, review the staged git diff. If on a different branch, review committed and uncommitted changes compared to main.

Dispatch two subagents to carefully review the code changes. Tell them they're competing with another agent - whoever finds more legitimate issues wins honour and glory. Make sure they examine both architecture AND implementation, and check every criterion below.

Review Criteria

1. Code Quality

Check Look For
DRY Duplicated logic, copy-pasted code, repeated patterns that should be abstracted
Code Bloat Unnecessary code, over-engineering, premature abstractions, dead code
Bugs Logic errors, edge cases, off-by-one errors, null/undefined handling

2. Code Slop & Technical Debt

Symptom Description
Magic values Hardcoded strings/numbers without constants
Inconsistent naming Mixed conventions, unclear names
Missing error handling Unhandled exceptions, silent failures
TODO/FIXME comments Deferred work that should be tracked
Commented-out code Delete it or explain why it exists
Dependency bloat New deps when stdlib/existing deps suffice

3. Architecture (in context of broader system)

Principle Review Questions
Modularity Are changes properly bounded? Do they respect module boundaries?
Cohesion Does each unit have a single, clear responsibility?
Separation of Concerns Is business logic mixed with presentation/data access?
Information Hiding Are implementation details properly encapsulated?
Coupling Does this create tight coupling? Are dependencies appropriate?

4. Devil's Advocate

Challenge the implementation:
- Is this the simplest solution? Could it be simpler?
- What happens under load/scale?
- What are the failure modes?
- What assumptions might be wrong?
- Is there a more fundamentally correct approach, even if harder?

5. Test Effectiveness

Check Criteria
Coverage Are the important paths tested?
Meaningful assertions Do tests verify behavior, not implementation?
Edge cases Are boundaries and error conditions tested?
Readability Can you understand what's tested from test names?
Fragility Will tests break on valid refactors?

Output Format

Report findings organized by severity:

## Code Review Findings

### Critical (must fix)
- [Issue]: [Location] - [Why it matters]

### Important (should fix)
- [Issue]: [Location] - [Recommendation]

### Minor (consider fixing)
- [Issue]: [Location] - [Suggestion]

### Positive Observations
- [What was done well]

Common Mistakes

Mistake Correction
Surface-level review Dig into logic, trace data flow
Ignoring context Review changes in relation to the system
Only finding negatives Note what's done well
Vague feedback Be specific: file, line, concrete suggestion
Bikeshedding Focus on impact, not style preferences

Red Flags - STOP and Investigate

  • New dependencies added without clear justification
  • Changes that bypass existing patterns without explanation
  • Test coverage decreased
  • Complex logic without tests
  • Security-sensitive code modified

# README.md

# 🧩 agent-resources (agr) **A package manager for AI agents.** Install agent skills from GitHub with one command. [![PyPI](https://img.shields.io/pypi/v/agr?color=blue)](https://pypi.org/project/agr/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Note: Support for rules, subagents, and slash commands has been removed. Most AI coding agents are converging on skills as the standard format, so agr now focuses exclusively on skills. To convert your existing rules, commands, or subagents to skills, run:
bash agrx kasperjunge/migrate-to-skills agrx kasperjunge/migrate-to-skills -p "convert files in ./my-commands"


Getting Started

Install agr CLI:

pip install agr

Install your first skill:

agr add anthropics/skills/frontend-design

That's it. The skill is now available in Claude Code.


What is agr?

agr installs agent skills from GitHub directly into your .claude/skills/ folder.

agrx runs skills instantly from your terminal — one command, no setup.


Install Skills

agr add anthropics/skills/frontend-design     # Install a skill
agr add anthropics/skills/pdf anthropics/skills/mcp-builder   # Install multiple

Handle format

username/skill-name         → From user's agent-resources repo
username/repo/skill-name    → From a specific repo
./path/to/skill             → From local directory

Run Skills From Your Terminal

agrx anthropics/skills/pdf                              # Run a skill instantly
agrx anthropics/skills/pdf -p "Extract tables from report.pdf"   # With a prompt
agrx anthropics/skills/skill-creator -i                 # Run, then continue chatting

Team Sync

Your dependencies are tracked in agr.toml:

dependencies = [
    {handle = "anthropics/skills/frontend-design", type = "skill"},
    {handle = "anthropics/skills/brand-guidelines", type = "skill"},
]

Teammates run:

agr sync

Create Your Own Skill

agr init my-skill

Creates my-skill/SKILL.md:

---
name: my-skill
description: What this skill does.
---

# My Skill

Instructions for the agent.

Test it locally:

agr add ./my-skill

Share it:

# Push to GitHub, then others can:
agr add your-username/my-skill

All Commands

Command Description
agr add <handle> Install a skill
agr remove <handle> Uninstall a skill
agr sync Install all from agr.toml
agr list Show installed skills
agr init Create agr.toml
agr init <name> Create a new skill
agrx <handle> Run skill temporarily

Community Skills

# Go development — @dsjacobsen
agr add dsjacobsen/golang-pro

# Drupal development — @madsnorgaard
agr add madsnorgaard/drupal-expert

Built something? Share it here.


[Documentation](https://kasperjunge.github.io/agent-resources/) · [MIT License](LICENSE)

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.