Logo Mapper Creator

Mapper Creator

Tổ chức
Amplicode
mapper-creator

Creates a mapper between an entity and a DTO (MapStruct or custom converter). Use this skill when a mapper/converter between entity and DTO needs to be created, either standalone or as part of a larger task (e.g. after DTO creation, during CRUD setup).

Tổng quan

Nhà phát hànhAmplicode
Kho mãspring-skills
Tên kỹ năngmapper-creator
Sao
134
Bản fork
15
Tệp đi kèm
42
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 42 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Amplicode công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Mapper Creator trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Amplicode/spring-skills/tree/main/skills/mapper-creator
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Amplicode/spring-skills.git /tmp/spring-skills
mkdir -p .claude/skills
cp -r /tmp/spring-skills/skills/mapper-creator .claude/skills/mapper-creator
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Mapper Creator trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Mapper Creator ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Mapper Creator với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Preflight: Spring MCP

This skill is part of the Spring Agent Toolkit and is designed to work with the Spring MCP server (provided by the Amplicode IntelliJ plugin). Before doing anything else, check your tool list for any Spring MCP tool — they are exposed under the amplicode MCP server (e.g. get_project_summary, list_module_dependencies, get_entity_details); harnesses that flatten MCP tools into the tool list use the mcp__amplicode__ prefix on the same names.

  • If at least one Amplicode tool is available — MCP is connected. Proceed with the skill below.
  • If none are available — stop and invoke the amplicode-install skill (bundled with the Spring Agent Toolkit). It installs the Amplicode plugin and walks the user through the «Настроить Spring Agent» welcome-screen button + MCP-client restart. After it completes, the MCP tools become available — resume this skill.
  • If amplicode-install is not registered in your skill list, tell the user (in their language): "This skill needs the Amplicode IntelliJ plugin and its MCP server. Install it from https://amplicode.ru/marketplace into IntelliJ IDEA Ultimate/Community or GigaIDE, open any project, click «Настроить Spring Agent» on the Amplicode welcome screen, then restart your MCP client."

Mapper Creator

Creates a mapper (MapStruct interface/abstract class or custom converter) for converting between an entity and a DTO.


CRITICAL: Code ONLY from examples/ files. If no matching example -- STOP and ask user. CRITICAL: For questions with a fixed set of choices, prefer AskUserQuestion > its analogue > plain text list. Plain numbered text lists are the last resort when no interactive tool is available. CRITICAL: Read the conversation context BEFORE running Step 1. Half the questions in Steps 2–3 may already be answered by the user's prompt and prior turns. Re-asking what was already said is the #1 reason this skill feels slow.


Defaults

OptionDefaultAlways ask?Notes
entity—YESwhich entity to map
dtoClass—YESwhich DTO to map to
mapperTypeMapStructYESmain choice: MapStruct or Custom
className{EntityName}MapperNOsuggest, confirm
packageNamepackage next to DTONOauto-determined
parentInterfacenullNOextend a common mapper interface
languagefrom get_project_summaryNOauto-determined
componentModelSPRING (if Spring is in dependencies), otherwise DEFAULTNOCDI is not auto-detected — user must specify explicitly
partialUpdatenoNOadd partialUpdate method
partialUpdateNullStrategySET_TO_NULLNOif partialUpdate = yes: SET_TO_NULL / IGNORE / SET_TO_DEFAULT
updateWithNullnoNOadd updateWithNull method
dtoIsRecordfalseNOwhether to use Java record for DTO (Java only; affects accessors in custom toEntity)

Smart defaults: If the user says "use defaults", "all defaults", "default settings" -- skip all questions where "Always ask?" = NO. Ask only the required ones.

Smart answer recognition: When the user directly provides a value instead of choosing from a list -- accept it. Examples:

  • Question "Which entity?" -> user answers "Order" -> that IS the entity
  • Question "Mapper type?" -> user answers "mapstruct" -> that IS the choice
  • If the user gave multiple answers in one message -> accept all, skip the answered questions
  • NEVER re-ask what the user has already answered (even indirectly)

