temps-split-module

temps-split-module is a skill for Claude Code, Codex from gotempsh/temps. It costs 118 tokens per session (2,123 once invoked), scanned A, original, Apache-2.0.

A procedure for splitting an oversized Rust source file into smaller module files without changing how the program behaves or how other code uses it.

In plain words
What is it for?
Use it to divide Rust “god files” by responsibility, retain public paths with re-exports, distribute implementation blocks, and move oversized inline tests into a sibling file.
Why use it?
It makes large files easier to review and maintain while preserving public names, visibility, tests, and behavior. Move-only changes also keep unrelated fixes out of the same change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/rule_drift.py --list files_over_3000_lines | grep <file>.

Good fit Use it to divide Rust “god files” by responsibility, retain public paths with re-exports, distribute implementation blocks, and move oversized inline tests into a sibling file.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/gotempsh/temps
agentmods
npx agentmods add skills/gotempsh/temps/temps-split-module

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for temps-split-module

README.md
[![agentmods](https://agentmods.dev/badge/skills/gotempsh/temps/temps-split-module/github.svg)](https://agentmods.dev/skills/gotempsh/temps/temps-split-module)
Your own site
<a href="https://agentmods.dev/skills/gotempsh/temps/temps-split-module"><img src="https://agentmods.dev/badge/skills/gotempsh/temps/temps-split-module/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.

agentmods 80×15 button for temps-split-module

Your own site · 80×15
<a href="https://agentmods.dev/skills/gotempsh/temps/temps-split-module"><img src="https://agentmods.dev/badge/skills/gotempsh/temps/temps-split-module.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00118 $0.02123
Opus 5.5 $0.00047 $0.00849
Sonnet 5.5 $0.00024 $0.00425
Haiku 4.5 $0.00012 $0.00212

Measured 5d ago against content hash b2159ae6c4f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

temps-split-module 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 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.

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.

.agents/skills/temps-split-module/SKILL.md · 186 lines

How it starts

The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Split a large module

Rust lets one type have several impl blocks in different modules of the same crate, so most god files can be split by moving code only: no renamed functions, no changed signatures, no "while I'm here" fixes. A move-only diff is cheap to review; a mixed one is not.

Context: docs/plans/crates-refactor-plan.md §4 P2 lists the target files and proposed modules; §7 decisions 1 and 2 set the test-file convention and the size limits. Typical god files: crates/temps-providers/src/services.rs, crates/temps-deployer/src/docker.rs.

Rules

  • One file per PR, and nothing else in that PR. Fixes found while moving go in a later PR (note them in the PR description).
  • No behaviour change. Same tests, same test count, same public paths.
  • Keep the public API. Every path other code uses (crate::services::Foo, temps_x::services::Foo) still resolves, via pub use.
  • Narrowest visibility that compiles. Never widen to pub to make a move work.
  • Split by responsibility, along seams that already exist: separate trait impls, groups of methods that call each other, types and errors, helpers.

Target layout

Either form is used in this repo; follow the crate's existing style.

foo/mod.rs            # module docs, shared imports, types, pub use re-exports
foo/lifecycle.rs      # impl Foo { ... } - one responsibility
foo/restore.rs        # impl Foo { ... }
foo/tests.rs          # #[cfg(test)] mod tests; when the tests are large

Real examples:

  • crates/temps-error-tracking/src/services/source_map_service.rs with source_map_service/{artifacts,build_credentials,debug_ids}.rs: mod debug_ids; plus pub use artifacts::{ArtifactAssembly, ...}; in the parent, and debug_ids.rs holding impl SourceMapService { pub(super) async fn symbolicate_debug_ids(..) }.
  • crates/temps-monitoring/src/http_checks/mod.rs with automatic.rs, secret_history.rs, transport.rs, variable_history.rs: automatic.rs, secret_history.rs and variable_history.rs start with use super::*; and add an impl HttpChecksService block, sharing pub(super) items.
  • Out-of-line tests: crates/temps-status-page/src/lib.rs declares #[cfg(test)] mod tests; and the tests live in crates/temps-status-page/src/tests.rs.

Read the full file on GitHub · 186 lines

Changes

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.

  1. 5d ago First seen · 186 lines · 118 tokens per session scan A b2159ae6c4f1

Subscribe to this mod's changes

temps-split-module is a skill published in the GitHub repository gotempsh/temps (903 stars, last pushed yesterday), licensed Apache-2.0. It adds 118 tokens to every session and 2,123 once invoked, about $0.0005 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-11-02.

Related

temps-split-module compared with skills from other repositories

temps-split-module next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
temps-split-modulegotempsh/tempsSkill903yesterdayApache-2.0A118Claude Code, Codex
rust-crate-ciZaxbyHub/opencode-swarmSkill518yesterdayMITA60Claude Code
build-nativehyperledger-iroha/irohaSkill490yesterdayApache-2.0A48Claude Code
rust-tooling-cicdfusengine/agentsSkill3425d agoMITA51Claude Code
cargo-workflowsOutlineDriven/outline-driven-developmentSkill551mo agoApache-2.0A29Codex
cargo-workflowsmohitmishra786/low-level-dev-skillsSkill2794mo agoMITA72Claude Code
scaffold-rust-clicboone/agent-harness-pluginsSkill2yesterdayMITA45Claude Code