RIPDPI: Skill for Claude Code

.agents/skills/detekt-custom-rules/SKILL.md

detekt-custom-rules is a skill for Claude Code, Codex from po4yka/RIPDPI. It costs 44 tokens per session (1,909 once invoked), scanned A, original, BSD-3-Clause.

A guide for registering and testing custom Detekt rules in a Kotlin project. Detekt is a static checker that finds code-pattern problems, and these custom rules enforce project-specific architecture, privacy, and suppression practices.

In plain words
What is it for?
Use it when adding or debugging a custom rule for dependency injection, privacy-safe logs, or suppression handling.
Why use it?
It prevents a new rule from being registered incorrectly, omitted from documentation, or producing untested false positives. It also helps keep compile-time checks aligned with the project's conventions.

Skill for Claude CodeCodex

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

This is po4yka/RIPDPI's own configuration. It tells Claude Code and Codex how to work on RIPDPI itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything RIPDPI configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/po4yka/RIPDPI/main/.agents/skills/detekt-custom-rules/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/po4yka/RIPDPI

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 detekt-custom-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/po4yka/ripdpi/detekt-custom-rules/github.svg)](https://agentmods.dev/skills/po4yka/ripdpi/detekt-custom-rules)
Your own site
<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.

agentmods 80×15 button for detekt-custom-rules

Your own site · 80×15
<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>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,909 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.00044 $0.01909
Opus 5.5 $0.00018 $0.00764
Sonnet 5.5 $0.00009 $0.00382
Haiku 4.5 $0.00004 $0.00191

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

Security

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.

.agents/skills/detekt-custom-rules/SKILL.md · 218 lines

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.",
            ),
        )
    }
}

Read the full file on GitHub · 218 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. yesterday First seen · 218 lines · 44 tokens per session scan A 5b979ecbc010

Subscribe to this mod's changes

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.

Related

detekt-custom-rules compared with skills from other repositories

detekt-custom-rules next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
detekt-custom-rulespo4yka/RIPDPISkill85yesterdayBSD-3-ClauseA44Claude Code, Codex
argent-react-native-app-workflowsoftware-mansion/argentSkill3.2ktodayApache-2.0A46Claude Code, Codex
nightly-audit-engineer-getting-startedmakecindy/cindySkill9.5ktodayApache-2.0A46Claude Code, Codex
nightly-audit-engineer-opsmakecindy/cindySkill9.5ktodayApache-2.0A43Claude Code, Codex
argent-react-native-optimizationsoftware-mansion/argentSkill3.2ktodayApache-2.0A71Claude Code, Codex
nightly-audit-engineer-evidencemakecindy/cindySkill9.5ktodayApache-2.0A37Claude Code, Codex
argent-metro-debuggersoftware-mansion/argentSkill3.2ktodayApache-2.0A104Claude Code, Codex