Logo vun Find Code Simplifications

Find Code Simplifications

Communautéit
DCspirit-23
find-code-simplifications

Investigate a branch, module, or repository for non-obvious, evidence-backed code simplification opportunities such as dead surfaces, duplicated state, speculative abstractions, redundant lifecycle machinery, and hand-rolled infrastructure. Use when the user explicitly asks for a broad code simplification investigation rather than an ordinary PR review or routine final check.

Iwwersiicht

EditeurDCspirit-23
RepositoryDSH-inspired-Code-Simplification-Skill
Skill-Nummfind-code-simplifications
Stären
29
Forks
0
Matgeliwwert Fichieren
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum DCspirit-23 op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Find Code Simplifications an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/DCspirit-23/DSH-inspired-Code-Simplification-Skill/tree/main/find-code-simplifications
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/DCspirit-23/DSH-inspired-Code-Simplification-Skill.git /tmp/DSH-inspired-Code-Simplification-Skill
mkdir -p .claude/skills
cp -r /tmp/DSH-inspired-Code-Simplification-Skill/find-code-simplifications .claude/skills/find-code-simplifications
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Find Code Simplifications an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Find Code Simplifications automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Find Code Simplifications net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Find Code Simplifications

Find a few meaningful simplifications with strong evidence. Follow the code and its contracts, keep judgment active, and prefer net reductions in concepts and maintained surface area over cosmetic line-count wins.

Establish The Investigation

  1. Determine the requested scope: a branch or PR diff, named modules, or the whole repository.
  2. For branch work, establish a fixed comparison base from the user's target, PR metadata, or the verified merge base. Include staged, unstaged, and relevant untracked work when the request covers the current working tree.
  3. Read the repository instructions and the architecture, testing, dependency, compatibility, and design-decision documents that govern the selected scope.
  4. Inspect the working tree before proceeding and preserve unrelated user changes.
  5. Begin read-only. Produce findings first; edit code only when the user explicitly asks for implementation.

Complete this stage when the scope, comparison point, applicable rules, and mutation boundary are explicit.

Identify Strong Candidates

Look for simplifications where the current design costs more than it buys:

  • A public method, event, configuration option, helper, package, registry entry, or test artifact has no production consumer.
  • Tests or documentation are the only consumers, and the behavior they preserve is not load-bearing.
  • Multiple representations, caches, flags, or events mirror the same fact.
  • An interface or abstraction forces implementations to support capabilities no production caller uses.
  • A wrapper, package, layer, or registry adds indirection without owning policy, state, translation, or lifecycle.
  • A feature carries speculative generality for scenarios with no current product or platform owner.
  • An invariant, rollback path, expected-output corpus, or special-case test exists only to protect an unused surface.
  • Code added and later removed left compatibility branches, configuration, migrations, documentation, snapshots, or tests behind.
  • Hand-rolled infrastructure duplicates a standard-library feature or a well-maintained dependency and replacement would produce a real net deletion.
  • Similar branches, adapters, commands, or data transformations can share one source of truth without hiding meaningful differences.

Treat typo fixes, formatting, isolated renames, and tool-only unused-symbol reports as thin candidates unless they expose a larger simplification.

Survey Broadly

For a broad request, divide the repository by meaningful ownership or runtime domains and inspect them in parallel when subagents are available. Derive domains from the repository rather than assuming a language or architecture.

Start with the largest or most complex production surfaces in scope. Follow high-churn files, central abstractions, duplicated lifecycle code, public interfaces, and configuration paths before stopping at obvious unused symbols. Do not let the first plausible candidate end the survey.

Static-analysis tools may generate leads. Treat their output as evidence to investigate, not as proof, because dynamic loading, dependency injection, reflection, generated code, configuration, serialization, wire strings, and external consumers may hide real usage.

Audit Trust And Lifecycle Boundaries

For every defensive copy, validator, freeze, callback capture, or normalization layer, identify where the value originates and who owns it next. Preserve validation at trust boundaries such as parsers, configuration loaders, queues, model or tool input, durable storage, workers, processes, and wire decoders. Question defensive machinery between typed same-process collaborators only when the repository does not promise hostile mutation or independent ownership.

