marketplace/bundles/pm-dev-java-cui/skills/cui-http/SKILL.md
CUI HTTP client standards with HttpHandler, HttpResult pattern, and async-first adapters
npx skillsauth add cuioss/plan-marshall cui-httpInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
REFERENCE MODE: This skill provides reference material. Load specific standards on-demand based on current task.
CUI-specific HTTP client standards for projects using de.cuioss:cui-http. Covers HttpHandler, HttpResult sealed interface, and async-first adapters.
Execution mode: Reference library; load standards on-demand for HTTP client implementation tasks.
Prohibited actions:
Constraints:
de.cuioss:cui-http libraryde.cuioss:cui-http (HttpHandler, HttpResult, HttpAdapter)CRITICAL: Load these standards for any HTTP client implementation work.
Read: standards/cui-http.md
This provides the foundational rules:
HttpHandler builder for all HTTP client configurationHttpResult<T> sealed interface for result handlingSimple HTTP request — Use HttpHandler directly:
HttpHandler handler = HttpHandler.builder()
.uri("https://api.example.com/data")
.connectionTimeoutSeconds(10)
.readTimeoutSeconds(30)
.build();
Resilient HTTP with caching — Compose ETag + retry adapters:
HttpAdapter<String> adapter = ResilientHttpAdapter.wrap(
ETagAwareHttpAdapter.<String>builder()
.httpHandler(httpHandler)
.responseConverter(StringContentConverter.identity())
.build(),
RetryConfig.defaults()
);
Result handling — Use pattern matching on HttpResult:
return switch (result) {
case HttpResult.Success<ConfigData>(var config, var etag, var status) -> {
updateCache(config, etag);
yield true;
}
case HttpResult.Failure<ConfigData> failure -> {
if (failure.fallbackContent() != null) {
yield true; // Graceful degradation
}
yield failure.isRetryable();
}
};
Type-safe result handling with exhaustive pattern matching:
HttpResult.Success<T> — Content with ETag and HTTP statusHttpResult.Failure<T> — Error with optional fallback content and error category| Category | Retryable | Examples |
|----------|-----------|----------|
| NETWORK_ERROR | Yes | Connection failures, timeouts |
| SERVER_ERROR | Yes | 5xx responses |
| CLIENT_ERROR | No | 4xx responses |
| INVALID_CONTENT | No | Content conversion failures |
| CONFIGURATION_ERROR | No | Setup/config issues |
| Standard | Purpose |
|----------|---------|
| standards/cui-http.md | HttpHandler builder, HttpResult pattern matching, adapters, error categories |
pm-dev-java:java-core — General Java patternspm-dev-java-cui:cui-http-testing — HTTP testing with CUI MockWebServertesting
A test skill for README generation
testing
A test skill with existing references
tools
Skill without references directory
development
Test skill with table-format references