Batch questions: Group related questions into a single AskUserQuestion call (up to 4 questions):

  • The main question (mapper type) is always asked SEPARATELY
  • Do not group questions from DIFFERENT decision branches
  • Prefer AskUserQuestion; fall back to plain text only if the tool is unavailable

Step 0 -- Conversation context first (REQUIRED, no tool calls)

Before any MCP call, before any question, re-read the user's prompt and the prior turns of this conversation and extract whatever is already stated. This step costs nothing and prevents the most common failure mode of this skill — asking the user something they already said.

Build a mental checklist of inputs and tick off everything the user has already provided, explicitly or implicitly:

InputLook for in the prompt / context
entitya class name (Order, Vet, ScheduleTemplate); "for X"; "from X to Y"; an open file in the IDE; a recently discussed entity
DTOa class name ending in Dto / Response / Request; "to OrderDto"; "from X to Y"; a DTO that was just generated by dto-creator in this same conversation
mapperType"MapStruct", "mapstruct", "@Mapper", "custom", "manually", "static methods", "extension function" → MapStruct vs Custom
className"name it OrderConverter", "class FooMapper"
package"in package …", "next to DTO", "next to controller"
methods"only toDto", "with update", "partial update", "updateWithNull"
smart defaults"use defaults", "all defaults", "default settings", "as usual"
prior project factslanguage, JDK, dependencies — already known if discussed earlier in this conversation; do not re-fetch
delegated invocationif dto-creator just delegated to this skill, the entity, DTO, package, and language are ALL known — never re-ask

For every input that is explicitly or strongly implicitly answered: mark it as decided and skip the corresponding question in Steps 2–3. Do NOT ask "which entity?" if the user wrote "create a mapper for Order to OrderDto" — both entity and DTO are answered. Do NOT ask "MapStruct or Custom?" if the user wrote "create a MapStruct mapper".

For every input that is not answered: defer to the Decision-making principle below — try to derive it from project context first (Step 1), and only then ask.

Step 0 is mental, not a tool call. Do not announce it to the user. Do not write "Step 0 done". Just internalize what the user already said before proceeding to Step 1.


Decision-making principle — context first, then ask

Before asking the user any question, attempt to derive the answer from the context already gathered: project summary, module dependencies, entity details, existing files in the package, prior turns of this conversation, and the user's original prompt. Only ask when the context yields no clear default or when the choice is genuinely user-specific (e.g. which entity, which DTO).

Hierarchy of decisions:

  1. Context is unambiguous → decide silently, do NOT ask. Examples: language and module from get_project_summary; MapStruct presence from list_module_dependencies; mapper package from the DTO's package; className from {Entity}Mapper; componentModel from Spring presence; mapperType when the user said "MapStruct" or "Custom" outright.

  2. Context gives a strong signal → state the decision + alternatives in one line, let the user override or stay silent. Format:

    Will create `OrderMapper` (MapStruct, componentModel=spring, in the same package as `OrderDto`).
    Alternatives: Custom mapper. OK?

    The user can answer "ok" / "yes" / silence → accept; or name an alternative → switch.

  3. Context yields no clear default → ask with AskUserQuestion (preferred) or its analogue, with the recommended option first and (Recommended) appended. Fall back to plain text if no interactive tool is available.

  4. Context is fully empty for a critical input → ask plainly. This applies to: which entity, which DTO (when neither was mentioned), the user's intent itself.

How to ask — prefer AskUserQuestion

When a question must be asked, prefer the AskUserQuestion tool (or its analogue) over writing a numbered list in the response body. Fall back to plain text only if no interactive choice tool is available.

