Agent skill

Tinystruct Patterns

by affaan-m in affaan-m/ECC

tinystructフレームワークでアプリケーションモジュールまたはマイクロサービスを開発する際に使用。ルーティング、コンテキスト管理、BuilderによるJSON処理、CLI/HTTPデュアルモードのパターンをカバー。

MITAuto-check passed

Install Tinystruct Patterns

skills CLI
$ npx skills add affaan-m/ECC --skill tinystruct-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC tinystruct-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/ja-JP/skills/tinystruct-patterns .claude/skills/tinystruct-patterns && rm -rf skills-src

Use ~/.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/

Facts

Skill name
tinystruct-patterns
GitHub stars
274k
Token cost
~801 tokens
SKILL.md length
113 words
Files
1
Skills in repo
657
Repo updated
First seen
Licence
MIT

At a glance

tinystructフレームワークでアプリケーションモジュールまたはマイクロサービスを開発する際に使用。ルーティング、コンテキスト管理、BuilderによるJSON処理、CLI/HTTPデュアルモードのパターンをカバー。

  • SKILL.md covers 使用するタイミング, 動作の仕組み, 例 and 設定, plus 3 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. tinystructフレームワークでアプリケーションモジュールまたはマイクロサービスを開発する際に使用。ルーティング、コンテキスト管理、BuilderによるJSON処理、CLI/HTTPデュアルモードのパターンをカバー。

Its SKILL.md is about 800 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

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.

Example prompts

  • “/tinystruct-patterns”

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

    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 801 tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 113 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~33
When it runs · the whole SKILL.md, loaded when a task matches
~801

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.

SKILL.md

The full file from affaan-m/ECC at commit ef648e0, republished under its MIT licence (© affaan-m). 113 words, ~801 tokens.

Download SKILL.mdSave it as .claude/skills/tinystruct-patterns/SKILL.md (or your agent's skills folder).
name
tinystruct-patterns
description
tinystructフレームワークでアプリケーションモジュールまたはマイクロサービスを開発する際に使用。ルーティング、コンテキスト管理、BuilderによるJSON処理、CLI/HTTPデュアルモードのパターンをカバー。
origin
ECC

tinystruct 開発パターン

tinystruct Java フレームワークを使用してモジュールをビルドするためのアーキテクチャと実装パターン。CLIとHTTPが等しく扱われる軽量なシステムです。

使用するタイミング

  • AbstractApplication を拡張して新しい Application モジュールを作成するとき。
  • @Action を使用してルートとコマンドラインアクションを定義するとき。
  • Context を通じてリクエストごとの状態を処理するとき。
  • ネイティブの Builder コンポーネントを使用してJSONシリアライゼーションを行うとき。
  • application.properties でデータベース接続またはシステム設定を構成するとき。
  • ApplicationManager.init() を通じて標準的な bin/dispatcher エントリポイントを生成または再生成するとき。
  • ルーティング競合(Action)またはCLI引数解析のデバッグを行うとき。

動作の仕組み

tinystruct フレームワークは、@Action でアノテーションされたメソッドをターミナルとWeb環境の両方でルーティング可能なエンドポイントとして扱います。アプリケーションは AbstractApplication を拡張することで作成され、init() などのコアライフサイクルフックとリクエスト Context へのアクセスが提供されます。

ルーティングは ActionRegistry によって処理され、パスセグメントをメソッド引数に自動的にマッピングして依存関係を注入します。データのみのサービスでは、ゼロ依存のフットプリントを維持するために、JSONシリアライゼーションにネイティブの Builder コンポーネントを使用すべきです。フレームワークには ApplicationManager のユーティリティも含まれており、bin/dispatcher スクリプトを生成することでプロジェクトの実行環境をブートストラップします。

例

基本アプリケーション(MyService)
java
public class MyService extends AbstractApplication {
    @Override
    public void init() {
        this.setTemplateRequired(false); // データ/APIアプリの .view 参照を無効化
    }

    @Override public String version() { return "1.0.0"; }

    @Action("greet")
    public String greet() {
        return "Hello from tinystruct!";
    }
}
パラメータ付きルーティング(getUser)
java
// Web: /api/user/123 または CLI: "bin/dispatcher api/user/123" を処理
@Action("api/user/(\\d+)")
public String getUser(int userId) {
    return "User ID: " + userId;
}
HTTPモード分岐(login)
java
@Action(value = "login", mode = Mode.HTTP_POST)
public boolean doLogin() {
    // ログイン処理
    return true;
}
ネイティブJSONデータ処理(getData)
java
@Action("api/data")
public Builder getData() throws ApplicationException {
    Builder builder = new Builder();
    builder.put("status", "success");
    Builder nested = new Builder();
    nested.put("id", 1);
    nested.put("name", "James");
    builder.put("data", nested);
    return builder;
}

設定

設定は src/main/resources/application.properties で管理されます。

テストパターン

JUnit 5 を使用して、アクションが ActionRegistry に登録されていることを検証することでアクションをテストします。

レッドフラグとアンチパターン

症状正しいパターン
com.google.gson または com.fasterxml.jackson のインポートorg.tinystruct.data.component.Builder を使用する。
.view ファイルの FileNotFoundExceptionAPIのみのアプリでは init() 内で setTemplateRequired(false) を呼び出す。
private メソッドへの @Action アノテーションアクションはフレームワークに登録されるために public である必要がある。
アプリ内での main(String[] args) のハードコーディングすべてのモジュールのエントリポイントとして bin/dispatcher を使用する。
手動での ActionRegistry 登録自動検出のために @Action アノテーションを優先する。

テクニカルリファレンス

詳細なガイドは references/ ディレクトリにあります:

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in docs/ja-JP/skills/tinystruct-patterns of affaan-m/ECC.

Open the folder on GitHubat commit ef648e0

Similar skills

  • Expert guidance for developing with the tinystruct Java framework.

    274k GitHub starsUsed in 1 repo~3k tokens
    Backend & APIsAuto-check passed

More from affaan-m/ECC

All 657 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    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.

    274k GitHub starsUsed in 5 repos~1.9k tokens
    Auto-check passed
  • Videodb

    affaan-m/ECC

    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…

    274k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Rules Distillation

    affaan-m/ECC

    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.

    274k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    274k GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • Measures whether agents actually follow a skill, rule or agent definition by generating scenarios at three strictness levels and scoring tool-call traces.

    274k GitHub starsUsed in 1 repo~623 tokens
    Auto-check passed
  • Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

    274k GitHub stars~3.5k tokensUpdated 2 days ago
    Auto-check passed

Questions about Tinystruct Patterns

What does Tinystruct Patterns do?

tinystructフレームワークでアプリケーションモジュールまたはマイクロサービスを開発する際に使用。ルーティング、コンテキスト管理、BuilderによるJSON処理、CLI/HTTPデュアルモードのパターンをカバー。. Tinystruct Patterns is an agent skill from affaan-m/ECC.

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 (docs/ja-JP/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 (docs/ja-JP/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 801 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tinystruct Patterns?

Skills that share tags, products or a category with Tinystruct Patterns: Tinystruct Patterns (affaan-m/ECC, 274k 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.