Borrowing it
Nothing to install: this file belongs to po4yka/RIPDPI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/po4yka/RIPDPI/main/.agents/skills/detekt-custom-rules/SKILL.mdgit clone --depth 1 https://github.com/po4yka/RIPDPIWrote 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/po4yka/ripdpi/detekt-custom-rules)<a href="https://agentmods.dev/skills/po4yka/ripdpi/detekt-custom-rules"><img src="https://agentmods.dev/badge/skills/po4yka/ripdpi/detekt-custom-rules/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/po4yka/ripdpi/detekt-custom-rules"><img src="https://agentmods.dev/badge/skills/po4yka/ripdpi/detekt-custom-rules.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.00044 | $0.01909 |
| Opus 5.5 | $0.00018 | $0.00764 |
| Sonnet 5.5 | $0.00009 | $0.00382 |
| Haiku 4.5 | $0.00004 | $0.00191 |
Grade A, and why
detekt-custom-rules 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 — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Custom Detekt Rules
Custom rule set diGuardrails in module :quality:detekt-rules. Enforces DI, Hilt, suppression, and resolver-log privacy conventions at compile time.
Existing Rules
scripts/ci/check_harness_manifests.py (validate_factual_ground_truth) mechanically checks that every rule registered in RipDpiRuleSetProvider.kt appears in this table -- omitting a rule here fails CI rather than silently drifting.
| Rule | What It Catches | Why |
|---|---|---|
InjectConstructorDefaultParameter |
Default values on @Inject constructor params |
Hilt ignores defaults, causing silent behavior mismatch |
HiltViewModelApplicationContext |
@ApplicationContext in @HiltViewModel constructors |
Forces narrower abstractions, improves testability |
DisallowNewSuppression |
@Suppress without an adjacent ROADMAP-architecture-refactor allowlist comment |
Prevents new lint debt from becoming invisible |
NoResolverIpInLogs |
Resolver or upstream IP identifiers interpolated into log calls | Keeps user-visible network state out of logs |
Module Structure
quality/detekt-rules/
src/main/kotlin/com/poyka/ripdpi/quality/detekt/
RipDpiRuleSetProvider.kt -- Registers all rules (id: "diGuardrails")
AnnotationMatchers.kt -- Shared helpers: hasAnnotation(), findAnnotation()
InjectConstructorDefaultParameter.kt
HiltViewModelApplicationContext.kt
DisallowNewSuppression.kt
NoResolverIpInLogs.kt
src/test/kotlin/com/poyka/ripdpi/quality/detekt/
InjectConstructorDefaultParameterTest.kt
HiltViewModelApplicationContextTest.kt
DisallowNewSuppressionTest.kt
NoResolverIpInLogsTest.kt
Creating a New Rule
Step 1: Write the Rule Class
Create src/main/kotlin/com/poyka/ripdpi/quality/detekt/<YourRuleName>.kt:
package com.poyka.ripdpi.quality.detekt
import io.gitlab.arturbosch.detekt.api.CodeSmell
import io.gitlab.arturbosch.detekt.api.Config
import io.gitlab.arturbosch.detekt.api.Debt
import io.gitlab.arturbosch.detekt.api.Entity
import io.gitlab.arturbosch.detekt.api.Issue
import io.gitlab.arturbosch.detekt.api.Rule
import io.gitlab.arturbosch.detekt.api.Severity
import org.jetbrains.kotlin.psi.KtClass
class YourRuleName(config: Config) : Rule(config) {
override val issue: Issue =
Issue(
id = "YourRuleName",
severity = Severity.Defect,
description = "One-line description of what this catches.",
debt = Debt.FIVE_MINS,
)
override fun visitClass(klass: KtClass) {
super.visitClass(klass)
// Use hasAnnotation() from AnnotationMatchers.kt
if (!klass.hasAnnotation("SomeAnnotation")) return
// Check condition and report
report(
CodeSmell(
issue = issue,
entity = Entity.from(klass),
message = "Actionable message: what to do instead.",
),
)
}
}
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 · 218 lines · 44 tokens per session scan A 5b979ecbc010
detekt-custom-rules is a skill published in the GitHub repository po4yka/RIPDPI (85 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 44 tokens to every session and 1,909 once invoked, about $0.0002 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-07.
detekt-custom-rules compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| detekt-custom-rulespo4yka/RIPDPI | Skill | 85 | yesterday | BSD-3-Clause | A | 44 | Claude Code, Codex |
| argent-react-native-app-workflowsoftware-mansion/argent | Skill | 3.2k | today | Apache-2.0 | A | 46 | Claude Code, Codex |
| nightly-audit-engineer-getting-startedmakecindy/cindy | Skill | 9.5k | today | Apache-2.0 | A | 46 | Claude Code, Codex |
| nightly-audit-engineer-opsmakecindy/cindy | Skill | 9.5k | today | Apache-2.0 | A | 43 | Claude Code, Codex |
| argent-react-native-optimizationsoftware-mansion/argent | Skill | 3.2k | today | Apache-2.0 | A | 71 | Claude Code, Codex |
| nightly-audit-engineer-evidencemakecindy/cindy | Skill | 9.5k | today | Apache-2.0 | A | 37 | Claude Code, Codex |
| argent-metro-debuggersoftware-mansion/argent | Skill | 3.2k | today | Apache-2.0 | A | 104 | Claude Code, Codex |