Rules for AskUserQuestion calls in this skill:

  • Each call may contain up to 4 questions that are independent of each other (the tool will render them together). Use this to batch related decisions in one round-trip.
  • Each question has 2–4 options. The tool auto-adds an "Other" choice for free-form input — never include it manually.
  • Mark the recommended option by putting it first with (Recommended) appended to the label.
  • header is a 12-char chip label (e.g. "Mapper", "Methods", "Package").
  • Each option has a description explaining what the choice means.

When AskUserQuestion is not the right tool:

  • Free-form input where there is no enumerable set of options (e.g. arbitrary class name) — ask in plain text.
  • The "single confirmation line" form from principle 2 — that is a plain yes/no, not an enumerated choice.

The screen-driven question lists in Steps 2–3 below are a fallback for case 4. They are NOT a script to execute top-to-bottom. If a question's answer is already determined by principles 1–3, skip the question.


Step 1 -- Gather minimal project context (automatic, no questions)

Call only the MCP tools whose result is actually consumed by a later step. Do not pre-fetch "in case we need it" — every variable here must have a concrete downstream user.

ToolWhat to extractVariableUsed for
get_project_summarylanguage, moduleName, buildFilelanguage, moduleName, buildFilelanguage → Step 4 reference selection (Java vs Kotlin); moduleName → multi-module disambiguation; buildFile → Step 5 dependency injection
list_module_dependencies(moduleName)artifact IDspresentDepsStep 5 (is MapStruct already present? do we need to add it?) and componentModel decision below

That is the entire Step 1. Do NOT fetch:

  • Spring Boot version — no branching depends on it
  • application.properties path — Step 5 writes nothing to properties
  • mainPackage — Step 4 derives the mapper package from the DTO's package, not from the project root
  • get_entity_details / list_class_members — these depend on knowing the entity and DTO, which happens in Step 2. Defer them to Step 2.
  • list_entity_mappers — needed only at Step 13 of the MapStruct reference (uses = {...} resolution) and only per association entity, which is unknown until entityDetails is fetched. Defer to Step 13, do NOT pre-fetch in Step 1.

If multi-module project (multiple modules in get_project_summary): Ask which module to use. Then re-call list_module_dependencies for that module.

componentModel — simplified

Determine componentModel from presentDeps:

  • Spring (any spring-boot-starter* or spring-context) → SPRING
  • Otherwise → DEFAULT

CDI is intentionally not auto-detected. If the user has a CDI project and wants componentModel = "cdi", they will say so explicitly; the skill should not branch on it by default.


Step 2 -- Entity and DTO

By Step 0 you should already know entity and DTO if the user mentioned them. Most common cases:

  • User wrote "create a mapper for Order to OrderDto" → both known, skip the questions, go straight to the parallel fetch below.
  • dto-creator just delegated → entity and DTO are passed in by the delegating skill. Never ask, never re-derive.
  • User wrote "create a mapper for Order" → entity is Order. The DTO is the most recently created/discussed DTO for that entity in this conversation, OR — if there are multiple candidates — call list_entity_dtos(orderFqn) and pick the unique one. Only ask if there are multiple and no other signal.

Ask only when context is genuinely empty. When asking, prefer plain text (entity/DTO names are free-form input — AskUserQuestion is the wrong tool here):

Which entity should I create a mapper for? And which DTO to map to?

After both entity FQN and DTO FQN are known, call (in parallel):

ToolVariableUsed for
get_entity_details(entityFqn)entityDetailsStep 4 — building @Mapping annotations, detecting non-owner associations with mappedBy for @AfterMapping
list_class_members(dtoFqn)dtoFieldsStep 4 — comparing DTO fields against entity fields to decide which @Mapping(source, target) lines are needed

Both calls are deferred to Step 2 because they require Step 2's inputs. They are NOT part of Step 1.


Step 3 -- Mapper type and variant settings

Mapper type — context first

Apply the Decision-making principle. Decide silently when context is clear:

