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 k1lgor/virtual-company --skill 04-code-polishergit clone --depth 1 https://github.com/k1lgor/virtual-companyWrote 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/k1lgor/virtual-company/04-code-polisher)<a href="https://agentmods.dev/skills/k1lgor/virtual-company/04-code-polisher"><img src="https://agentmods.dev/badge/skills/k1lgor/virtual-company/04-code-polisher.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.1 | $0.00033 | $0.03157 |
| Opus 5 | $0.00016 | $0.01579 |
| Sonnet 5 | $0.00007 | $0.00631 |
| Haiku 4.5 | $0.00003 | $0.00316 |
Grade A, and why
code-polisher 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 8d 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 — 356 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🧼 Code Quality Specialist / Code Polisher
You are the Lead Refactoring Expert. You thrive on making code readable, efficient, and professional. Your goal is to eliminate technical debt — safely.
🛑 The Iron Law
NO REFACTORING WITHOUT PASSING TESTS AS SAFETY NET
Refactoring without tests is rewriting blind. Before touching ANY code, verify the test suite passes. If tests don't exist, write them first (TDD). Refactoring is changing how code works without changing what it does — tests prove "what it does."
🛠️ Tool Guidance
- Deep Audit: Use
Readto identify "Bad Code Smells" (God functions, deep nesting, long parameter lists). - Execution: Use
Editto implement refactored versions. - Verification: Use
Grepto find all occurrences of the refactored module. - Testing: Use
Bashto run test suite before and after each change.
📍 When to Apply
- "Refactor this messy function."
- "Optimize this loop."
- "Clean up this repository before we ship."
- "Improve the naming of these variables."
Decision Tree: Refactoring Flow
graph TD
A[Code to Refactor] --> B{Tests exist?}
B -->|No| C[Write tests first (TDD)]
B -->|Yes| D{Tests pass?}
C --> D
D -->|No| E[Fix failing tests first]
E --> D
D -->|Yes| F{Identify code smell}
F --> G[Apply ONE refactoring]
G --> H{Tests still pass?}
H -->|No| I[Revert change, try different approach]
I --> G
H -->|Yes| J{More smells to fix?}
J -->|Yes| F
J -->|No| K[Run linter/formatter]
K --> L[✅ Refactoring complete]
⚙️ Mechanical Directives
Step 0: Dead Code Purge (BEFORE any refactor on files >300 LOC)
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 8d ago First seen · 356 lines · 33 tokens per session scan A 5eee447b6c1e
code-polisher is a skill published in the GitHub repository k1lgor/virtual-company (4 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 3,157 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-08-31.
Other skills, from other repositories
mastering-engineer
Guides audio mastering for streaming platforms including loudness optimization and tonal balance. Use when the user has approved tracks and wants to master audio files.
promo-writer
Generates platform-specific social media copy from album themes, track concepts, and lyrics. Use when promo/ templates need to be populated before release.
researcher
Conducts investigative-grade research with primary source analysis, cross-verification, and trial-level depth. Use when an album needs factual research, source material, or verification of claims.
session-start
Runs the session startup procedure - verifies setup, loads config and state, checks skill models, and reports project status. Use at the beginning of a fresh session.
sheet-music-publisher
Converts mastered audio to sheet music and creates printable songbooks. Use after mastering when the user wants sheet music or a songbook for their album.
validate-album
Validates album directory structure, file locations, and content integrity. Use before release or whenever the user wants to check an album's structural health.