CommunityProgramación y desarrollogithub.com

lazy-java

Turn structured, Java-like pseudocode or a plain-language programming request into precise, idiomatic Java. Use when the user wants simpler authoring with explicit, reviewable behavior and predictable Java output.

¿Qué es lazy-java?

lazy-java is a Claude Code agent skill that turn structured, Java-like pseudocode or a plain-language programming request into precise, idiomatic Java. Use when the user wants simpler authoring with explicit, reviewable behavior and predictable Java output.

Compatible con~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/miiz/lazy-java/tree/HEAD

Installed? Explore more Programación y desarrollo skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Lazy Java

Translate a compact pseudocode language into Java while preserving explicit behavior. The pseudocode is a small, typed intermediate language: it reduces Java syntax overhead but keeps decisions that materially affect behavior visible. Do not treat vague prose as a complete specification.

Workflow

  1. Identify the requested deliverable: pseudocode, Java, or both. If the user supplies pseudocode, translate it. If they give prose, derive a concise pseudocode block first, then translate it unless they asked for Java only.
  2. Resolve the target Java version, project conventions, existing types, and build context from the repository when available. Follow the project's established style and APIs.
  3. Make behavior explicit in the pseudocode: inputs and types, return type, nullability, state changes, ordering, error cases, and boundary behavior where relevant. Consult references/language.md for syntax and translation rules.
  4. Translate each construct directly. Keep the pseudocode-to-Java mapping one-to-one where possible. Do not add behavior, dependencies, validation, persistence, concurrency, or error handling that the pseudocode does not specify.
  5. If an ambiguity can change observable behavior, ask a focused question or mark the exact unresolved choice before emitting implementation. For independent, low-impact details, choose a conventional Java default and state it briefly.
  6. Return Java in the requested form: complete file(s) when the user wants implementation, or focused snippets when they ask for an example. Include the pseudocode when it helps review the translation. Preserve comments that carry requirements; omit mechanical pseudocode narration.

Translation guarantees

  • Preserve declared types, control flow, evaluation order, and collection ordering. Infer omitted generic arguments only when surrounding declarations or usage determine one unambiguous type; never copy pseudocode's <> into a Java type declaration.
  • Map Option<T> to Optional<T> only at API boundaries where that fits the surrounding code; otherwise use the project's established nullable-value convention. Never silently convert nullable values into unchecked assumptions.
  • Treat requires and ensures as contracts to implement or document. Do not claim runtime enforcement unless generated code actually enforces them.
  • Use Java standard-library types by default. Introduce a new class or dependency only when required by the requested design.
  • Keep names and public visibility as stated. When omitted, choose the narrowest visibility that allows the requested use.
  • For invalid or incomplete input, do not fabricate a “precise” implementation. Show the unresolved item and a proposed default, then proceed only when the choice is non-semantic or the user has authorized defaults.

Output

For a normal conversion, present the pseudocode (if derived from prose), then the Java. Add a short mapping note only for non-obvious decisions or assumptions. Do not claim the code compiles unless it was checked in the user's project or the claim is limited to a clearly self-contained snippet.

Skills relacionados