zargs

zargs is a skill for Claude Code, Codex from AdamBien/airails. It costs 90 tokens per session (1,173 once invoked), scanned A, original, MIT.

A coding pattern for parsing command-line options in Java applications. It represents each option with an enum, a Java type that defines a fixed set of named values, and requires Java 21 or newer.

In plain words
What is it for?
Use it when adding flags such as help, verbose output, or an output-file option to a Java CLI program.
Why use it?
It lets a Java command-line program handle options without adding a library or dependency. The same definitions can also describe valid options and generate usage text.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/adambien/airails/zargs
Any agent
npx skills add AdamBien/airails --skill zargs
Clone the repo
git clone --depth 1 https://github.com/AdamBien/airails

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 zargs

README.md
[![agentmods](https://agentmods.dev/badge/skills/adambien/airails/zargs.svg)](https://agentmods.dev/skills/adambien/airails/zargs)
Your own site
<a href="https://agentmods.dev/skills/adambien/airails/zargs"><img src="https://agentmods.dev/badge/skills/adambien/airails/zargs.svg" alt="Measured on agentmods" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,173 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00090 $0.01173
Opus 5 $0.00045 $0.00587
Sonnet 5 $0.00018 $0.00235
Haiku 4.5 $0.00009 $0.00117

Measured 4d ago against content hash ed3849fa2f5d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

zargs 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 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.

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.

java/zargs/SKILL.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add zero-dependency argument parsing to a Java CLI application using $ARGUMENTS. Apply all rules below.

What is zargs

zargs is a zero-dependency, enum-based argument parsing pattern for Java CLI applications. It is not a library or dependency — it is a set of conventions and code patterns to apply directly when generating argument parsing code.

Argument Enum Pattern

Define an enum where each constant represents a CLI option. The enum provides matching, lookup, and usage generation:

import java.util.stream.Collectors;
import java.util.stream.Stream;

public enum Arg {
    HELP("-help", "Show this help"),
    VERBOSE("-verbose", "Enable verbose output"),
    OUTPUT("-output", "Specify output file");

    final String option;
    final String description;

    Arg(String option, String description) {
        this.option = option;
        this.description = description;
    }

    boolean matches(String value) {
        return this.option.equals(value)
            || value.startsWith(this.option + ":");
    }

    static Arg from(String value) {
        return Stream.of(values())
            .filter(a -> a.matches(value))
            .findFirst()
            .orElse(null);
    }

    static String usage() {
        return Stream.of(values())
            .map(a -> "  %-12s %s".formatted(a.option, a.description))
            .collect(Collectors.joining("\n"));
    }
}

Parsed Arguments Record

Define a record matching the application's parsed arguments:

import java.util.List;

public record Args(boolean verbose, String output, List<String> files) {}

Argument Syntax

zargs supports two value styles for options that take a value:

Style Example Description
Colon-separated -output:result.txt Value follows : immediately
Space-separated -output result.txt Value is the next argument

Boolean flags (like -verbose) require no value.

Read the full file on GitHub · 150 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. 4d ago First seen · 150 lines · 90 tokens per session scan A ed3849fa2f5d

Subscribe to this mod's changes

zargs is a skill published in the GitHub repository AdamBien/airails (48 stars, last pushed 15d ago), licensed MIT. It adds 90 tokens to every session and 1,173 once invoked, about $0.0005 per session on Opus 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-08-30.

Related

Other skills, from other repositories

java-boilerplate

Gera automaticamente getters, setters, construtores, toString, equals e hashCode para classes Java. Triggers on: /java-boilerplate, 'gerar métodos java', 'criar getters setters'.

chidekina/aria-superpowers · 48 tokens

java-coding-standards

Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.

majiang213/OpenClaw-MAS · 35 tokens

springboot-patterns

Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.

majiang213/OpenClaw-MAS · 36 tokens

jeecg-dev

JeecgBoot 开发规范(仅手动触发)。⚠️ 本技能只在用户显式输入 /jeecg-dev 命令时使用,禁止自动触发——编写/修改 JeecgBoot 代码、应用 GitHub PR/issue 改动、修复 bug、新增功能、重构、代码生成等场景都不要自动调用本技能。内容涵盖 update-begin/end 痕迹注释、命名规范、实体/控制器/服务模式、API 约定、建表规则与修改日志实践。MANUAL ONLY: invoke ONLY when the user explicitly runs the /jeecg-dev command. Do NOT auto-trigger on any code editing…

jeecgboot/skills · 170 tokens

deno-sandbox

Use when building features that execute untrusted user code, AI-generated code, or need isolated code execution environments. Covers the @deno/sandbox SDK.

denoland/skills · 36 tokens

deno-frontend

Use when building a web frontend with Deno — running React, Vite, Astro, SvelteKit, Next.js, Nuxt or other npm frameworks under Deno, or working with Fresh, Deno's own island-architecture framework. Covers which path to pick, Fresh 2.x routes, handlers, islands, Preact signals, Tailwind, and Fresh 1.x to 2.x migration.

denoland/skills · 88 tokens