Context signalDecision
User said "MapStruct" / "@Mapper"MapStruct, no question
User said "Custom" / "manually" / "static methods" / "extension function"Custom, no question
MapStruct already in presentDeps AND user gave no signalMapStruct (silent or one-line confirmation per principle 2)
MapStruct NOT in presentDeps AND project is small/simpleMapStruct is still a fine default — Step 5 will add the dependency. State this in the one-line confirmation: "Will create a MapStruct mapper. Will add dependencies to the build file. Alternative: Custom with no dependencies. OK?"
User says "use defaults"MapStruct

Only fall back to AskUserQuestion when none of the rows above matches. Use it with these options:

QuestionHeaderOptions (first = recommended)
What mapper type for {Entity} ↔ {Dto}?MapperMapStruct (Recommended): interface with @Mapper/@Mapping / Custom: plain class with static methods

Variant settings — defaults are usually correct

For both MapStruct and Custom variants the defaults are almost always correct:

  • className = {EntityName}Mapper
  • packageName = same package as the DTO
  • partialUpdate = no
  • updateWithNull = no

Do NOT batch-ask these settings unless the user explicitly requested configuration ("configure methods", "I want partial update") or said something that contradicts a default.

When the user did ask for configuration, use a single AskUserQuestion call (multiSelect: true) with the relevant subset:

QuestionHeaderOptions (first = recommended)
Which methods to add to the mapper?MethodstoDto + fromDto (Recommended): basic bidirectional conversion / + partialUpdate: update entity from DTO / + updateWithNull: partialUpdate with null overwrite

Class name and package are free-form — ask in plain text only when the user said "I want a different name" or "in a different package".


Step 4 -- Generate code

Determine the reference file based on mapper type and language:

  • MapStruct + Java -> read references/mapstruct-java.md
  • MapStruct + Kotlin -> read references/mapstruct-kotlin.md
  • Custom + Java -> read references/custom-java.md
  • Custom + Kotlin -> read references/custom-kotlin.md

Read the corresponding reference file and follow its Generation order exactly.

Building @Mapping annotations

Read references/mapping-annotations.md for rules on how to build @Mapping annotations.

Compare entity fields from entityDetails with DTO fields from dtoFields:

  1. Match DTO fields to entity fields by name
  2. For fields with different names, add @Mapping(source, target)
  3. For association ID fields (e.g. customerId -> customer.id), add appropriate mapping
  4. For flat fields (e.g. customerName -> customer.name), add expression or source.target mapping

Reading skeleton and fragments

  1. Read the skeleton file from examples/_skeletons/{variant}-{language}.md
  2. Apply variable substitutions
  3. Write the file
  4. For each fragment in the generation order:
    • Check if the fragment's condition is met
    • Read the fragment from examples/_fragments/{fragment-name}/{language}.md
    • Apply variable substitutions
    • Insert/edit into the created file

Variable substitution rules

  • {packageName} -> from Step 1 context or user answer
  • {className} -> from user answer or default {EntityName}Mapper
  • {entityClassFqn} -> entity FQN from context
  • {dtoClassFqn} -> DTO FQN from context
  • {entityParamName} -> decapitalized entity short name
  • {dtoParamName} -> decapitalized DTO short name
  • {methodName} -> from naming conventions (see references/method-naming.md)
  • NEVER substitute anything not listed in Variables section of the example file
  • NEVER add imports, methods, or code not in the example
  • FQN handling (CRITICAL): examples contain FQNs (e.g. org.mapstruct.Mapper, org.mapstruct.Mapping, org.mapstruct.ReportingPolicy, org.mapstruct.MappingConstants.ComponentModel.SPRING, entity/DTO FQNs). When writing the final file, you MUST:
    1. Replace every FQN in the body with its short name (e.g. @org.mapstruct.Mapper(...) -> @Mapper(...), org.mapstruct.ReportingPolicy.IGNORE -> ReportingPolicy.IGNORE, {entityClassFqn} -> entity short name, {dtoClassFqn} -> DTO short name).
    2. Collect every FQN you shortened and emit a corresponding import line right after the package statement, sorted, no duplicates.
    3. Classes from the same package as the mapper (entity, DTO if collocated) must NOT be imported — just use the short name.
    4. Types from java.lang must NOT be imported.
    5. Kotlin: same rules — shorten in the body and add import lines at the top. Kotlin does not need imports for classes in the same package.
    6. The IDE will NOT optimize imports for you — the file is saved as-is.

