Themeのロゴ

Theme

コミュニティ
EmadBeltaje
theme

Explains and changes this app’s light/dark theme, default theme, colors, ThemeExtensions, and fonts. Use when the user mentions theme, dark mode, light mode, colors, ThemeExtension, fonts, Google Fonts, MyTheme, or MyStyles.

Add to TypingMind

概要

公開者EmadBeltaje
リポジトリflutter_getx_template
スキル名theme
スター
519
フォーク
138
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    EmadBeltajeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Theme」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/EmadBeltaje/flutter_getx_template/tree/master/.agent/skills/theme
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EmadBeltaje/flutter_getx_template.git /tmp/flutter_getx_template
mkdir -p .claude/skills
cp -r /tmp/flutter_getx_template/.agent/skills/theme .claude/skills/theme
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでThemeを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にThemeを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Themeは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Theme

Light and dark palettes live in color classes. MyTheme.getThemeData builds ThemeData. The current mode is stored in shared preferences (default light). Fonts follow the current language family.

How it works

GetMaterialApp wraps the tree with Theme(data: MyTheme.getThemeData(isLight: MySharedPref.getThemeIsLight())).

Toggle (persists, then GetX updates the mode):

dart
MyTheme.changeTheme();

Read current mode (true = light):

dart
bool themeIsLight = MySharedPref.getThemeIsLight();

changeTheme implementation:

dart
static changeTheme() {
  bool isLightTheme = MySharedPref.getThemeIsLight();
  MySharedPref.setThemeIsLight(!isLightTheme);
  Get.changeThemeMode(!isLightTheme ? ThemeMode.light : ThemeMode.dark);
}

Shared-pref default (this is the default theme):

dart
static bool getThemeIsLight() =>
    _sharedPreferences.getBool(_lightThemeKey) ?? true; // true = light, false = dark

Palette files hold colors. MyStyles maps those colors onto AppBarTheme, TextTheme, buttons, chips, list tiles, and custom ThemeExtensions. MyFonts holds sizes (already .sp) and the active fontFamily.

Read colors from Theme.of(context) in widgets (primaryColor, colorScheme, textTheme, extension<...>()). Edit palettes, not widget files, when the user wants a new brand color.

Change theme (runtime)

Add a control that calls MyTheme.changeTheme(). No other files.

Change default theme

In the shared-pref theme getter, set the fallback:

  • light default: ?? true
  • dark default: ?? false

Done when that fallback matches what the user asked.

Colors

Edit both palettes so light and dark stay in sync. Typical slots: primaryColor, accentColor, scaffoldBackgroundColor, appBarColor / appbarColor, bodyTextColor, buttonColor, and any extension colors at the bottom of each palette class.

MyTheme.getThemeData already wires primaryColor, colorScheme, scaffoldBackgroundColor, cardColor, appBarTheme, textTheme, extensions, etc. After palette edits, existing widgets that read Theme.of(context) pick up the new colors.

Add a ThemeExtension

Use this when the user needs widget-specific colors/styles that do not belong on global ThemeData.

1. Extension class at lib/config/theme/theme_extensions/{snake}_theme_data.dart:

dart
import 'package:flutter/material.dart';

class {pascal}ThemeData extends ThemeExtension<{pascal}ThemeData> {
  final Color? backgroundColor;
  final TextStyle? titleTextStyle;

  const {pascal}ThemeData({
    this.backgroundColor,
    this.titleTextStyle,
  });

  @override
  ThemeExtension<{pascal}ThemeData> copyWith({
    Color? backgroundColor,
    TextStyle? titleTextStyle,
  }) {
    return {pascal}ThemeData(
      backgroundColor: backgroundColor ?? this.backgroundColor,
      titleTextStyle: titleTextStyle ?? this.titleTextStyle,
    );
  }

  @override
  {pascal}ThemeData lerp(ThemeExtension<{pascal}ThemeData>? other, double t) {
    if (other is! {pascal}ThemeData) return this;
    return {pascal}ThemeData(
      backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t),
      titleTextStyle: TextStyle.lerp(titleTextStyle, other.titleTextStyle, t),
    );
  }
}

