adr-new
USE WHEN a load-bearing architectural decision is being made in conversation (database / framework / auth model / integration choice, or explicit rejection of…
USE WHEN the `stack-freshness` SessionStart hook nudges ("stack last checked 42d ago"), or when user asks to check dep versions. Verifies Claude Code + Codex + plugin + CLI deps vs `stack.toml` (per-OS update commands), flags stale AIDEV-TODO/QUESTION anchors (deadline-aware),
$ npx -y skills add Filip-Podstavec/claude-leverage --skill stack-check --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/stack-checkContext preview
The summary Claude sees to decide when to auto-load this skill.
USE WHEN the `stack-freshness` SessionStart hook nudges ("stack last checked 42d ago"), or when user asks to check dep versions. Verifies Claude Code + Codex + plugin + CLI deps vs `stack.toml` (per-OS update commands), flags stale AIDEV-TODO/QUESTION anchors (deadline-aware),
name: stack-check
description: >
USE WHEN the `stack-freshness` SessionStart hook nudges
("stack last checked 42d ago"), or when user asks to check dep
versions. Verifies Claude Code + Codex + plugin + CLI deps vs
`stack.toml` (per-OS update commands), flags stale
AIDEV-TODO/QUESTION anchors (deadline-aware), and sanity-checks
AGENTS.md size + imports. Read-only. Resets the freshness timestamp.
allowed-tools:
- Read
- Write
- Grep
- Glob
- Bash(claude --version)
- Bash(codex --version)
- Bash(git --version)
- Bash(rg --version)
- Bash(jq --version)
- Bash(python --version)
- Bash(python3 --version)
- Bash(mmdc --version)
- Bash(node --version)
- Bash(shellcheck --version)
- Bash(npm view:*)
- Bash(touch:*)
- Bash(date:*)
- Bash(test:*)
- Bash(mkdir:*)
- Bash(git rev-parse:*)
- Bash(wc:*)
- Bash(stat:*)
- WebFetchWalks `stack.toml`, queries each declared dependency's installed version, optionally fetches the latest available version, and reports a Markdown table:
# Stack check — <YYYY-MM-DD> | Tool | Installed | Required | Status | Update | |------|-----------|----------|--------|--------| | claude (Claude Code) | 2.1.89 | ≥2.1.0 | ok | — | | codex (Codex CLI) | 0.39.0 | ≥0.40.0 | **outdated** | npm i -g @openai/codex | | claude-leverage (this plugin) | 1.0.0 | latest 1.0.1 | **outdated** | /plugin update claude-leverage | | git | 2.45.0 | ≥2.40.0 | ok | — | | rg | 14.0.3 | ≥13.0.0 | ok | — | | jq | (not found) | ≥1.6 (optional) | missing | brew install jq | | python | 3.12.1 | ≥3.10 | ok | — | | mmdc | (not found) | ≥10.0.0 (optional) | missing | npm i -g @mermaid-js/mermaid-cli | | node | 20.10.0 | ≥20.0.0 | ok | — | | shellcheck | (not found) | ≥0.8.0 (optional) | missing | brew install shellcheck |
On successful completion (no errors thrown), updates `~/.local/state/claude-leverage/.last-stack-check` (or `~/.claude/claude-leverage/.last-stack-check` if XDG state dir is unavailable) with the current epoch time so the SessionStart hook stays quiet for the next N days.
1. **Load `stack.toml`.** From the plugin install dir (`$CLAUDE_PLUGIN_ROOT/stack.toml`) or, if running standalone, from the repo root. If neither exists, STOP and report.
2. **For each `[[host.tool]]` and `[[deps.tool]]`:**
accept "X.Y" and "X.Y.Z" both). If parse fails or command not found, mark "missing" (and "outdated" if `optional = false`).
PowerShell `$env:OS` / `$IsWindows`). Prefer `update_hint_macos` / `update_hint_linux` / `update_hint_windows` when present and the platform matches; otherwise fall back to the generic `update_hint` field. This is what stack.toml `manifest_version = 2` introduced.
3. **For the plugin itself:**
`https://raw.githubusercontent.com/Filip-Podstavec/claude-leverage/main/.claude-plugin/plugin.json` and compare to the installed version. Cache the network result for 24h in `~/.claude/claude-leverage/.stack-check-cache.json` to avoid hammering GitHub if the user runs the skill repeatedly.
4. **For Claude Code itself:**
Anthropic doesn't expose a stable scrapable endpoint. Instead, the `min_version` in stack.toml is hand-maintained: bump it when this plugin starts depending on a feature only present in a newer CC.
5. **Walk the current repo for AIDEV anchor health** (if cwd is inside a git repo). Grep `git rev-parse --show-toplevel` for `AIDEV-(TODO|QUESTION)` matches and parse each line.
Two flavors of anchor:
`AIDEV-QUESTION(by: YYYY-MM-DD):`. Extract the ISO-8601 date and compare against today.
for the file's last-modified timestamp.
Cap walk at 5000 files; skip the bench archive, vendor dirs, node_modules, __pycache__, .git.
Reported after the version table:
## AIDEV anchors (current repo: <name>)
- 14 AIDEV-TODO total: 3 fresh, 8 aging, 2 stale (>90d), **1 overdue (by deadline)**
- 5 AIDEV-QUESTION total: 1 fresh, 2 aging, 1 stale, 1 due-soon
**Overdue (deadline passed):**
- `src/billing/charge.py:47` — AIDEV-TODO due 2026-04-01 (44 days overdue)
"replace the polling loop with webhooks"
**Due soon (next 14 days):**
- `src/auth/middleware.py:89` — AIDEV-QUESTION due 2026-06-05 (in 12 days)
**Stale (no deadline, last touched >90 days ago):**
- `src/legacy/handlers.py:120` — AIDEV-TODO (last touched 2025-12-03)
"migrate to v2 API"If not in a git repo, skip this section silently.
Deadline parsing tolerates a few formats. The distinguishing rule for implementors: the parenthesized content matches one of these regexes (anchored, case-insensitive on the keyword):
Anything else in the parens (free-form notes like `(Q3 2026)` or `(after the migration)`) is NOT a deadline; that anchor falls under age-based stale tracking. This prevents misclas
Make any repo AI-first - write sustainable code from the start, or refactor a legacy codebase to prepare it for agent-driven development.Building blocks for Claude Code: subagents, slash commands, hooks, and workflow patterns. Copy what you need. A working developer's stack for Claude Code.
Repo: Filip-Podstavec/claude-leverage
USE WHEN a load-bearing architectural decision is being made in conversation (database / framework / auth model / integration choice, or explicit rejection of…
USE WHEN setting up a repo for AI-first work, after a major directory restructure, or when an agent needs structured answers like "which modules are stable?" /…
USE WHEN setting up Codex CLI in a project, tightening sandbox for prod/CI, or when user asks about Codex permissions. Interactive helper for per-project…
USE WHEN setting up a repo for AI-first work (after /init-repo), or when the context-surface hook should start feeding repo conventions to agents before edits.…
USE WHEN the user explicitly asks to verify that this repo's DECLARED build/test/lint commands actually run ("does the quickstart work?", "validate the…
USE WHEN about to open a PR, when teammate asks "what's in this diff?", or when returning to a branch and needing self-orientation. Three modes: `--for…