Step 5 -- Add MapStruct dependencies (automatic, MapStruct variant only)

For Custom mapper: skip this step entirely. Custom mappers have no external dependencies.

For MapStruct: check presentDeps and add missing artifacts to the project's build file.

Required artifacts

Artifact IDGroup IDScope
mapstructorg.mapstructimplementation
mapstruct-processororg.mapstructannotationProcessor (Java) / kapt or ksp (Kotlin)

If neither artifact is missing from presentDeps, skip the rest of this step — nothing to add.

How to edit the build file

Use the buildFile path captured in Step 1 — that is the exact file the skill must edit. Do NOT guess; do NOT search the project for build files.

Pick the editing strategy by file extension:

  • build.gradle.kts — add implementation("org.mapstruct:mapstruct:{version}") inside the existing dependencies { … } block. For the processor:
    • Java project → annotationProcessor("org.mapstruct:mapstruct-processor:{version}")
    • Kotlin project → kapt("org.mapstruct:mapstruct-processor:{version}") (apply kotlin("kapt") plugin if not present) or ksp(...) if KSP is already configured
  • build.gradle (Groovy) — same as above, with single-quoted Groovy syntax
  • pom.xml — add a <dependency> entry inside <dependencies> with <scope> matching the role (compile for mapstruct, processor configured via maven-compiler-plugin <annotationProcessorPaths>)

For the version: do NOT hardcode. Read the latest stable MapStruct version from the project's existing version catalogue (e.g. gradle/libs.versions.toml) if present; otherwise use the version that matches the Spring Boot BOM / project parent if Maven; otherwise emit a property/variable placeholder and ask the user to confirm.

Use the Edit tool with {buildFile} as file_path. Make the edit minimally — insert the new lines into the existing dependencies block, do not rewrite the file.

No properties needed

Mapper creation does not write any application.properties entries.

Report: "Created mapper {className} in package {packageName}. Type: {mapperType}. Methods: {list of methods}."


Anti-hallucination checklist

Before writing ANY code, verify:

  • The code comes from an examples/ file (cite which one)
  • Only declared variables were substituted
  • No framework API calls were added "from knowledge"
  • Import list matches the example exactly
  • Method signatures match the example exactly
  • No comments or convenience methods were added
  • FQNs from examples are shortened in the body AND corresponding import lines were added after package (IDE will NOT do this for you)
  • @Mapping annotations match entity-DTO field comparison, not guessed
  • Kotlin: multiple @Mapping wrapped in @Mappings(value = [...])
  • @AfterMapping only added when entity has non-owner associations with mappedBy + sub-DTO
  • toDto uses individual @Mapping(source, target) pairs by default — @InheritInverseConfiguration only when the user explicitly asked for it
  • Flat collection helper is generated only in toDto direction; toEntity does NOT try to load entities by id (no repository injection)
  • Flat collection helper name follows {assocFieldName}To{capitalize(flatDtoFieldName)} (e.g. petsToPetIds, not petsToId)

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Mapper Creator làm được gì?

Creates a mapper between an entity and a DTO (MapStruct or custom converter). Use this skill when a mapper/converter between entity and DTO needs to be created, either standalone or as part of a larger task (e.g. after DTO creation, during CRUD setup).

Vì sao nên dùng Mapper Creator trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Mapper Creator là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Mapper Creator trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Amplicode/spring-skills/tree/main/skills/mapper-creator. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Mapper Creator?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Mapper Creator với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Mapper Creator với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Mapper Creator có miễn phí không?

Kỹ năng này được Amplicode phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