modular-code-enforcement

modular-code-enforcement is a skill for Claude Code, Codex from ArabelaTso/Skills-4-SE. It costs 51 tokens per session (1,297 once invoked), scanned A, original, Apache-2.0.

A set of rules for organizing code into small modules with one clear responsibility. It restricts entry-point files and prevents catch-all utility files from becoming large collections of unrelated code.

In plain words
What is it for?
Use it when reviewing or changing a codebase to enforce modular structure and require oversized or overloaded files to be split up.
Why use it?
Mixed-responsibility files are harder to understand, test, and review. The rules stop code from growing into large, tangled files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it when reviewing or changing a codebase to enforce modular structure and require oversized or overloaded files to be split up.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arabelatso/skills-4-se/modular-code-enforcement
Install

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.

Any agent
npx skills add ArabelaTso/Skills-4-SE --skill modular-code-enforcement
Clone the repo
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE

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 modular-code-enforcement

README.md
[![agentmods](https://agentmods.dev/badge/skills/arabelatso/skills-4-se/modular-code-enforcement/github.svg)](https://agentmods.dev/skills/arabelatso/skills-4-se/modular-code-enforcement)
Your own site
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/modular-code-enforcement"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/modular-code-enforcement/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 modular-code-enforcement

Your own site · 80×15
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/modular-code-enforcement"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/modular-code-enforcement.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,297 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00051 $0.01297
Opus 5 $0.00026 $0.00648
Sonnet 5 $0.00010 $0.00259
Haiku 4.5 $0.00005 $0.00130

Measured 9d ago against content hash dc35d6896904, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

modular-code-enforcement 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 9d 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.

skills/modular-code-enforcement/SKILL.md · 115 lines

How it starts

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

Modular Code Architecture — Zero Tolerance Policy

This rule is NON-NEGOTIABLE. Violations BLOCK all further work until resolved.

Rule 1: index files are ENTRY POINTS, NOT dumping grounds

index files (index.ts, __init__.py, index.js, etc.) MUST ONLY contain:

  • Re-exports (export { ... } from "./module")
  • Factory function calls that compose modules
  • Top-level wiring/registration (hook registration, plugin setup)

index files MUST NEVER contain:

  • Business logic implementation
  • Helper/utility functions
  • Type definitions beyond simple re-exports
  • Multiple unrelated responsibilities mixed together

If you find mixed logic in an index file: Extract each responsibility into its own dedicated file BEFORE making any other changes. This is not optional.

Rule 2: No Catch-All Files — utils/helpers/service are CODE SMELLS

A single utils, helpers, service, or common file is a gravity well — every unrelated function gets tossed in, and it grows into an untestable, unreviewable blob.

These file names are BANNED as top-level catch-alls. Instead:

Anti-Pattern Refactor To
utils with formatDate(), slugify(), retry() date-formatter, slugify, retry
service handling auth + billing + notifications auth-service, billing-service, notification-service
helpers with 15 unrelated exports One file per logical domain

Design for reusability from the start. Each module should be:

  • Independently importable — no consumer should need to pull in unrelated code
  • Self-contained — its dependencies are explicit, not buried in a shared grab-bag
  • Nameable by purpose — the filename alone tells you what it does

If you catch yourself typing utils or service, STOP and name the file after what it actually does.

Rule 3: Single Responsibility Principle — ABSOLUTE

Every source file MUST have exactly ONE clear, nameable responsibility.

Self-test: If you cannot describe the file's purpose in ONE short phrase (e.g., "parses YAML frontmatter", "matches rules against file paths"), the file does too much. Split it.

Read the full file on GitHub · 115 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. 9d ago First seen · 115 lines · 51 tokens per session scan A dc35d6896904

Subscribe to this mod's changes

modular-code-enforcement is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (252 stars, last pushed 22d ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,297 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

code-review-web

Review web application code for bugs, security issues, performance problems, and stack-specific anti-patterns. Use this skill whenever the user wants to review code, debug a production issue, investigate a build failure, audit security, or check a PR before merging. Triggers on code review, review my code, debug…

rampstackco/claude-skills · 121 tokens

refactor-advisor

A code review helper that finds common design and maintenance problems in a codebase and suggests ways to restructure the code.

laolaoshiren/claude-code-skills-zh · 22 tokens

pair-programming

A coding partner that writes code and then reviews that code for correctness, security, speed, readability, and reliability. It focuses on issues that can appear in AI-generated code, such as invented APIs or quietly changed requirements.

staruhub/ClaudeSkills · 136 tokens

apply-findings

Apply findings by making the suggested code changes. Applies accepted verdicts, escalates ambiguous findings to the user, and offers to note genuine improvements for later. Use when the user asks to "apply findings", "apply fixes", "apply suggestions", "apply accepted findings", "fix the findings", or "apply the…

tobihagemann/turbo · 70 tokens

java-code-review

Review Java code for bugs, duplicate code, correctness risks, maintainability improvements, and missing tests. By default review files modified in git; when the user explicitly names files, classes, packages, or a diff, review that scope instead. Generate a detailed review.md report with actionable comments and fixes.

sivaprasadreddy/sivalabs-agent-skills · 64 tokens

simplify-all

Run the code and documentation simplification passes together over one scope, launching every review agent concurrently before applying a single round of fixes. Use when the user asks to "simplify all", "simplify everything", "simplify code and docs", "clean up code and docs", "run both simplify skills", or "simplify…

tobihagemann/turbo · 76 tokens