Skip to content

phdemotions/freshen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

/freshen

Project modernizer for Claude Code. Detects stale models, deprecated patterns, outdated frameworks, and cost optimization opportunities across any software project. Enhanced for Claude Code projects.

Install

# Copy into any project's .claude/skills/ directory
cp -r freshen/ your-project/.claude/skills/freshen/

Or clone and symlink:

git clone https://github.com/joshgonzales/freshen.git
ln -s $(pwd)/freshen your-project/.claude/skills/freshen

Usage

/freshen              Smart default: detect stack, quick scan, offer next steps
/freshen scan         Quick Haiku-powered check (~$0.01-0.05). Top 10 findings.
/freshen audit        Full 8-domain scored report (~$0.10-0.50). No changes made.
/freshen fix          Apply changes with per-batch approval. Runs audit first if needed.
/freshen self         Meta-audit: freshen checks its own freshness.
/freshen model-currency   Single domain deep-dive.

What It Checks

Domain What Applies When
Model Currency Stale AI model references (claude-3-* to claude-*-4-6, old GPT, etc.) AI models in code
API & SDK Currency Deprecated SDK patterns, old API endpoints SDK imports found
Framework Currency Outdated framework versions and patterns Always
Cost Optimization Right-sizing model usage (Haiku for scanning, Opus for reasoning) AI model usage
Dependency Freshness Outdated packages, EOL versions, deprecated libs Package manifest found
Configuration Currency Deprecated config patterns (ESLint flat config, tsconfig, etc.) Config files found
Claude Code Currency CLAUDE.md quality, skill structure, hooks, settings, model routing .claude/ detected
Pattern Currency Deprecated coding patterns per detected stack Always

How It Works

  1. Stack Detection — Reads manifest files (package.json, Podfile, pyproject.toml, etc.) to build a Stack Profile
  2. Scanning — Haiku subagents ($1/M tokens) grep for deprecated patterns across all files
  3. Analysis — Sonnet subagent ($3/M tokens) validates findings, filters false positives, scores severity
  4. Reporting — Grades the project A-F across all applicable domains with prioritized fix recommendations
  5. Fixing — Parent model generates diffs, presents BEFORE/AFTER, waits for approval before each change

Cost Efficiency

The skill practices what it preaches:

Mode Estimated Cost What Runs
scan $0.01-0.05 Haiku subagents for grep + parent synthesis
audit $0.10-0.50 Haiku scan + Sonnet analysis + parent report
fix Varies Parent model generates and applies diffs

Grading

Grade Score Meaning
A 90-100% Fully current
B 75-89% Mostly current, minor lag
C 60-74% Falling behind
D 40-59% Significantly outdated
F <40% Critically stale

Auto-fail (forces F): Known CVE, removed API/model, EOL framework.

Supported Stacks

Works on any project. Enhanced detection for:

  • Node.js — Next.js, React, Vue, Svelte, Tailwind, TypeScript
  • Swift — SwiftUI, SwiftData, SPM
  • Python — Django, Flask, FastAPI
  • Rust — Cargo, editions
  • Go — Modules
  • Ruby — Rails
  • Claude Code — CLAUDE.md, skills, hooks, settings, subagents

Keeping It Fresh

The reference table at references/current-versions.md is the ONE file to update when new framework versions or model names ship. Everything else is logic.

The skill is date-aware: it declares "Knowledge current as of: March 2026" and instructs the agent to use WebSearch for verification when running 3+ months after that date.

Run /freshen self to check if the reference table needs updating.

Structure

freshen/
├── SKILL.md                          # Core: persona, routing, stack detection
├── domains/                          # One file per modernization domain
│   ├── model-currency.md
│   ├── api-sdk-currency.md
│   ├── framework-currency.md
│   ├── cost-optimization.md
│   ├── dependency-freshness.md
│   ├── configuration-currency.md
│   ├── claude-code-currency.md
│   └── pattern-currency.md
├── prompts/                          # Subagent prompt templates
│   ├── scan.md                       # Haiku scan prompt
│   ├── analyze.md                    # Sonnet analysis prompt
│   └── report.md                     # Report generation template
├── references/
│   └── current-versions.md           # Updateable version table
├── README.md
└── LICENSE

Contributing

  1. Fork the repo
  2. Update references/current-versions.md with current versions
  3. Add detection patterns to relevant domains/*.md files
  4. Submit a PR

The most valuable contribution is keeping the reference table current.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors