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 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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.1 | $0.00048 | $0.01123 |
| Opus 5.5 | $0.00019 | $0.00449 |
| Sonnet 5.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 2mo 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.
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.
- 2mo ago 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 14d ago), licensed MIT. It adds 48 tokens to every session and 1,123 once invoked, about $0.0002 per session on Opus 5.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.
large-file-refactor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| large-file-refactorJunMystery/Agent-Guidance-Python | Skill | 2 | 14d ago | MIT | A | 48 | Claude Code, Codex |
| skill-benchmarkHoangNguyen0403/agent-skills-standard | Skill | 597 | 2d ago | MIT | A | 16 | Codex |
| airdrop-hunting-guidenirholas/three.ws | Skill | 287 | 2d ago | Apache-2.0 | A | 54 | Claude Code, Codex |
| ue-mcp-epic-routingdb-lyon/ue-mcp | Skill | 526 | today | MIT | A | 81 | Claude Code, Codex |
| common-observabilityHoangNguyen0403/agent-skills-standard | Skill | 597 | 2d ago | MIT | A | 46 | Claude Code, Codex |
| authoring-decoratorssynaptiai/prompt-decorators | Skill | 44 | 1mo ago | Apache-2.0 | A | 72 | Claude Code |
| orchardcore-search-indexingCrestApps/CrestApps.AgentSkills | Skill | 14 | 8d ago | MIT | A | 182 | Claude Code |