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.
npx agentmods add commands/evan043/claude-cli-advanced-starter-pack/refactor-analyze.templategit clone --depth 1 https://github.com/evan043/claude-cli-advanced-starter-packWrote 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.
[](https://agentmods.dev/commands/evan043/claude-cli-advanced-starter-pack/refactor-analyze.template)<a href="https://agentmods.dev/commands/evan043/claude-cli-advanced-starter-pack/refactor-analyze.template"><img src="https://agentmods.dev/badge/commands/evan043/claude-cli-advanced-starter-pack/refactor-analyze.template.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.11206 |
| Opus 5 | $0.00000 | $0.05603 |
| Sonnet 5 | $0.00000 | $0.02241 |
| Haiku 4.5 | $0.00000 | $0.01121 |
Grade B, and why
refactor-analyze.template scanned grade B with 1 finding 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
cat .claude/refactor-analysis/refactor-analysis-{date}/By-Page/epg/fix-order.yaml How it starts
The opening of the file, as written. The whole thing — 1,357 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codex Runtime Compatibility
This prompt was authored for Claude-style slash workflows. In Codex runtime, adapt tool calls as follows:
AskUserQuestion=> ask the user directly in chat.WebSearch/WebFetch=> use available web tools (search_query,open,find) and cite links.Read/Write=> use shell/filesystem tools in this workspace.- Claude-only MCP calls (for example Playwright MCP names) => use available equivalents or clearly state fallback.
- Keep intent and output format identical; only adapt execution mechanics.
description: Deep complexity analysis for refactoring prioritization with dependency tracing model: sonnet argument-hint: [file path, directory, or 'all']
/refactor-analyze - Code Complexity Analysis
Analyze code complexity, detect code smells, and prioritize refactoring candidates with metrics-driven recommendations. Now with dependency tracing and global scanning.
Quick Start
/refactor-analyze # Interactive mode - choose options
/refactor-analyze src/api/ # Analyze specific directory
/refactor-analyze src/api/client.ts # Analyze single file
/refactor-analyze --top 10 # Show top 10 worst files
/refactor-analyze --trace-imports # Trace full import dependency tree
/refactor-analyze --global-scan # Find ALL large files (not just flagged)
/refactor-analyze --threshold 1000 # Custom line threshold (default: 500)
Instructions for Claude
When /refactor-analyze is invoked, ALWAYS start with Step 0 to present interactive options.
Step 0: Present Interactive Options (REQUIRED)
Use AskUserQuestion to let the user configure the analysis:
questions:
- header: "Analysis Mode"
question: "What type of analysis do you want to run?"
multiSelect: false
options:
- label: "Standard Analysis (Recommended)"
description: "Analyze flagged files (>500 lines) with basic metrics"
- label: "Deep Analysis + Import Tracing"
description: "Trace full dependency tree for each file - discovers hidden large dependencies"
- label: "Global Scan"
description: "Find ALL files above threshold regardless of page association"
- label: "Comprehensive (All Features)"
description: "Global scan + import tracing + orphan detection"
- header: "Line Threshold"
question: "What line count threshold should trigger analysis?"
multiSelect: false
options:
- label: "500 lines (Standard)"
description: "Default threshold - catches most problem files"
- label: "1000 lines (Large files only)"
description: "Focus on the biggest offenders first"
- label: "2000 lines (Critical only)"
description: "Only truly massive files needing immediate attention"
- label: "300 lines (Strict)"
description: "More aggressive - catch problems earlier"
- header: "Output Format"
question: "How should results be organized?"
multiSelect: false
options:
- label: "By Priority Score (Recommended)"
description: "Rank all files by refactoring urgency"
- label: "By Page/Route"
description: "Group files by their consuming page entry points"
- label: "By Discovery Method"
description: "Separate direct flags, import traces, and global scan results"
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.
- 5d ago First seen · 1,357 lines · 0 tokens per session scan B ffedb448587f
refactor-analyze.template is a command published in the GitHub repository evan043/claude-cli-advanced-starter-pack (61 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 11,206 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
template
Manage issue templates for streamlined issue creation.
auto-browse
Auto-browse — learn, optimize, and graduate browser operations or web data-mining workflows.
release-harn
Run the tag-first Harn release workflow.
discover
Search the Everruns(Dev) API catalog for available operations.
t800-onboard
Для чата с новичками. Показывает, что настроено в Cursor (global + local), и что умеет отдел T-800.
fix-issue
!gh issue view $ARGUMENTS 2>/dev/null || echo "Could not fetch issue $ARGUMENTS".