
Tinystruct Patterns
This gives Claude the patterns for building with tinystruct, a lightweight Java framework that treats CLI and HTTP as equal citizens. Every @Action-annotated method runs from both terminal and browser without modification. You'll want this when extending AbstractApplication, wiring routes, handling JSON with the built-in Builder components instead of Jackson, or working with the AbstractData persistence layer. It covers the dual-mode philosophy, Server-Sent Events, file uploads, and the native MCP server support added in 1.7.26. The security note on prompt injection in tool return values is worth reading if you're exposing MCP tools. Useful if you're actually working in a tinystruct codebase or need to understand its zero-dependency approach to routing and data serialization.
- skills.sh installs
- 5.3K
- GitHub stars
- 300.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add affaan-m/ecc --skill tinystruct-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
tinystruct Development Patterns
Architecture and implementation patterns for building modules with the tinystruct Java framework – a lightweight, high-performance framework that treats CLI and HTTP as equal citizens, requiring no main() method and minimal configuration.
Core Principle
CLI and HTTP are equal citizens. A transport-neutral @Action uses Mode.DEFAULT (or omits mode) and has no HTTP-only dependencies. Such an action can run from both a terminal and a web browser. Mode.DEFAULT removes the transport restriction; it does not make an HTTP-dependent method CLI-compatible. Request and Response parameters come from HTTP context attributes and remain null when those attributes are absent, as in an ordinary CLI invocation. Keep shared logic independent of HTTP objects, sessions, and uploads, and call it from transport-specific entry points when needed. This "dual-mode" capability is the core design philosophy of tinystruct. An action with a transport-specific mode (Mode.CLI, Mode.HTTP_GET, Mode.HTTP_POST, ...) is deliberately bound to that transport: the framework rejects it from the other one with "The action is not allowed to be executed."
Sponsors
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Backend & APIs, Sales & Marketing, Java & JVM, CLI & Terminal, Databases
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 263- Uncloud5.3K
- Parallel Execution Optimizer5.3K
- Prediction Market Oracle Research5.3K
- Prediction Market Risk Review5.3K
- Data Throughput Accelerator5.3K
- Recursive Decision Ledger5.3K
- Team Agent Orchestration5.1K
- Dynamic Workflow Mode5K
- Kubernetes Patterns4.9K
- Intent Driven Development4.8K
- Inherit Legacy Style4.8K
- Orch Build Mvp4.8K
- Codehealth Mcp4.8K
- Orch Pipeline4.8K
- Orch Add Feature4.8K
- Orch Refine Code4.8K
- Orch Fix Defect4.8K
- Orch Change Feature4.8K
- Literature Review3.9K
- Everything Claude Code3.6K
- Scholar Evaluation3.4K
- Pubmed Database3.3K
- Gget3.2K
- Uspto Database3.2K