purgare

Detect dead code patterns and surface refactoring signals in codebases.

Updated May 20, 2026
One-click install
npx skills add https://github.com/watmin/datamancy.dev --skill purgare
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: purgare
Source: https://github.com/watmin/datamancy.dev/tree/main/purgare
Command: npx skills add https://github.com/watmin/datamancy.dev --skill purgare

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Purge dead thoughts. The datamancer purgares the code — finds structs never imported, fields never read, collections never populated, branches never taken. The cost of a dead thought is compute.

Core Features & Use Cases

  • Detects exported-but-never-imported structs, fields that are written but never read, and branches that are always the same.
  • Identifies collections that are created but never populated, and parameters that are effectively dead.
  • Use case: refactor to remove dead code paths and reduce binary size and cognitive load.

Quick Start

Scan a codebase to surface dead-code patterns and guide cleanup.

Frequently Asked Questions about purgare

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find dead code and unused structs in a Rust codebase?

Dead code detection scans for exported-but-never-imported structs and unused parameters to surface concrete refactoring signals. It identifies modules and types that consume compute without adding value, guiding cleanup to reduce binary size.

What is the best way to detect fields that are written but never read?

Static analysis identifies fields written but never read by tracing control flow and data access patterns. This highlights dead data paths within structs, delivering actionable deletion guidance to lower cognitive load.

Can static analysis find branches that are always taken the same way?

Static analysis can find branches always taken the same way by evaluating control flow paths. It surfaces these dead branches alongside never-populated collections and unused parameters, providing refactoring targets to reclaim productivity.

How do I scan for never-populated collections and dead parameters?

Scanning for never-populated collections and dead parameters involves tracing data population and usage across modules. The analysis identifies these dead code patterns and outputs concrete refactoring guidance for codebase cleanup.

Does dead code detection work for languages with modules and control flow?

Dead code detection applies to any language with modules, structs, and control flow. It requires static analysis to trace imports and execution paths, surfacing unused types and dead paths regardless of the specific compiler.

Why remove dead code paths during refactoring?

Removing dead code paths reduces both binary size and cognitive load by eliminating unused structs, unread fields, and never-taken branches. This refactoring reclaims productivity by purging compute-wasting dead thoughts from the codebase.