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 gpsaggese/helpers --skill coding.factor_common_codegit clone --depth 1 https://github.com/gpsaggese/helpersWrote 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/gpsaggese/helpers/coding.factor_common_code)<a href="https://agentmods.dev/skills/gpsaggese/helpers/coding.factor_common_code"><img src="https://agentmods.dev/badge/skills/gpsaggese/helpers/coding.factor_common_code/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/gpsaggese/helpers/coding.factor_common_code"><img src="https://agentmods.dev/badge/skills/gpsaggese/helpers/coding.factor_common_code.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.00012 | $0.00479 |
| Opus 5.5 | $0.00005 | $0.00192 |
| Sonnet 5.5 | $0.00002 | $0.00096 |
| Haiku 4.5 | $0.00001 | $0.00048 |
Grade A, and why
coding.factor_common_code 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 — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Role
- Senior Python engineer, experienced in refactoring and codebase hygiene
Goal
-
I will give references to one or more Python source files
-
Your task is to:
- Read and analyze the code across these files
- Identify meaningful duplicated or near-duplicated code blocks that can be safely refactored into shared functions
- Report these changes
- Ask the user
-
You must not change the behavior of the code
Workflow
Objectives
- Detect common logic that appears in multiple places (exact or structurally similar)
- Propose reusable functions that improve maintainability and readability
Guidelines
- Skip trivial functions (fewer than 2-3 meaningful lines)
- Avoid trivial abstractions. Prefer logic that:
- Is likely to change in one place in the future
- Encapsulates a clear responsibility
- If similar blocks are not identical, briefly explain why they can still be unified
- Do not rewrite the full implementation unless explicitly asked. Only identify and describe refactor opportunities
Output Format
- If the user uses the option
--dry_run, report the output as below instead of executing the refactorings - For each proposed refactoring, produce:
- Proposed function interface
- Function name
- Parameters (with brief explanation if non-obvious)
- Return value (if any)
- Summary of the locations of duplicated code
- Use the following format:
file1.py: l1-l2, l3-l4, ... file2.py: l5-l8, ...
- Use the following format:
- Create a vim quickfix cfile for the locations using the convention in
.claude/skills/cfile.rules.md
- Proposed function interface
Make Changes
- Make the changes to remove repeated code
Conventions
- Follow the rules in
.claude/skills/coding.rules.md
Verification
- Confirm proposed functions are non-trivial and each encapsulates a clear responsibility
- Confirm the code behavior is unchanged after refactoring
- Confirm the cfile locations point to the correct duplicated blocks
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 · 65 lines · 12 tokens per session scan A 95a537210f7a
coding.factor_common_code is a skill published in the GitHub repository gpsaggese/helpers (158 stars, last pushed today), licensed Apache-2.0. It adds 12 tokens to every session and 479 once invoked, about $0.0000 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-06.
coding.factor_common_code compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| coding.factor_common_codegpsaggese/helpers | Skill | 158 | today | Apache-2.0 | A | 12 | Claude Code |
| mcore-linting-and-formattingNVIDIA/skills | Skill | 3.9k | today | Apache-2.0 | A | 44 | Claude Code |
| splitting-oversized-modulesPostHog/posthog-foss | Skill | 728 | today | MIT | A | 197 | Claude Code, Codex |
| python-review-checklistawslabs/cli-agent-orchestrator | Skill | 1.5k | today | Apache-2.0 | A | 20 | Claude Code, Codex |
| splitting-oversized-modulesPostHog/posthog | Skill | 41k | today | none | A | 197 | Claude Code, Codex |
| best-practicesFradSer/dotclaude | Skill | 596 | yesterday | MIT | A | 52 | Claude Code |
| plankton-code-qualityloulanyue/awesome-claude-notes | Skill | 271 | 1mo ago | MIT | A | 34 | Claude Code |