Source profileQuality 71/100

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

tinystruct-patterns

Review tinystruct-patterns's use cases, installation, workflow, and original source instructions.

Source repository stars
234,327
Declared platforms
0
Static risk flags
0
Last source update
2026-07-27
Source checked
2026-07-28

Decision brief

What it does—and where it fits

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

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/affaan-m/ECC --skill "docs/ja-JP/skills/tinystruct-patterns"
    Safe inspection promptEditorial

    Inspect the Agent Skill "tinystruct-patterns" from https://github.com/affaan-m/ECC/blob/4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38/docs/ja-JP/skills/tinystruct-patterns/SKILL.md at commit 4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      使用するタイミング

      AbstractApplication を拡張して新しい Application モジュールを作成するとき。

      AbstractApplication を拡張して新しい Application モジュールを作成するとき。@Action を使用してルートとコマンドラインアクションを定義するとき。Context を通じてリクエストごとの状態を処理するとき。
    2. 02

      動作の仕組み

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

      tinystruct フレームワークは、@Action でアノテーションされたメソッドをターミナルとWeb環境の両方でルーティング可能なエンドポイントとして扱います。アプリケーションは AbstractApplication を拡張することで作成され、init() などのコアライフサイクルフックとリクエスト Context へのアクセスが提供されます。ルーティングは ActionRegistry によって処理され、パスセグメントをメソッド引数に自動的にマッピングして依存関係を注入します。データのみのサービスでは、ゼロ依存のフットプリントを維持するために、JSONシリアライゼーションにネイティブの Builder コンポーネントを使用すべきです。フレームワークには ApplicationManager のユーティリティも含まれており、bin/dispatcher スクリプトを生成する…
    3. 03

      Review the “例” section in the pinned source before continuing.

      Review and apply the “例” source section.
    4. 04

      基本アプリケーション(MyService)

      Review the “基本アプリケーション(MyService)” section in the pinned source before continuing.

      Review and apply the “基本アプリケーション(MyService)” source section.

    Permission review

    Static risk signals and limitations

    No configured static risk pattern was detected

    This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score71/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars234,327SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    affaan-m/ECC
    Skill path
    docs/ja-JP/skills/tinystruct-patterns/SKILL.md
    Commit
    4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38
    License
    MIT
    Collected
    2026-07-28
    Default branch
    main
    View the original SKILL.md

    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)

    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)

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

    @Action(value = "login", mode = Mode.HTTP_POST)
    public boolean doLogin() {
        // ログイン処理
        return true;
    }
    

    ネイティブJSONデータ処理(getData)

    @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/ ディレクトリにあります:

    Alternatives

    Compare before choosing