Springboot Dict Module Skillのロゴ

Springboot Dict Module Skill

コミュニティ
jiushiwon
springboot-dict-module-skill

Spring Boot 字典/配置模块技能。面向已有 Spring Boot 项目,提供字典类型、字典项、系统配置、参数管理等能力的快速集成。触发词:"字典模块"、"配置模块"、"系统参数"、"字典管理"、"系统配置"、"dict module"、"config module"。

概要

公開者jiushiwon
リポジトリwg-skills
スキル名springboot-dict-module-skill
スター
123
フォーク
38
同梱ファイル
1
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jiushiwon/wg-skills.git /tmp/wg-skills
mkdir -p .claude/skills
cp -r /tmp/wg-skills/vibeCoding/backend/java/springboot-module/springboot-dict-module-skill .claude/skills/springboot-dict-module-skill
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

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

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

スキルの指示

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

Spring Boot Dict Module Skill

面向已有 Spring Boot 项目的开发者,快速集成字典和配置管理能力。

能力清单

能力说明
字典类型字典分类管理
字典项字典数据 CRUD
系统配置系统参数配置
缓存字典数据缓存
接口RESTful API

触发场景

用户说"帮我加字典模块"或"加配置管理"时触发。

数据模型

字典类型实体

java
@Data
@Entity
@Table(name = "wg_dict_type")
public class DictType {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
    @Column(nullable = false, length = 100)
    private String name;
    
    @Column(nullable = false, unique = true, length = 50)
    private String code;
    
    @Column(length = 500)
    private String description;
    
    @Column(nullable = false)
    private Integer status = 1;
    
    @Column(name = "created_at", nullable = false, updatable = false)
    private LocalDateTime createdAt;
    
    @Column(name = "updated_at")
    private LocalDateTime updatedAt;
    
    @Column(name = "deleted_at")
    private LocalDateTime deletedAt;
}

字典项实体

java
@Data
@Entity
@Table(name = "wg_dict_item")
public class DictItem {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
    @Column(name = "dict_type_id", nullable = false)
    private Long dictTypeId;
    
    @Column(nullable = false, length = 100)
    private String label;
    
    @Column(nullable = false, length = 100)
    private String value;
    
    @Column(nullable = false)
    private Integer sort = 0;
    
    @Column(nullable = false)
    private Integer status = 1;
    
    @Column(name = "created_at", nullable = false, updatable = false)
    private LocalDateTime createdAt;
    
    @Column(name = "updated_at")
    private LocalDateTime updatedAt;
    
    @Column(name = "deleted_at")
    private LocalDateTime deletedAt;
}

系统配置实体

java
@Data
@Entity
@Table(name = "wg_sys_config")
public class SysConfig {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
    @Column(name = "config_key", nullable = false, unique = true, length = 100)
    private String configKey;
    
    @Column(name = "config_value", length = 500)
    private String configValue;
    
    @Column(name = "config_type", length = 20)
    private String configType = "string";
    
    @Column(length = 500)
    private String description;
    
    @Column(nullable = false)
    private Integer status = 1;
    
    @Column(name = "created_at", nullable = false, updatable = false)
    private LocalDateTime createdAt;
    
    @Column(name = "updated_at")
    private LocalDateTime updatedAt;
}

Service 层

java
@Service
@RequiredArgsConstructor
public class DictService {
    
    private final DictTypeRepository dictTypeRepository;
    private final DictItemRepository dictItemRepository;
    private final RedisTemplate<String, Object> redisTemplate;
    
    private static final String DICT_CACHE_KEY = "dict:";
    
    /**
     * 获取字典项(带缓存)
     */
    public List<DictItem> getDictItems(String typeCode) {
        String cacheKey = DICT_CACHE_KEY + typeCode;
        
        // 先从缓存获取
        List<DictItem> cached = (List<DictItem>) redisTemplate.opsForValue().get(cacheKey);
        if (cached != null) {
            return cached;
        }
        
        // 从数据库获取
        DictType dictType = dictTypeRepository.findByCode(typeCode);
        if (dictType == null) {
            return Collections.emptyList();
        }
        
        List<DictItem> items = dictItemRepository.findByDictTypeIdAndStatusOrderBySort(dictType.getId(), 1);
        
        // 存入缓存
        redisTemplate.opsForValue().set(cacheKey, items, 30, TimeUnit.MINUTES);
        
        return items;
    }
    
    /**
     * 刷新字典缓存
     */
    public void refreshDictCache(String typeCode) {
        String cacheKey = DICT_CACHE_KEY + typeCode;
        redisTemplate.delete(cacheKey);
    }
}

Controller 层

字典类型 Controller

java
@RestController
@RequestMapping("/api/dict/type")
@RequiredArgsConstructor
public class DictTypeController {
    
    private final DictService dictService;
    
