hermes atlas
168·repos hermes·v0.10.0 ★ star this repo

Sahil-SS9/hermes-simplify-swarm

Multi-agent code simplification skill for Hermes Agent. 3 parallel sub-agents (Hygiene, Clarity, Correctness) with risk-tiered application. Inspired by Claude Code's /simplify.

★ 0 licenseMIT updated2026-06-08

Simplify Swarm is a multi-agent code refinement skill for Hermes Agent designed to automate deep code cleaning and technical debt reduction. It utilizes three specialized sub-agents—Hygiene, Clarity, and Correctness—to analyze codebases for dead code, structural bloat, and complex bugs like N+1 queries or memory leaks. Findings are triaged into a risk-tiered system that separates safe automated fixes from risky architectural changes requiring human review. The tool supports TypeScript, JavaScript, Python, and Go, serving as a comprehensive pre-PR inspection layer for developers.

  • Three-agent swarm targeting hygiene, structural clarity, and logic correctness
  • Risk-tiered triage system for safe, careful, and risky code modifications
  • Language-specific detection for N+1 queries and concurrency anti-patterns
full readme from github

Simplify Swarm — Multi-Agent Code Simplification for Hermes Agent

Most code simplification tools check for style violations and linting. Simplify Swarm breaks your code down into risk tiers and cleans with surgical precision.

Three parallel subagents attack your diff from different angles: Hygiene hunts dead code, AI slop, pass-through wrappers, and stale state — the stuff that rots silently. Clarity goes after duplication, naming rot, nested ternaries, and structural bloat — the stuff that makes your teammates sigh. Correctness traces N+1 queries, memory leaks, concurrency races, leaky abstractions, and silent failures — the stuff that breaks at 3am.

Then a consolidator merges, de-duplicates, and triages everything into a risk-tiered application order: SAFE (auto-applied — unused imports, dead branches), CAREFUL (applied with test verification — renames, extracted helpers), RISKY (flagged for human review — N+1 restructures, public API changes, concurrency fixes).

It's read-only during analysis — finds problems, doesn't touch your code until you've seen the consolidated report. Opt-in only, no auto-trigger. Run /simplify when you want to know what you actually shipped.

Built by synthesising 11 implementations: Anthropic's official code-simplifier plugin, nicknisi's essentials fork (AI slop detection, dead code removal), Navigator's ROI-gated config-driven approach, Addy Osmani's language-specific guidance and Chesterton's Fence, OMC's ai-slop-cleaner and 4-pass workflow, ECC's refactor-cleaner (knip/depcheck/ts-prune), WalletConnect's early-return patterns, Meta OpenEnv's TDD Red-Green-Refactor integration, GitHub Copilot's structured output format, and the Claude Code /simplify stop-hook architecture.

Langauge-specific detectors for TypeScript/JavaScript, Python, and Go. N+1 query patterns. Memory leak signatures. Concurrency anti-patterns. Silent failure spots. All the things a general-purpose reviewer misses because it's looking too broad.

Companion to Hermes Agent's built-in simplify-code skill. That one's 175 lines, general-purpose, fast. This one's the deep clean — use it before PRs, before deploys, when you inherit code you don't trust.

Upstream enhancement PR is open with the 5 highest-value additions (risk-tiered application, Chesterton's Fence, AI slop detection, silent failure detection, structured output): https://github.com/NousResearch/hermes-agent/compare/main...Sahil-SS9/KenseiAgent:feat/enhance-simplify-code

If you write a skill that pairs with this (CI integration, auto-test generator for findings, language pack for Rust/Zig/Kotlin), open a PR. Bug reports appreciated. If the Correctness agent flagged your code and you're annoyed — it's designed to be thorough.

Installation

mkdir -p ~/.hermes/skills/software-development
cd ~/.hermes/skills/software-development
git clone https://github.com/Sahil-SS9/hermes-simplify-swarm.git simplify-swarm

No dependencies. No config required. Works on any Hermes Agent install.

Quick Start

"simplify my changes"
/cleanup
"deslop this module"
"/simplify focus on correctness"

The skill auto-detects scope via git diff. SAFE changes applied automatically. CAREFUL changes applied with test verification. RISKY findings flagged for you to decide.

The Three Agents

Agent What It Hunts Examples
Hygiene (SAFE) Dead code, AI slop, redundant abstractions, stale state, utility discovery Unused imports, as any casts, pass-through wrappers, duplicate state stores
Clarity (CAREFUL) Duplication, naming, structure, consistency Nested ternaries, data/temp variables, 80-line functions, mixed arrow/function styles
Correctness (RISKY) N+1 queries, memory leaks, concurrency, leaky abstractions, silent failures ORM queries in loops, unclosed resources, race conditions, empty catch blocks

Configuration

Optional .kensei/simplify.yaml in your project root:

simplify:
  auto_apply: true          # Skip approval for SAFE+CAREFUL tiers
  skip_patterns:
    - "*.test.*"
    - "*.generated.*"
  max_file_lines: 800

Credits

Built by Sahil Saghir (KENSEI). Inspired by Claude Code's /simplify and the upstream Hermes Agent simplify-code skill.

License

MIT — use it, fork it, ship it.