# Oc Types

> Trigger: type contracts, Object, Map<String,Object>, primitive obsession. Detect weak or implicit Java type contracts.

- Skill: `andresnator/oc-types` (Agent Skill)
- Install (CLI): `npx get-skill add andresnator/oc-types`
- Raw SKILL.md: https://api.skillmd.com/api/skills/andresnator/oc-types/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: Apache-2.0
- Author: andresnator (https://skillmd.com/u/andresnator)
- Updated: 2026-11-15
- Page: https://skillmd.com/skills/andresnator/oc-types

---


# oc-types

## Intent

- **Goal:** Weak or implicit Java type contracts made explicit.
- **Limits:**
  - Prefer value objects, enums, records, or typed DTOs when they clarify contracts.
  - Keep public API changes as follow-up unless approved.
  - Preserve observable behavior; label functional changes as follow-up.
- **Fails if:** a finding lacks evidence and is not marked hypothesis, or a public API change is proposed as in-scope without approval.

## Context

- **Reads:** target and nearby tests, as needed.
- **Never reads:** `none`.
- **Persona:** refactor reviewer.
- **Scope:** load when reviewing refactor plans for: type contracts, Object, Map<String,Object>, primitive obsession.

## Expectations

- **Scenarios:**
  - WHEN Object, raw types, Map<String,Object>, stringly typed values, magic strings, casts, or primitive obsession appear THEN flag them.
- **Done means:** findings in the calling contract's format (it wins); each has `file:line` evidence or is marked hypothesis; `no_findings` when nothing is material.
- **Quality needs:** note validation and rollback implications where material; the caller decides where they land.

## Method

| Signal | Action |
|---|---|
| Concrete evidence exists | Create a finding with `file:line` evidence and the smallest safe refactor. |
| Evidence is incomplete | Mark as hypothesis and lower confidence. |
| Recommendation is cosmetic or speculative | Omit it unless maintainability benefit is clear. |

