004-staleness-detection

004-staleness-detection is an agent for Claude Code from paulbreuler/limps. It costs 0 tokens per session (419 once invoked), scanned A, original, MIT.

A checker that finds context files whose information may be out of date and reports how old they are.

In plain words
What is it for?
Use it to check the freshness of all context files, list only stale files, review files for a specific plan, and show warnings when old context is used.
Why use it?
It helps prevent an agent from relying on old project instructions or reference documents without warning you.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/paulbreuler/limps/004-staleness-detection
Clone the repo
git clone --depth 1 https://github.com/paulbreuler/limps

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 004-staleness-detection

README.md
[![agentmods](https://agentmods.dev/badge/agents/paulbreuler/limps/004-staleness-detection.svg)](https://agentmods.dev/agents/paulbreuler/limps/004-staleness-detection)
Your own site
<a href="https://agentmods.dev/agents/paulbreuler/limps/004-staleness-detection"><img src="https://agentmods.dev/badge/agents/paulbreuler/limps/004-staleness-detection.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 419 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00419
Opus 5 $0.00000 $0.00210
Sonnet 5 $0.00000 $0.00084
Haiku 4.5 $0.00000 $0.00042

Measured 5d ago against content hash 7601d16ffec4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

004-staleness-detection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plans/0047-limps-context-hierarchy/agents/004-staleness-detection.md · 54 lines

What it actually says

Agent 004: Staleness Detection

Objective

Detect stale context files and surface freshness warnings.

Tasks

  1. Staleness calculator (src/context/staleness.ts)

    • calculateStaleness(doc): Return score 0-1
    • Compare updated to expected refresh interval
    • Default thresholds: warning=14d, critical=30d, archive=90d
    • Per-document refresh_interval frontmatter override
  2. Staleness scoring

    interface StalenessScore {
      score: number;           // 0-1 (higher = more stale)
      status: 'fresh' | 'warning' | 'critical';
      daysOld: number;
      recommendedAction: 'none' | 'review' | 'archive';
    }
    
  3. Health CLI (src/cli/commands/context/health.ts)

    • limps context health — Check all context files
    • limps context health --stale — Only show stale
    • limps context health <plan> — Scope to plan
    • Output includes staleness status for each file
  4. Freshness in context resolution

    • Include staleness info when resolving context
    • Warn if inherited context is stale
    • --no-warnings to suppress

Acceptance Criteria

  • limps context health shows staleness for all files
  • Warning at 14 days, critical at 30 days (configurable)
  • Context resolution warns about stale inheritance
  • Per-file refresh_interval overrides defaults
  • Archive recommendation at 90 days
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 54 lines · 0 tokens per session scan A 7601d16ffec4

Subscribe to this mod's changes

004-staleness-detection is an agent published in the GitHub repository paulbreuler/limps (10 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 419 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.