Skip to content
Back to skills

Project Hygiene

ASecurity

Audit and enforce codebase hygiene across any project: eliminate dead code, purge unused dependencies and exports, enforce architectural module boundaries, clear stale build caches, and verify type safety.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 6, 2026
ai-agentsjavascripttypescriptjavabashnodeapi

Works with

  • api

Security analysis

A100/100

Scanned November 6, 2026

npx -y skills add bepaldes/heimdall-agent --skill project-hygiene --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Project Hygiene?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Project Hygiene
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bepaldes-project-hygiene/badge)](https://www.skillsdirectory.com/skills/bepaldes-project-hygiene)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: project-hygiene
description: Audit and enforce codebase hygiene across any project: eliminate dead code, purge unused dependencies and exports, enforce architectural module boundaries, clear stale build caches, and verify type safety.
---

# Project Hygiene Skill (`project-hygiene`)

Use this skill to conduct repeatable, automated code and repository hygiene sweeps across any software project. It is generic, language-aware, and safe to execute periodically or prior to releases.

## The 4-Phase Hygiene Audit

### Phase 1: Boundary & Architectural Integrity
Verify that no forbidden imports or layer violations exist:
- In TypeScript/JavaScript monorepos:
  ```bash
  pnpm boundaries   # or npx dependency-cruiser --config .dependency-cruiser.js src
  ```
- In modular monoliths: assert zero cross-schema direct queries and zero imports bypassing public interfaces (e.g. `@podium/contracts`).

### Phase 2: Dead Code & Orphaned Export Detection
Identify unreferenced exports, unused files, and stale packages:
- Run AST-based dead code analyzers:
  ```bash
  npx knip
  # or
  npx ts-prune
  ```
- Rule: Do not delete public contract interfaces or migration registry exports. Focus on unreferenced internal utilities, dead helpers, and orphaned test files.

### Phase 3: Workspace & Cache Purging
Reclaim disk space and eliminate cached build artifacts that mask clean build errors:
- Remove build outputs (`dist/`, `.next/`, `build/`, `out/`).
- Remove compiler and test caches (`.tsbuildinfo`, `.turbo/`, `.pytest_cache/`, `e2e/test-results/`).
- Remove temporary provisioning logs, obsolete scratch files (`.openapi-spec.txt`, `.provision-*.txt`, `tmp-*.mjs`).
- Never delete node_modules or source fixtures unless explicitly requested.

### Phase 4: Type Safety & Validation Gate
Confirm that zero syntax or compilation regressions were introduced:
- Run strict compilation check:
  ```bash
  pnpm build
  # or
  npx tsc --noEmit
  ```
- Run unit test suite:
  ```bash
  pnpm test
  ```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.