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/arnabdeypolimi/claude_code_setup/code-refactornpx skills add arnabdeypolimi/claude_code_setup --skill code-refactorgit clone --depth 1 https://github.com/arnabdeypolimi/claude_code_setupWhat 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.00085 | $0.00783 |
| Opus 5 | $0.00043 | $0.00392 |
| Sonnet 5 | $0.00017 | $0.00157 |
| Haiku 4.5 | $0.00009 | $0.00078 |
Grade A, and why
code-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 yesterday.
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 — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Refactor Skill
Systematically refactor Python code to match this repo's standards.
Workflow
1. Read Target Code
Read every file in the target module. Never propose changes to code you haven't read.
2. Audit Against Checklist
Run through references/checklist.md and note every violation. Group them by category so the user can see the full picture before any edits are made.
3. Run Static Analysis
uv run ruff check <target>
uv run mypy <target>
Report all errors as part of the audit — these are additional violations on top of the checklist.
4. Apply Fixes
Apply all fixes. Prefer the Edit tool over Write for existing files (smaller diffs, easier review). Make all independent edits in parallel.
Priority order (highest impact first):
- Type safety — enums over bare strings,
from __future__ import annotations, proper return types - Pydantic — snake_case fields with aliases,
model_config, field validators (seereferences/pydantic-patterns.md) - Error handling — replace
assertwithif/raise, add context to re-raised exceptions - Python best practices — frozen dataclasses, Protocol types, avoid mutable defaults
- PyTorch/Lightning — only apply if the module contains
torchornn.Modulecode (seereferences/pytorch-patterns.md) - Docs — public functions must have docstrings (see
references/docs-patterns.md)
5. Verify
uv run ruff check <target>
uv run ruff format <target>
uv run mypy <target>
uv run pytest tests/unit/<target-name>/ -v
All checks must pass before declaring done. If tests fail, fix them — don't skip.
6. Summarise
Report a table of every change made, grouped by category. Include file and line references.
Repo-Specific Conventions
- Python: 3.12 — use
StrEnum,match,X | Yunions,from __future__ import annotationsin every file - Linter/Formatter: Ruff (88 char line length)
- Type checker: mypy (strict — all errors must be resolved)
- Package manager: uv (
uv run <cmd>) - Tests: pytest, mirror source structure under
tests/unit/ - Logging:
from logging_utils import get_loggerthenlogger = get_logger(__name__)— neverlogging.getLogger(__name__)orprint() - Imports: stdlib → third-party → local, each group separated by blank line
- Config: TOML or YAML only — never JSON for config files
What ships with it
4 files 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.
- yesterday First seen · 83 lines · 85 tokens per session scan A f8943f59b0dd
code-refactor is a skill published in the GitHub repository arnabdeypolimi/claude_code_setup (4 stars, last pushed 3mo ago), licensed MIT. It adds 85 tokens to every session and 783 once invoked, about $0.0004 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
learn-mcp
Focused interactive tutor for the Model Context Protocol (MCP) path in AI Engineering from Scratch. Start or resume this route when a learner wants to build, secure, debug, verify, or operate MCP clients, servers, transports, gateways, registries, or conformance gates. Teaches one lesson per invocation and records…
find-your-level
Interactive quiz that maps your AI/ML knowledge to a starting point in the 523-lesson, 20-phase AI Engineering from Scratch curriculum. Trigger phrases: "where should I start", "find my level", "what do I know", "which phase", "assess my knowledge", "placement test", "skip ahead".
learn-agent-skills
Focused interactive tutor for the Agent Skills Engineering path in AI Engineering from Scratch. Start or resume this route when a learner wants to create, discover, invoke, secure, evaluate, package, or port Agent Skills. Teaches one lesson per invocation and records evidence in AGENT-SKILLS-LEARNING.md.
start-learning
One-time onboarding for the AI Engineering from Scratch curriculum (523 lessons, 20 phases). Interviews the learner, runs the placement quiz, and writes LEARNING.md, a persistent study plan the learn skill drives. Trigger phrases: "start learning", "set up the course", "begin the curriculum", "onboard me", "create my…
skill-release-gate
Evaluate an Agent Skill bundle for structural integrity, trigger quality, artifact improvement, script correctness, safety, installed-tree integrity, and target-host portability before release.
migration-review
Review database migration files when a change adds or modifies paths under migrations/. Use it before merge to collect forward, rollback, locking, and data-safety evidence.