For asynchronous code, map sentinels, readiness promises, cancellation paths, disposers, queues, and state flags to distinct owners and transitions. When several mechanisms encode the same settlement or liveness fact, consider one lifecycle controller. Preserve separate mechanisms when they protect genuinely different outcomes, ownership boundaries, publication guarantees, rollback, callback containment, or shutdown behavior.

Evaluate Dependency Swaps

Prefer an available standard-library or platform feature when it covers the required behavior. Before proposing an external dependency:

  • Read the hand-rolled implementation and identify the exact behavior the dependency would replace.
  • Follow the repository's dependency policy and verify maintenance, adoption, compatibility, and transitive footprint when current package facts matter.
  • Account for residual semantics and glue the dependency does not cover.
  • Compare implementation, dedicated tests, documentation, and maintenance burden removed against wrapper and dependency-management code added.
  • Reject swaps that relocate the same complexity or broaden the public contract.

Classify a swap that changes observable behavior as a design-change candidate, not a cleanup.

Prove Or Reject Every Candidate

Classify consumers before reporting a candidate:

  • Production: runtime source, public entry points, loaders, manifests, configuration paths, generated registries, deployment code, and supported examples.
  • Non-production: tests, documentation, snapshots, fixtures, generated expected output, and comments.
  • Ambiguous: scripts, examples, plugins, reflection targets, wire formats, migration code, and externally consumable APIs. Resolve their role before drawing a conclusion.

Use rg first. Search exact symbols, event or command names, configuration keys, package names, method-call forms, serialization names, and wire strings, then read the relevant call sites. Inspect history or design records when they may explain intentional complexity.

Reject or downgrade a candidate when a production or plausible external consumer exists, a current contract requires it, recorded rationale still applies, unrelated churn outweighs the simplification, or the evidence cannot distinguish dead code from dynamic use. Separate behavior-changing ideas from behavior-preserving cleanup and state the tradeoff instead of quietly crossing that boundary.

Report The Investigation

Report:

  • The scope, comparison base when applicable, and areas surveyed.
  • Strong candidates ordered by expected net value, not by candidate count.
  • For each candidate: location, consumer evidence, current cost, proposed simplification, net benefit, behavior or contract impact, risk, confidence, and focused verification.
  • Behavior-preserving cleanup separately from design-change candidates.
  • Representative rejected or downgraded candidates when they demonstrate that important boundaries were checked.
  • Checks performed and their passed, failed, skipped, or unrun status.

An investigation with no strong candidate is a valid result. Say so directly rather than promoting thin guesses.

Implement Only When Requested

When the user authorizes implementation, apply the smallest coherent change for the selected candidates. Preserve unrelated work and avoid opportunistic refactoring. Obtain explicit agreement before implementing a candidate that changes behavior, public API, durable data, wire format, migration history, or dependency policy.

After editing, repeat the consumer searches, run the repository's relevant focused checks plus git diff --check, and inspect the outgoing diff for accidental scope growth. Report exactly which checks passed, failed, were skipped, or were not run. Leave commits, pushes, PR updates, and branch housekeeping to separate user authorization.

Completion Criteria

Finish only when:

  • The requested scope and every major production area within it have been accounted for.
  • Every reported candidate has call-site or contract evidence and a credible counterargument assessment.
  • Every observable behavior difference is explicit.
  • Static-analysis leads have been verified against real consumers.
  • Findings are prioritized by net simplification value.
  • The working tree remains unchanged unless implementation was explicitly authorized.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Find Code Simplifications?

Investigate a branch, module, or repository for non-obvious, evidence-backed code simplification opportunities such as dead surfaces, duplicated state, speculative abstractions, redundant lifecycle machinery, and hand-rolled infrastructure. Use when the user explicitly asks for a broad code simplification investigation rather than an ordinary PR review or routine final check.

Firwat Find Code Simplifications op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Find Code Simplifications besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Find Code Simplifications an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/DCspirit-23/DSH-inspired-Code-Simplification-Skill/tree/main/find-code-simplifications an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Find Code Simplifications benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Find Code Simplifications benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Find Code Simplifications domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Find Code Simplifications gratis?

Jo. De Skill gëtt vum DCspirit-23 ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