    @GetMapping("/list")
    public Result<List<DictType>> list(DictTypeQuery query) {
        return Result.success(dictService.listDictTypes(query));
    }
    
    @GetMapping("/{id}")
    public Result<DictType> getById(@PathVariable Long id) {
        return Result.success(dictService.getDictTypeById(id));
    }
    
    @PostMapping
    @PreAuthorize("@per.hasPermission('dict:type:add')")
    public Result<Void> create(@RequestBody DictType dictType) {
        dictService.createDictType(dictType);
        return Result.success();
    }
    
    @PutMapping("/{id}")
    @PreAuthorize("@per.hasPermission('dict:type:edit')")
    public Result<Void> update(@PathVariable Long id, @RequestBody DictType dictType) {
        dictService.updateDictType(id, dictType);
        return Result.success();
    }
    
    @DeleteMapping("/{id}")
    @PreAuthorize("@per.hasPermission('dict:type:delete')")
    public Result<Void> delete(@PathVariable Long id) {
        dictService.deleteDictType(id);
        return Result.success();
    }
}

字典项 Controller

java
@RestController
@RequestMapping("/api/dict/item")
@RequiredArgsConstructor
public class DictItemController {
    
    private final DictService dictService;
    
    @GetMapping("/list")
    public Result<List<DictItem>> list(DictItemQuery query) {
        return Result.success(dictService.listDictItems(query));
    }
    
    /**
     * 根据字典编码获取字典项(下拉框数据源)
     */
    @GetMapping("/{typeCode}")
    public Result<List<DictItem>> getByTypeCode(@PathVariable String typeCode) {
        return Result.success(dictService.getDictItems(typeCode));
    }
    
    @PostMapping
    @PreAuthorize("@per.hasPermission('dict:item:add')")
    public Result<Void> create(@RequestBody DictItem dictItem) {
        dictService.createDictItem(dictItem);
        // 刷新缓存
        dictService.refreshDictCache(dictItem.getDictTypeCode());
        return Result.success();
    }
    
    @PutMapping("/{id}")
    @PreAuthorize("@per.hasPermission('dict:item:edit')")
    public Result<Void> update(@PathVariable Long id, @RequestBody DictItem dictItem) {
        dictService.updateDictItem(id, dictItem);
        dictService.refreshDictCache(dictItem.getDictTypeCode());
        return Result.success();
    }
    
    @DeleteMapping("/{id}")
    @PreAuthorize("@per.hasPermission('dict:item:delete')")
    public Result<Void> delete(@PathVariable Long id) {
        DictItem item = dictService.getDictItemById(id);
        dictService.deleteDictItem(id);
        dictService.refreshDictCache(item.getDictTypeCode());
        return Result.success();
    }
}

系统配置 Controller

java
@RestController
@RequestMapping("/api/config")
@RequiredArgsConstructor
public class SysConfigController {
    
    private final ConfigService configService;
    
    @GetMapping("/list")
    public Result<List<SysConfig>> list(SysConfigQuery query) {
        return Result.success(configService.listConfigs(query));
    }
    
    @GetMapping("/{key}")
    public Result<Object> getByKey(@PathVariable String key) {
        return Result.success(configService.getConfigValue(key));
    }
    
    @PutMapping("/{key}")
    @PreAuthorize("@per.hasPermission('config:edit')")
    public Result<Void> update(@PathVariable String key, @RequestBody SysConfig config) {
        configService.updateConfig(key, config.getConfigValue());
        return Result.success();
    }
}

接口契约

获取字典项

GET /api/dict/item/{typeCode}

Response:
{
  "code": 200,
  "message": "success",
  "data": [
    {"id": 1, "label": "男", "value": "1"},
    {"id": 2, "label": "女", "value": "2"}
  ]
}

获取配置

GET /api/config/site_name

Response:
{
  "code": 200,
  "message": "success",
  "data": "我的网站"
}

不做

  • 不负责前端页面(使用方自行实现)
  • 不处理敏感配置加密(业务层自行处理)
  • 不提供配置变更审计日志

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Springboot Dict Module Skill」では何ができますか?

Spring Boot 字典/配置模块技能。面向已有 Spring Boot 项目,提供字典类型、字典项、系统配置、参数管理等能力的快速集成。触发词:"字典模块"、"配置模块"、"系统参数"、"字典管理"、"系统配置"、"dict module"、"config module"。

TypingMindでSpringboot Dict Module Skillを使うメリットは何ですか?

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

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

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/jiushiwon/wg-skills/tree/main/vibeCoding/backend/java/springboot-module/springboot-dict-module-skillを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Springboot Dict Module Skillを使えるAIモデルはどれですか?

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

Springboot Dict Module Skillは何個のAIモデルで使えますか?

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

AIスキル「Springboot Dict Module Skill」は無料ですか?

はい。jiushiwonがGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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