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 skills/junmystery/agent-guidance-python/large-file-refactornpx skills add JunMystery/Agent-Guidance-Python --skill large-file-refactorgit clone --depth 1 https://github.com/JunMystery/Agent-Guidance-PythonWrote 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/skills/junmystery/agent-guidance-python/large-file-refactor)<a href="https://agentmods.dev/skills/junmystery/agent-guidance-python/large-file-refactor"><img src="https://agentmods.dev/badge/skills/junmystery/agent-guidance-python/large-file-refactor.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.00048 | $0.01123 |
| Opus 5 | $0.00024 | $0.00562 |
| Sonnet 5 | $0.00010 | $0.00225 |
| Haiku 4.5 | $0.00005 | $0.00112 |
Grade A, and why
large-file-refactor 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Large-File Refactor
Use this skill when a task asks to split a large file, reduce a monolithic module, extract services/controllers/helpers, or bring files closer to the 300 LOC guideline.
Core Rule
Split by responsibility, not by line count alone.
Do not cut a file into arbitrary chunks just to satisfy a numeric target. A 320-line cohesive algorithm may be better left intact, while a 260-line file with unrelated validation, persistence, and notification logic may deserve extraction.
Audit Scope
Audit only project-owned source files and project documentation, or a specific file path the user explicitly provided.
When discovering candidate files yourself, use git ls-files or an equivalent tracked-file list as the source of truth. Do not use a raw filesystem walk as the primary source unless repository ignore rules and the exclusions below have already been applied.
Always exclude:
.git/,.venv/,venv/,env/,.vscode/,.idea/node_modules/,__pycache__/,.pytest_cache/,.cache/build/,dist/,htmlcov/, coverage reports, and test artifacts- generated files, vendored files, externally synchronized files, and binary/media files
If the user provides a specific path, audit that path only. If the path is ignored, vendored, generated, or outside normal project scope, warn about that status and continue only when the user clearly requested that exact file.
For broad requests such as "AI Audit large-file-refactor violations", report only in-scope project candidates. Do not list excluded environment, editor, cache, build, vendor, generated, or binary/media files as violations.
Decision Thresholds
<300 LOC: keep the file unless it clearly mixes unrelated responsibilities.300-500 LOC: recommend splitting only when the file has more than one durable responsibility.>500 LOC: perform an explicit split analysis before implementation.
Count meaningful code first. Ignore blank lines and comments when judging whether the file is truly large.
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.
- today First seen · 102 lines · 48 tokens per session scan A 7de6cd910a89
large-file-refactor is a skill published in the GitHub repository JunMystery/Agent-Guidance-Python (2 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 1,123 once invoked, about $0.0002 per session on Opus 5. 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-09-03.
Other skills, from other repositories
n8n-error-handling
Wire n8n error handling so failures are loud, structured, and recoverable. Use when building any webhook/API workflow, a scheduled or unattended workflow, or any path where a silent failure would drop user-visible work — and whenever the user mentions error handling, onError, continueErrorOutput, error…
n8n-multi-instance
Use when an n8n-mcp account targets more than one n8n instance — i.e. the n8ninstances tool is available, the user mentions multiple n8n instances or environments (prod vs staging, several teams or clients), a workflow / datatable / credential / execution call returns an unexpected NOTFOUND or reads data you don't…
common-store-changelog
Generate user-facing release notes for the App Store and Google Play from git history (App Store <=4000 chars, Google Play <=500). Use when generating release notes, app store changelog, play store release, or "what's new" text for a mobile app.
common-telemetry
Enforce session-cost telemetry and execution-metadata reporting. Use when explicitly invoking getsessioncost, reporting token/cost usage, applying telemetry or cost guidance during a workflow handoff, or writing artifacts/session-cost.md at a workflow terminal state.
publish-release
Publish a GitHub release for the C# MCP SDK after a prepare-release PR has been merged. Refreshes release notes to include any PRs merged since preparation, warns about version or breaking change impacts from late-arriving PRs, and creates a draft GitHub release. Use when asked to publish a release, finalize a…
bulk-update
Update properties or content across many pages in a Notion database with dry-run and error recovery.