Tinystruct Patterns
affaan-m/ECC
Expert guidance for developing with the tinystruct Java framework.
Expert guidance for developing with the tinystruct Java framework.
$ npx skills add templetongroup/radiant --skill tinystruct-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install templetongroup/radiant tinystruct-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/tinystruct-patterns .claude/skills/tinystruct-patterns && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "tinystruct-patterns" agent skill from https://github.com/templetongroup/radiant/tree/master/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.
$skill-installer install https://github.com/templetongroup/radiant/tree/master/skills/tinystruct-patternsType 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.
$ npx skills add templetongroup/radiant --skill tinystruct-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install templetongroup/radiant tinystruct-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/tinystruct-patterns .agents/skills/tinystruct-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "tinystruct-patterns" agent skill from https://github.com/templetongroup/radiant/tree/master/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.
$ npx skills add templetongroup/radiant --skill tinystruct-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install templetongroup/radiant tinystruct-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/tinystruct-patterns .cursor/skills/tinystruct-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "tinystruct-patterns" agent skill from https://github.com/templetongroup/radiant/tree/master/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.
$ gemini skills install https://github.com/templetongroup/radiant.git --path skills/tinystruct-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add templetongroup/radiant --skill tinystruct-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install templetongroup/radiant tinystruct-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/tinystruct-patterns .gemini/skills/tinystruct-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "tinystruct-patterns" agent skill from https://github.com/templetongroup/radiant/tree/master/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.
$ gh skill install templetongroup/radiant tinystruct-patternsInstalls 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).
$ npx skills add templetongroup/radiant --skill tinystruct-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/tinystruct-patterns .github/skills/tinystruct-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "tinystruct-patterns" agent skill from https://github.com/templetongroup/radiant/tree/master/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.
$ npx skills add templetongroup/radiant --skill tinystruct-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install templetongroup/radiant tinystruct-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/templetongroup/radiant.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/tinystruct-patterns .opencode/skills/tinystruct-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "tinystruct-patterns" agent skill from https://github.com/templetongroup/radiant/tree/master/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.
tinystruct-patternsExpert guidance for developing with the tinystruct Java framework.
Tinystruct Patterns is an agent skill from templetongroup/radiant. 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: A local coding harness for Mac. Chat with coding agents across cloud and local models, watch every tool call in a live activity feed, and drive a real terminal — in one window… The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 94838ca. It shows what the files ask for, not the result of running them.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
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.
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.
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.
The full file from templetongroup/radiant at commit 94838ca, republished under its MIT licence (© templetongroup). 777 words, ~2,959 tokens.
.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.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.
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.
Application modules by extending AbstractApplication.@Action.Context.Builder and Builders components.AbstractData POJOs.generate command.URLRequest and HTTPHandler.application.properties.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.
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 + "!";
}
}@Action(value = "login", mode = Mode.HTTP_POST)
public String doLogin(Request<?, ?> request) throws ApplicationException {
request.getSession().setAttribute("userId", "42");
return "Logged in";
}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"}]}
}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);import org.tinystruct.data.FileEntity;
@Action(value = "upload", mode = Mode.HTTP_POST)
public String upload(Request<?, ?> request) throws ApplicationException {
List<FileEntity> files = request.getAttachments();
if (files != null) {
for (FileEntity file : files) {
System.out.println("Uploaded: " + file.getFilename());
}
}
return "Upload OK";
}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:
<dependency>
<groupId>org.tinystruct</groupId>
<artifactId>tinystruct</artifactId>
<version>1.7.26</version>
</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:
org.tinystruct.mcp.MCPTool.@Action and declare parameters using @Argument within the arguments array.@Argument. (Do not use getContext().getAttribute(...) for tool arguments).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:
org.tinystruct.mcp.MCPServer.init() and register your tools using this.registerTool(). The framework automatically scans and maps the @Action methods.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";
}
}Run the server via the dispatcher:
bin/dispatcher start --import org.tinystruct.system.HttpServer --import com.example.MyMCPServerSettings are managed in src/main/resources/application.properties.
# Database
driver=org.h2.Driver
database.url=jdbc:h2:~/mydb
database.user=sa
database.password=
# Server
default.home.page=hello
server.port=8080
# Locale
default.language=en_US
# Session (Redis for clustered environments)
# default.session.repository=org.tinystruct.http.RedisSessionRepository
# redis.host=127.0.0.1
# redis.port=6379Access config values in your application:
String port = this.getConfiguration("server.port");| Symptom | Correct Pattern |
|---|---|
Importing com.google.gson or com.fasterxml.jackson | Use org.tinystruct.data.component.Builder / Builders. |
Using List<Builder> for JSON arrays | Use Builders to avoid generic type erasure issues. |
ApplicationRuntimeException: template not found | Call setTemplateRequired(false) in init() for API-only apps. |
Annotating private methods with @Action | Actions must be public to be registered by the framework. |
Hardcoding main(String[] args) in apps | Use bin/dispatcher as the entry point for all modules. |
Manual ActionRegistry registration | Prefer the @Action annotation for automatic discovery. |
| Action not found at runtime | Ensure class is imported via --import or listed in application.properties. |
| CLI arg not visible | Pass with --key value; access via getContext().getAttribute("--key"). |
| Two methods same path, wrong one fires | Set explicit mode (e.g., HTTP_GET vs HTTP_POST) to disambiguate. |
init(): Leverage init() for setup (config, DB) rather than the constructor. Do NOT call setAction() — use @Action annotation.Mode parameter in @Action to restrict sensitive operations to CLI only or specific HTTP methods.getContext().getAttribute("--flag") rather than adding parameters to the method signature.CompletableFuture.runAsync() inside the event handler.Detailed guides are available in the references/ directory:
src/main/java/org/tinystruct/AbstractApplication.java — Core base class with lifecycle hookssrc/main/java/org/tinystruct/system/annotation/Action.java — Annotation & Modessrc/main/java/org/tinystruct/application/ActionRegistry.java — Routing Enginesrc/main/java/org/tinystruct/data/component/Builder.java — JSON object serializersrc/main/java/org/tinystruct/data/component/Builders.java — JSON array serializersrc/main/java/org/tinystruct/data/component/AbstractData.java — Base POJO class with CRUDsrc/main/java/org/tinystruct/data/Mapping.java — Mapping XML parsersrc/main/java/org/tinystruct/data/tools/MySQLGenerator.java — POJO generator referencesrc/main/java/org/tinystruct/data/component/FieldType.java — SQL-to-Java type mappingssrc/main/java/org/tinystruct/data/component/Condition.java — Fluent SQL query buildersrc/main/java/org/tinystruct/http/SSEPushManager.java — SSE connection managementsrc/test/java/org/tinystruct/application/ActionRegistryTest.java — Registry test examplessrc/test/java/org/tinystruct/system/HttpServerHttpModeTest.java — HTTP integration test patterns© templetongroup, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 6 other files (references) in skills/tinystruct-patterns of templetongroup/radiant.
Open the folder on GitHubat commit 94838ca
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Tinystruct Patterns this skilltempletongroup/radiant | 113 | — | ~3k | Automated safety check: Pass | MIT | |
| Tinystruct Patternsaffaan-m/ECC | 276k | — | ~5.8k | Automated safety check: Pass | MIT | |
| System Bridge Testing Workflowtimmo001/system-bridge | 357 | — | ~844 | Automated safety check: Pass | Apache-2.0 | |
| Neon Functionsneondatabase/agent-skills | 100 | — | ~12k | Automated safety check: Notes | Apache-2.0 | |
| Edt MCP Build TestDitriXNew/EDT-MCP | 296 | — | ~1.4k | Automated safety check: Pass | AGPL-3.0 | |
| Eclipse Testgradusnikov/eclipse-chatgpt-plugin | 172 | — | ~1k | Automated safety check: Pass | MIT |
affaan-m/ECC
Expert guidance for developing with the tinystruct Java framework.
timmo001/system-bridge
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…
neondatabase/agent-skills
Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASEURL injected automatically and compute that runs next to your data.
DitriXNew/EDT-MCP
How to build the EDT-MCP Eclipse plugin (Tycho/Maven) and run its unit and e2e tests, plus the test conventions for this repo.
gradusnikov/eclipse-chatgpt-plugin
Run JUnit tests in Eclipse projects — all tests, by package, by class, or individual test methods.
JetBrains/MPS
Create and execute IDE run configurations for MPS root nodes via MPS MCP — Java Application for IMainClass / ClassConcept with main, JUnit Tests for ITestCase.
templetongroup/radiant
A skill your agent uses to generate or audit design systems, check visual consistency, and review PRs that touch styling.
templetongroup/radiant
Design, redesign, build, audit, polish, and production-verify exceptional interfaces across web, mobile, and native apps.
templetongroup/radiant
Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets.
templetongroup/radiant
Production-ready UI motion system for React/Next.js. An agent skill from templetongroup/radiant.
templetongroup/radiant
Read a plan document, decompose it into steps, design a per-step agent chain from the ECC catalogue, and emit ready-to-paste /orchestrate custom prompts.
templetongroup/radiant
Ask the user to rate the code/output just produced on a 1-5 star scale, then ask rating-appropriate follow-up questions, log the rating, and iterate until the work reaches 4+ stars.
Works with
Categories
Expert guidance for developing with the tinystruct Java framework. Tinystruct Patterns is an agent skill from templetongroup/radiant. Expert guidance for developing with the tinystruct Java framework.
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.
Run `npx skills add templetongroup/radiant --skill tinystruct-patterns -a claude-code`. Or copy the skill folder (skills/tinystruct-patterns in templetongroup/radiant) into .claude/skills/tinystruct-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add templetongroup/radiant --skill tinystruct-patterns -a codex`. Or copy the skill folder (skills/tinystruct-patterns in templetongroup/radiant) into .agents/skills/tinystruct-patterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add templetongroup/radiant --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.
SKILL.md names no scripts, command-line tools or credentials: Tinystruct Patterns is instructions for the agent only.
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.
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.
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.
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.
Skills that share tags, products or a category with Tinystruct Patterns: Tinystruct Patterns (affaan-m/ECC, 276k stars), System Bridge Testing Workflow (timmo001/system-bridge, 357 stars), Neon Functions (neondatabase/agent-skills, 100 stars) and Edt MCP Build Test (DitriXNew/EDT-MCP, 296 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
templetongroup (a GitHub user) maintains it in templetongroup/radiant, which has 113 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 6, 2026.
Source: templetongroup/radiant on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.