Install the "tinystruct-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/skills/tinystruct-patterns into .claude/skills/tinystruct-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tinystruct-patterns", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add affaan-m/ECC --skill tinystruct-patterns -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "tinystruct-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/skills/tinystruct-patterns into .agents/skills/tinystruct-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tinystruct-patterns", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add affaan-m/ECC --skill tinystruct-patterns -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "tinystruct-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/skills/tinystruct-patterns into .cursor/skills/tinystruct-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tinystruct-patterns", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add affaan-m/ECC --skill tinystruct-patterns -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "tinystruct-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/skills/tinystruct-patterns into .gemini/skills/tinystruct-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tinystruct-patterns", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add affaan-m/ECC --skill tinystruct-patterns -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "tinystruct-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/skills/tinystruct-patterns into .github/skills/tinystruct-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tinystruct-patterns", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add affaan-m/ECC --skill tinystruct-patterns -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "tinystruct-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/skills/tinystruct-patterns into .opencode/skills/tinystruct-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tinystruct-patterns", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
tinystruct-patterns
GitHub stars
274k
Used in
1 other repo
Token cost
~3k tokens
SKILL.md length
777 words
Files
7 (incl. references)
Skills in repo
657
Repo updated
First seen
Licence
MIT
At a glance
Expert guidance for developing with the tinystruct Java framework.
Works in 3 steps: Extend org.tinystruct.mcp.MCPTool. → Annotate operations with @Action and… → Accept parameters as explicit method…
Working on the tinystruct codebase
SKILL.md covers Core Principle, When to Activate, How It Works and Examples, plus 6 more sections
Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
What it does
Tinystruct Patterns is an agent skill from affaan-m/ECC. Expert guidance for developing with the tinystruct Java framework. Use when working on the tinystruct codebase or any project built on tinystruct — including creating Application classes, @Action-mapped routes, unit tests, ActionRegistry, HTTP/CLI dual-mode handling, the built-in HTTP server, the event system, JSON with Builder/Builders, database persistence with AbstractData, POJO generation, Server-Sent Events (SSE), file uploads, and outbound HTTP networking.
Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/architecture.md`, `references/data-handling.md` and `references/database.md`).
It sits in Backend & APIs, covering Realtime and WebSockets, File uploads and storage and Unit testing. It works with Java and Model Context Protocol. The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.
When your agent uses it
Working on the tinystruct codebase
Any project built on tinystruct — including creating Application classes
@Action-mapped routes
HTTP/CLI dual-mode handling
Example prompts
“/tinystruct-patterns”
Workflow steps
3 steps, taken from the first numbered list in SKILL.md.
1Extend org.tinystruct.mcp.MCPTool.
2Annotate operations with @Action and declare parameters using @Argument within the arguments array.
3Accept parameters as explicit method arguments matching the keys in @Argument. (Do not use getContext().getAttribute(...) for tool…
What it can do on your machine
Read from SKILL.md and the folder at commit ef648e0. It shows what the files ask for, not the result of running them.
Tool permissions
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Runs code
No scripts in the folder and no shell commands in SKILL.md (its code samples are java, xml, bash and properties).
From the folder's file list and the shell code blocks in SKILL.md.
Network
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Credentials
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Context cost
Tinystruct Patterns loads about 3k tokens when it runs, and up to ~6.9k if it reads all its reference files. Until then it costs about 122 tokens; SKILL.md has 777 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~122
When it runs· the whole SKILL.md, loaded when a task matches
~3k
With references· SKILL.md plus every file in references/, read only if the agent opens them
~6.9k
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
Safety
Auto-check passed
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
Download SKILL.mdSave it as .claude/skills/tinystruct-patterns/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
tinystruct-patterns
description
Expert guidance for developing with the tinystruct Java framework. Use when working on the tinystruct codebase or any project built on tinystruct — including creating Application classes, @Action-mapped routes, unit tests, ActionRegistry, HTTP/CLI dual-mode handling, the built-in HTTP server, the event system, JSON with Builder/Builders, database persistence with AbstractData, POJO generation, Server-Sent Events (SSE), file uploads, and outbound HTTP networking.
metadata.origin
ECC
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. Every method annotated with @Action should ideally be runnable from both a terminal and a web browser without modification. This "dual-mode" capability is the core design philosophy of tinystruct.
When to Activate
When to Use
Creating new Application modules by extending AbstractApplication.
Defining routes and command-line actions using @Action.
Handling per-request state via Context.
Performing JSON serialization using the native Builder and Builders components.
Working with database persistence via AbstractData POJOs.
Generating POJOs from database tables using the generate command.
Implementing Server-Sent Events (SSE) for real-time push.
Handling file uploads via multipart data.
Making outbound HTTP requests with URLRequest and HTTPHandler.
Configuring database connections or system settings in application.properties.
Debugging routing conflicts (Actions) or CLI argument parsing.
How It Works
The tinystruct framework treats any method annotated with @Action as a routable endpoint for both terminal and web environments. Applications are created by extending AbstractApplication, which provides core lifecycle hooks like init() and access to the request Context.
Routing is handled by the ActionRegistry, which automatically maps path segments to method arguments and injects dependencies. For data-only services, the native Builder and Builders components should be used for JSON serialization to maintain a zero-dependency footprint. The database layer uses AbstractData POJOs paired with XML mapping files for CRUD operations without external ORM libraries.
Examples
Basic Application (MyService)
java
public class MyService extends AbstractApplication {
@Override
public void init() {
this.setTemplateRequired(false); // Disable .view lookup for data/API apps
}
@Override public String version() { return "1.0.0"; }
@Action("greet")
public String greet() {
return "Hello from tinystruct!";
}
// Path parameter: GET /?q=greet/James OR bin/dispatcher greet/James
@Action("greet")
public String greet(String name) {
return "Hello, " + name + "!";
}
}
import org.tinystruct.data.component.Builder;
import org.tinystruct.data.component.Builders;
@Action("api/data")
public String getData() throws ApplicationException {
Builders dataList = new Builders();
Builder item = new Builder();
item.put("id", 1);
item.put("name", "James");
dataList.add(item);
Builder response = new Builder();
response.put("status", "success");
response.put("data", dataList);
return response.toString(); // {"status":"success","data":[{"id":1,"name":"James"}]}
}
SSE (Server-Sent Events)
java
import org.tinystruct.http.SSEPushManager;
@Action("sse/connect")
public String connect() {
return "{\"type\":\"connect\",\"message\":\"Connected to SSE\"}";
}
// Push to a specific client
String sessionId = getContext().getId();
Builder msg = new Builder();
msg.put("text", "Hello, user!");
SSEPushManager.getInstance().push(sessionId, msg);
// Broadcast to all
// Broadcast to all
SSEPushManager.getInstance().broadcast(msg);
tinystruct provides native support for the Model Context Protocol (MCP) starting with SDK version 1.7.26.
The MCP APIs (e.g., org.tinystruct.mcp.MCPTool, org.tinystruct.mcp.MCPServer, org.tinystruct.mcp.MCPException) are included directly in the core dependency:
SECURITY WARNING (Prompt Injection):
Tool return values are fed directly back into the AI model's context window. You MUST validate and sanitize all caller-supplied arguments before including them in the tool's return string. Failure to sanitize inputs can allow an attacker to inject adversarial instructions (Prompt Injection) that override the model's behavior. Always validate length, character sets, and nullity.
To create an MCP Tool:
Extend org.tinystruct.mcp.MCPTool.
Annotate operations with @Action and declare parameters using @Argument within the arguments array.
Accept parameters as explicit method arguments matching the keys in @Argument. (Do not use getContext().getAttribute(...) for tool arguments).
java
import org.tinystruct.mcp.MCPTool;
import org.tinystruct.mcp.MCPException;
import org.tinystruct.system.annotation.Action;
import org.tinystruct.system.annotation.Argument;
public class MyCustomTool extends MCPTool {
public MyCustomTool() {
super("custom", "A custom tool for demonstrating MCP");
}
@Action(
value = "custom/hello",
description = "Say hello to someone",
arguments = {
@Argument(key = "name", description = "The name to greet", type = "string", optional = false)
}
)
public String hello(String name) throws MCPException {
// SECURITY: Validate/sanitize tool inputs before returning to the model
// to prevent prompt injection vulnerabilities.
if (name == null || name.length() > 50 || !name.matches("^[a-zA-Z0-9 ]+$")) {
throw new MCPException("Invalid name provided");
}
return "Hello, " + name + "!";
}
}
To deploy an MCP Server:
Extend org.tinystruct.mcp.MCPServer.
Override init() and register your tools using this.registerTool(). The framework automatically scans and maps the @Action methods.
java
import org.tinystruct.mcp.MCPServer;
public class MyMCPServer extends MCPServer {
@Override
public void init() {
super.init();
this.registerTool(new MyCustomTool());
}
@Override
public String version() {
return "1.0.0";
}
}
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in affaan-m/ECC, which our catalogue first saw on October 7, 2026.
Tinystruct Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
How to test System Bridge - Go table-driven tests and commands, web-client quality checks (lint/typecheck/format, no unit tests), the Chrome DevTools MCP interactive test loop for UI and WebSocket…
General Supabase skill for database, auth, Edge Functions, Realtime and storage work, plus client libraries, migrations, security audits, debugging and reading logs.
Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.
Ingest, index, search, edit, and monitor video and audio with the VideoDB Python SDK — upload from files, URLs, or RTSP feeds, build spoken and scene indexes with timestamped search and playable…
Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.
Measures whether agents actually follow a skill, rule or agent definition by generating scenarios at three strictness levels and scoring tool-call traces.
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.
Expert guidance for developing with the tinystruct Java framework. Tinystruct Patterns is an agent skill from affaan-m/ECC. Expert guidance for developing with the tinystruct Java framework.
When should I use Tinystruct Patterns?
Tinystruct Patterns fits situations like: working on the tinystruct codebase; any project built on tinystruct — including creating Application classes; @Action-mapped routes; HTTP/CLI dual-mode handling.
How do I install Tinystruct Patterns in Claude Code?
Run `npx skills add affaan-m/ECC --skill tinystruct-patterns -a claude-code`. Or copy the skill folder (skills/tinystruct-patterns in affaan-m/ECC) into .claude/skills/tinystruct-patterns in your project. Claude Code loads it when a task matches its description.
How do I install Tinystruct Patterns in Codex?
Run `npx skills add affaan-m/ECC --skill tinystruct-patterns -a codex`. Or copy the skill folder (skills/tinystruct-patterns in affaan-m/ECC) into .agents/skills/tinystruct-patterns in your project. Codex loads it when a task matches its description.
Can I use Tinystruct Patterns in Cursor, Gemini CLI or GitHub Copilot?
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill tinystruct-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tinystruct-patterns, .gemini/skills/tinystruct-patterns, .github/skills/tinystruct-patterns and .opencode/skills/tinystruct-patterns in your project.
What does Tinystruct Patterns need to run?
SKILL.md names no scripts, command-line tools or credentials: Tinystruct Patterns is instructions for the agent only.
Does Tinystruct Patterns access the network?
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Is Tinystruct Patterns safe to install?
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
What licence does Tinystruct Patterns use?
Tinystruct Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
How many tokens does Tinystruct Patterns use?
About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4k tokens, read only when the agent opens those files.
What are the alternatives to Tinystruct Patterns?
Skills that share tags, products or a category with Tinystruct Patterns: System Bridge Testing Workflow (timmo001/system-bridge, 356 stars), Edt MCP Build Test (DitriXNew/EDT-MCP, 295 stars), Eclipse Test (gradusnikov/eclipse-chatgpt-plugin, 171 stars) and Durable Objects (hodgef/apiker, 127 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Tinystruct Patterns?
affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 274,360 GitHub stars. The repository holds 657 skills in this directory. The repository was last updated on October 5, 2026.
Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.