darkmatter/skills

codebase-cleanup

Multi-pass refactor / code-quality cleanup designed to be dispatched as 8 specialist subagents (one per cleanup concern), each running a research → critical-assessment → high-confidence-implementation cycle.

Vedi sorgente
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

Codebase cleanup — 8-pass refactor

Eight independent specialist passes over a codebase, each scoped to one quality concern. Designed to be run as 8 separate subagent sessions (or sequentially in one) so each pass gets a clean context window and can't be tempted to bleed into another's territory.

Every pass follows the same three-phase protocol — see reference/protocol.md. The recommended pass ordering and why is in reference/pass-ordering.md.

Apply codebase-design throughout: keep each capability together, expose complete operations, and extract only when the split hides complexity or enables useful reuse. Preserve configured line limits with documented, targeted exceptions. File count and net deleted lines are not goals.

When to use

  • "Clean up the codebase" / "do a tech-debt pass"
  • "Refactor for quality before we ship"
  • "Find and remove dead code / AI slop / weak types"
  • Onboarding a codebase and wanting to know what's actually load-bearing
  • Pre-1.0 / pre-release quality sweep
  • Periodic (quarterly) hygiene runs

When NOT to use

  • Narrow targeted asks ("remove this one function", "fix this one type")
  • Net-new feature work
  • Tight deadline / minimum-viable-fix scenarios — this is a deliberate, careful sweep
  • Codebases under active heavy refactor by humans (the passes will fight in-flight work)

The 8 passes

Run in this order (rationale in reference/pass-ordering.md). Each links to the full subagent prompt:

  1. AI slop & stale comments → reference/passes/01-ai-slop.md

Remove generated noise, in-motion-work comments, larp, unhelpful boilerplate.

  1. Legacy / deprecated / fallback code → reference/passes/02-legacy-removal.md

Remove dead branches, deprecated APIs, fallback paths that no longer fall back to anything live.

  1. Unused code → reference/passes/03-unused-code.md

knip-class analysis: exports/files/deps that nothing imports.

  1. Circular dependencies → reference/passes/04-circular-deps.md

madge-class analysis: untangle import cycles.

  1. Weak types → reference/passes/05-weak-types.md

Replace any / unknown / Object / dynamic / interface{} with real types backed by research.

  1. Type consolidation → reference/passes/06-type-consolidation.md

Find duplicated / near-duplicated type definitions and unify.

  1. Defensive programming → reference/passes/07-defensive-programming.md

Remove try/catch and null-guards that don't handle a real input boundary.

  1. DRY / dedup → reference/passes/08-dry.md

Consolidate duplicated logic only where it reduces complexity (not the other way).

Tools

Each pass spec lists the tooling it expects (knip, ts-unused-exports, madge, jscpd, language-specific linters, etc.). The skill ships no scripts — orchestration happens in the calling agent runtime, which already has bash/edit/grep/etc.

Reference

  • reference/protocol.md — the 3-phase research/assess/implement protocol every pass follows
  • reference/pass-ordering.md — why this order, and which passes can run in parallel
  • reference/passes/*.md — one self-contained subagent prompt per pass
dallo stesso repository

Altri Skills

Tutti gli Skills
darkmatter
Community

alchemy

Configure, develop, deploy, review, and troubleshoot Alchemy v2 infrastructure for Darkmatter TypeScript/Effect apps. Triggers for alchemy.run.ts, alchemy dev, public preview URLs, webhook testing, Cloudflare/AWS providers, stages, profiles, state stores, bindings, CI deploys, or examples from alchemy-run/alchemy-effect. Prefer Alchemy for new org deploys. Do NOT trigger for unrelated blockchain Alchemy APIs unless the user explicitly means alchemy.run.

installazioni
2
GitHub Stars
0
Aggiornato
26 set
darkmatter
Community

darkmatter-design-system

Default design system — darkmatter's dark-first, terminal-inspired design system , built on Tailwind CSS v4, React 19, and Radix UI. Use this as the default design system when working in an app that does not already have an established design system or guidelines. Use it for dashboards, trading/monitoring consoles, forms, tables, settings, navigation, or any screen that should look and feel like darkmatter's brand. This is the canonical source for darkmatter components, tokens (the OKLCH --n- ra

installazioni
2
GitHub Stars
0
Aggiornato
26 set
darkmatter
Community

darkmatter-gitops-conventions

Safe-change playbook for the darkmatter/gitops repo — validation before commit (kubeconform with CI-identical flags, yq for YAML manifests, jq for SOPS JSON, git diff --check), sha-pinned images, KSOPS/SOPS secret editing rules, rollback via revert, and how ArgoCD reconciles. Use for ANY change to darkmatter/gitops (manifests, Helm values, apps/.yaml, secrets), when asked to bump an image tag, wire a secret, or roll back a deploy. Also use when tempted to kubectl apply/edit/patch anything — the

installazioni
2
GitHub Stars
0
Aggiornato
26 set
darkmatter
Community

darkmatter-repo-setup

- Use when setting up a new repo, onboarding an existing repo to darkmatter standards, running a compliance check, or when the user says "set up this repo", "bring repo up to standards", "apply template", or "audit repo". Checks and installs the org TypeScript toolchain (Bun catalog, Effect 4, effect-agent, effect-orpc, Postgres-first data, tsgo, oxlint/oxfmt, Vitest, vite-plus, React 19, shadcn), Nix flake-parts devshell, ops/ surface, CI pipeline, and AGENTS.md conventions.

installazioni
2
GitHub Stars
0
Aggiornato
26 set