Add or remove fields to match the request. Keep copyWith and lerp in sync with those fields.

2. Colors on both palettes:

dart
static const Color {name}BackgroundColor = Color(0xFF......);

3. Factory on MyStyles:

dart
static {pascal}ThemeData get{pascal}Theme({required bool isLightTheme}) {
  return {pascal}ThemeData(
    backgroundColor: isLightTheme
        ? LightThemeColors.{name}BackgroundColor
        : DarkThemeColors.{name}BackgroundColor,
    titleTextStyle: MyFonts.bodyTextStyle.copyWith(
      fontSize: MyFonts.bodyMediumSize,
      color: isLightTheme
          ? LightThemeColors.bodyTextColor
          : DarkThemeColors.bodyTextColor,
    ),
  );
}

4. Register in MyTheme.getThemeData extensions: list:

dart
extensions: [
  MyStyles.getHeaderContainerTheme(isLightTheme: isLight),
  MyStyles.getEmployeeListItemTheme(isLightTheme: isLight),
  MyStyles.get{pascal}Theme(isLightTheme: isLight),
]

5. Consume:

dart
final ext = Theme.of(context).extension<{pascal}ThemeData>();
Container(color: ext?.backgroundColor);

Done when the class exists, both palettes have the colors, MyStyles builds it, and MyTheme.extensions includes it.

Fonts

Font family is per language:

dart
static Map<String, TextStyle> supportedLanguagesFontsFamilies = {
  'en': const TextStyle(fontFamily: 'Poppins'),
  'ar': const TextStyle(fontFamily: 'Cairo'),
};

MyFonts.getAppFontType reads that map from the current locale, and text themes copy it.

Change fonts

  1. Ask which language(s) and which family (and weights if given). Default weights to register: Regular, Medium, SemiBold.
  2. Look in assets/fonts/ and under flutter: fonts: in pubspec.yaml for that family.
  3. Files already there → skip download. Register the family in pubspec.yaml if missing, then set fontFamily in supportedLanguagesFontsFamilies for those language codes.
  4. Files missing → ask: download from Google Fonts, or will the user add the files? Do not download until they confirm.
  5. User declines download → stop the font change. Tell them to put .ttf / .otf files in assets/fonts/ first, then ask again.
  6. User confirms download → fetch the family from Google Fonts (GitHub google/fonts or https://fonts.google.com/download?family={Family+Name}), unzip, copy the requested weights into assets/fonts/ using names like {Family}-Regular.ttf. Then register and switch the family map.

pubspec.yaml font block (same shape as existing families):

yaml
  fonts:
    - family: Poppins
      fonts:
        - asset: assets/fonts/Poppins-Regular.ttf
          weight: 300
        - asset: assets/fonts/Poppins-Medium.ttf
          weight: 500
        - asset: assets/fonts/Poppins-SemiBold.ttf
          weight: 700
    - family: {Family}
      fonts:
        - asset: assets/fonts/{Family}-Regular.ttf
          weight: 400
        - asset: assets/fonts/{Family}-Medium.ttf
          weight: 500
        - asset: assets/fonts/{Family}-SemiBold.ttf
          weight: 700

Keep assets/fonts/ listed under flutter: assets:.

Font sizes stay on MyFonts with .sp (example: 18.sp). Change those numbers when the user asks for type scale, not by hardcoding fontSize: 18 in widgets.

Done when the files are on disk, pubspec.yaml lists the family, and supportedLanguagesFontsFamilies uses that family name.

よくある質問

AIスキル「Theme」では何ができますか?

Explains and changes this app’s light/dark theme, default theme, colors, ThemeExtensions, and fonts. Use when the user mentions theme, dark mode, light mode, colors, ThemeExtension, fonts, Google Fonts, MyTheme, or MyStyles.

TypingMindでThemeを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Themeはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにThemeをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/EmadBeltaje/flutter_getx_template/tree/master/.agent/skills/themeを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Themeを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Themeで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもThemeを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Theme」は無料ですか?

はい。EmadBeltajeがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