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.
git clone --depth 1 https://github.com/darellchua2/opencode-config-templatenpx agentmods add skills/darellchua2/opencode-config-template/typescript-dry-principle-skillWrote 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/darellchua2/opencode-config-template/typescript-dry-principle-skill)<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/typescript-dry-principle-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/typescript-dry-principle-skill.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.00026 | $0.07372 |
| Opus 5 | $0.00013 | $0.03686 |
| Sonnet 5 | $0.00005 | $0.01474 |
| Haiku 4.5 | $0.00003 | $0.00737 |
Grade C, and why
typescript-dry-principle-skill scanned grade C with 2 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 4d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
When protocol is enabled, this skill defaults to `Iterations: 10` (sufficient for typical single-pass workflows). Override with `Iterations: N` for specific tasks. Safety blocks: `.env`, `node_modules/`, `rm -rf`, `git p Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = await fetch(url) How it starts
The opening of the file, as written. The whole thing — 1,081 lines — stays where its author put it; the contents beside it link to each section on GitHub.
What I do
I help you eliminate code duplication in TypeScript projects by applying the DRY (Don't Repeat Yourself) principle:
- Analyze Codebase: Scan TypeScript files to identify repeated code patterns, logic, types, and configurations
- Identify Duplication Patterns: Detect common anti-patterns including:
- Duplicate logic across multiple functions/components
- Repeated type definitions
- Copy-pasted code blocks
- Similar functions with slight variations
- Scattered configuration values
- Extract Common Logic: Refactor duplicated code into reusable utility functions and modules
- Consolidate Type Definitions: Merge duplicate types into shared interfaces and type utilities
- Create Generic Solutions: Build type-safe reusable components using TypeScript generics
- Organize Folder Structure: Restructure code into logical directories (types/, utils/, constants/, hooks/, services/)
- Replace Duplicated Code: Update files to import from shared modules instead of duplicating code
- Verify Refactoring: Ensure code compiles and tests pass after changes
When to use me
Use this workflow when:
- You notice similar code blocks across multiple TypeScript files
- You're copy-pasting code between modules or components
- Type definitions are duplicated or repeated across files
- Business logic appears in multiple places with slight variations
- Configuration values are scattered across multiple files
- Tests contain repeated setup/teardown logic
- You want to improve code maintainability and reduce technical debt
- Preparing for a code review to address technical debt
- Setting up a new TypeScript project with proper code organization
Ask clarifying questions if the scope of refactoring is unclear or if you want to focus on specific areas.
Prerequisites
- TypeScript project with source code (.ts, .tsx files)
- File permissions to read and modify TypeScript files
- TypeScript compiler installed and configured
- (Optional) Test suite to verify refactoring doesn't break functionality
- (Optional) Git repository to commit refactoring 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.
- 4d ago First seen · 1,081 lines · 26 tokens per session scan C e48c655e1384
typescript-dry-principle-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 26 tokens to every session and 7,372 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
mk:vue
Use when writing, reviewing, or refactoring Vue 3 code — components, composables, reactivity, Pinia state, Pinia Colada data-fetching, file-based routing, and forms. Targets Composition API + + TypeScript. Auto-activates on .vue files. For deep best-practices review/recommendations or the full ordered workflow…
mk:angular
Use when working with Angular code — components, signals, services, forms, routing, HTTP, testing, SSR, or tooling. Targets Angular v20+ modern patterns. Auto-activates on .ts files in Angular projects (detected via angular.json).
no-bare-casts
Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.
aws-sst-development
SST v4 (Ion) expert for managing AWS resources as code with the Pulumi-backed framework.
league-akari-shard-development
Use when creating, extending, refactoring, splitting, or reviewing League Akari main or renderer shards, including shard file organization, controller/loader/executor/handler boundaries, naming conventions, renderer TSX usage, platform guards, and public contract compatibility.
fast-typescript-check
Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…