Logo Gleam Practice

Gleam Practice

Cộng đồng
mizchi
gleam-practice

Dùng khi viết hoặc đánh giá mã Gleam trên nền tảng Erlang — đặc biệt là dịch vụ HTTP dùng Wisp + Mist, tiến trình dựa trên OTP (các thành phần tương tự gen_server / supervisor), quy trình justfile, kiểm thử bằng gleeunit, `gleam format`, CI trên GitHub Actions và đo hiệu năng. Kích hoạt khi có `gleam.toml`, tệp `.gleam` hoặc dấu hiệu liên quan đến Erlang/BEAM, kể cả khi người dùng không nhắc đích danh "Gleam".

Tổng quan

Nhà phát hànhmizchi
Kho mãskills
Tên kỹ nănggleam-practice
Sao
333
Bản fork
4
Tệp đi kèm
8
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ộ.

  • 8 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 mizchi 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 Gleam Practice 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/mizchi/skills/tree/main/gleam-practice
  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/mizchi/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/gleam-practice .claude/skills/gleam-practice
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 Gleam Practice 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 Gleam Practice 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 Gleam Practice 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.

Gleam Practice

Use this when creating a new Gleam project, improving an existing one, or implementing with a wisp + mist + gleam_otp + just stack.

Default Workflow

  • Start with gleam new and gleam add. Let the solver choose dependencies instead of hand-writing them.
  • Proceed TDD-style: explore -> Red -> Green -> Refactor.
  • Separate pure logic from state management. Split domain modules from actor/server modules.
  • Keep the public API small. Prefer pub opaque type and avoid casually exposing internal constructors or protocol types.
  • Treat @external as a last resort. When you do use it, contain it inside a thin adapter module.
  • Keep the web layer thin. wisp handlers should focus on decode, call service, encode response.
  • Centralize task execution in a justfile, and have CI invoke just ci too.

Project Setup

Use this as the starting point for new Erlang-target projects.

sh
gleam new my_app --template erlang
cd my_app
gleam add wisp mist gleam_otp gleam_erlang
gleam add gleam_json envoy
gleam add --dev gleeunit

Add the following as needed.

  • HTTP client: gleam add gleam_http gleam_httpc
  • file I/O: gleam add simplifile filepath
  • snapshot test: gleam add --dev birdie
  • property test: gleam add --dev qcheck qcheck_gleeunit_utils
  • interactive test loop: gleam remove gleeunit && gleam add --dev glacier
  • unused export check: gleam add --dev cleam
  • benchmark: gleam add --dev glychee
  • logging config: gleam add logging
  • live reload DX: gleam add --dev olive

External CLI:

  • HTTP load test: k6

Use compatible combinations of wisp and mist. Rather than pinning versions individually, it is safer to run gleam add wisp mist together and let the solver resolve them at the same time.

Templates:

  • assets/README.md
  • assets/justfile
  • assets/github-actions/ci.yml
  • assets/bench/http.js
  • assets/test/snapshot_test.gleam
  • assets/test/property_test.gleam
  • assets/test/qcheck_parallel_test.gleam
  • assets/test/timeout_test.gleam

gleam.toml Defaults

At minimum, fill these in.

toml
name = "my_app"
version = "0.1.0"
target = "erlang"
description = "Short package summary"
licences = ["Apache-2.0"]
repository = { type = "github", user = "owner", repo = "repo" }

# Hide modules that are only used inside the package
internal_modules = [
  "my_app/internal",
  "my_app/http/internal",
]

Principles:

  • Do not leave metadata empty.
  • Hide package-internal modules via internal_modules.
  • Broad semver ranges are acceptable, but always enforce a pinned lockfile in CI.

Recommended Layout

Start from this split.

text
src/
  my_app.gleam                # entrypoint
  my_app/app.gleam            # DI and supervision startup
  my_app/web.gleam            # router / request handling
  my_app/domain.gleam         # pure domain logic
  my_app/domain_server.gleam  # actor wrapper
  my_app/http_json.gleam      # encoder / decoder
test/
  my_app_test.gleam
docs/
  reference-ja.md
  reference-en.md
bench/
  main.gleam
justfile

Separation criteria:

  • domain.gleam: pure functions only
  • *_server.gleam: actor / supervision / timeout / mailbox
  • web.gleam: routing and HTTP mapping
  • http_json.gleam: JSON schema and codec
  • app.gleam: wiring only

Do not mix router, JSON codec, business logic, and actor state in one file.

As it grows, split along these lines.

  • web_*.gleam: handlers per feature
  • web_json_*.gleam: encoders / decoders per domain
  • agent_*.gleam: protocol, runner, tool, transport
  • workspace_*.gleam: overlay, patch, git, session, runtime
  • *_test_support.gleam: split test helpers by responsibility

Wisp + Mist Skeleton

src/my_app.gleam

gleam
import envoy
import gleam/erlang/process
import gleam/int
import gleam/result
import mist
import my_app/app
import my_app/web
import wisp/wisp_mist

const default_port = 4000
const default_secret_key_base =
  "local-dev-secret-key-base-local-dev-secret-key-base-1234567890"

pub fn main() -> Nil {
  let port =
    envoy.get("PORT")
    |> result.map(int.parse)
    |> result.flatten
    |> result.unwrap(default_port)

  let secret_key_base =
    envoy.get("SECRET_KEY_BASE")
    |> result.unwrap(default_secret_key_base)

  let assert Ok(app_state) = app.start()
  let assert Ok(_) =
    web.app(app_state)
    |> wisp_mist.handler(secret_key_base)
    |> mist.new
    |> mist.bind("0.0.0.0")
    |> mist.port(port)
    |> mist.start

  process.sleep_forever()
}

src/my_app/web.gleam

gleam
import gleam/http
import my_app/app.{type App}
import wisp

pub fn app(app: App) -> fn(wisp.Request) -> wisp.Response {
  fn(request) {
    case request.method, wisp.path_segments(request) {
      http.Get, ["healthz"] -> wisp.text_response(200, "ok\n")
      _, _ -> wisp.not_found()
    }
  }
}

Web-layer principles:

  • Read payloads with wisp.require_json.
  • Return 400 on decoder failure.
  • Map domain errors explicitly to 4xx/5xx.
  • Split handlers by feature once they grow.

OTP Pattern

The basic shape is two layers: pure state and server.

Important: gleam_otp is a statically-typed wrapper over Erlang's gen_server, and its API is not compatible with gen_server. Do not call :gen_server.call / :gen_server.cast directly. Keep everything inside the Subject and actor.Message world.

pure state

gleam
pub opaque type State {
  State(hits: Dict(String, Int), limit: Int)
}

pub fn new(limit: Int) -> State {
  State(hits: dict.new(), limit: limit)
}

pub fn incr(state: State, key: String) -> #(State, Bool) {
  let n = dict.get(state.hits, key) |> result.unwrap(0) + 1
  #(State(..state, hits: dict.insert(state.hits, key, n)), n <= state.limit)
}

actor wrapper (concrete example)

gleam
import gleam/erlang/process.{type Subject}
import gleam/otp/actor
import gleam/otp/supervision

pub opaque type Message {
  Check(key: String, reply_to: Subject(Bool))
  Reset(key: String)
}

pub opaque type Server { Server(subject: Subject(Message)) }

pub fn start(limit: Int) -> Result(Server, actor.StartError) {
  actor.new(new(limit))
  |> actor.on_message(handle)
  |> actor.start
  |> result.map(fn(started) { Server(subject: started.data) })
}

pub fn supervised(limit: Int) -> supervision.ChildSpecification(Server) {
  supervision.worker(fn() { start(limit) })
}

fn handle(state: State, msg: Message) -> actor.Next(State, Message) {
  case msg {
    Check(key, reply_to) -> {
      let #(next, ok) = incr(state, key)
      process.send(reply_to, ok)
      actor.continue(next)
    }
    Reset(key) ->
      actor.continue(State(..state, hits: dict.delete(state.hits, key)))
  }
}

// sync call pattern: the caller creates a reply subject and passes it in
pub fn check(s: Server, key: String) -> Bool {
  let reply = process.new_subject()
  process.send(s.subject, Check(key, reply))
  process.receive(reply, 1000) |> result.unwrap(False)
}

pub fn reset(s: Server, key: String) -> Nil {
  process.send(s.subject, Reset(key))
}

Three kinds of supervision trees

gleam_otp splits supervisors across three modules by use case.

KindModuleWhen to use
staticgleam/otp/static_supervisorChild processes are fixed at startup (DB pool, pre-configured actors). Handles restarts only.
factorygleam/otp/supervisor_factorySpawn the same spec dynamically with IDs (e.g. session-per-user). start_child(name, arg)
dynamicgleam/otp/supervisor_dynamicAdd/remove arbitrary specs dynamically (e.g. job worker pool). start_child(name, spec) / terminate_child

The exact API names vary by version. Check the official gleam_otp hex docs each time. The template below assumes v0.16+:

gleam
// src/my_app/app.gleam
import gleam/otp/static_supervisor as sup
import my_app/db_pool
import my_app/rate_limiter

pub fn start() -> Result(Nil, actor.StartError) {
  sup.new(sup.OneForOne)
  |> sup.restart_tolerance(intensity: 3, period: 60)  // allow up to 3 restarts in 60s
  |> sup.add(db_pool.supervised())                    // static child
  |> sup.add(rate_limiter.supervised(limit: 100))     // static child
  |> sup.start
  |> result.replace(Nil)
}

How to pick a restart strategy:

  • Permanent: always restart on exit (infrastructure like DB pools or auth servers).
  • Transient: normal exits are fine, restart only on abnormal exits (job workers).
  • Temporary: never restart (one-shot work).

When restart_intensity (default 3) over period (default 5 seconds) is exceeded, the supervisor itself crashes and propagates upward.

Guidelines

  • Keep Server opaque (do not let callers manipulate the Subject directly).
  • Do not touch state directly from HTTP (always go through the actor).
  • Collect the supervision tree inside app.gleam.
  • Start with OneForOne as the restart strategy, and use static_supervisor at the top level.
  • Use named actors to make testing easier.
  • Use the right supervisor kind for the job: static (fixed), factory (same spec, dynamic), dynamic (arbitrary spec, dynamic).

JSON Codec (gleam/dynamic/decode + gleam/json)

Gleam's JSON API tends to shift between versions (gleam_json v2+). Current idiomatic usage:

Decode

gleam
import gleam/dynamic/decode
import gleam/json

pub type NewTodo { NewTodo(title: String, priority: Int) }

pub fn new_todo_decoder() -> decode.Decoder(NewTodo) {
  use title <- decode.field("title", decode.string)
  use priority <- decode.optional_field("priority", 0, decode.int)
  decode.success(NewTodo(title:, priority:))
}

// Inside a Wisp handler
case decode.run(body, new_todo_decoder()) {
  Ok(nt) -> // ... use nt
  Error(errors) -> wisp.bad_request("invalid json: " <> string.inspect(errors))
}

decode.field is required; decode.optional_field(key, default, decoder) is optional. For nested objects use decode.field("user", user_decoder()).

Encode

gleam
pub fn encode_todo(t: Todo) -> json.Json {
  json.object([
    #("id", json.int(t.id)),
    #("title", json.string(t.title)),
    #("done", json.bool(t.done)),
  ])
}

// Return it from Wisp
wisp.json_response(json.to_string_tree(encode_todo(t)), 201)

Lists: json.array(items, of: encode_todo).

LSP Code Action: gleam-language-server v1.2+ ships a "Generate JSON encoder/decoder" feature. Place the cursor on the Todo type and invoke the Code Action to auto-generate encode_todo / todo_decoder. More accurate than writing them by hand.

justfile Template

For reuse, first copy assets/justfile into the project root, then tweak.

just
set shell := ["bash", "-cu"]

default:
  @just --list

deps:
  gleam deps download

format:
  gleam format

format-check:
  gleam format --check .

typecheck:
  gleam check

build:
  gleam build --warnings-as-errors

test:
  gleam test

run:
  gleam run

docs:
  gleam docs build

check:
  gleam format --check .
  gleam check
  gleam build --warnings-as-errors
  gleam test

ci: deps check

clean:
  gleam clean

bench *args:
  gleam run -m bench/main -- {{args}}

Policies:

  • Shell is bash.
  • The CI entrypoint is just ci.
  • Do not create a dedicated lint command; cover it with format-check + build --warnings-as-errors.

Add these if needed.

  • exports: gleam run -m cleam
  • snapshot-review: gleam run -m birdie
  • test-watch: gleam test -- --glacier
  • bench-http: k6 run bench/http.js
  • serve-dev: gleam run -m olive

CI Workflow Template

If you use GitHub Actions, first copy assets/github-actions/ci.yml to .github/workflows/ci.yml and only add project-specific steps on top.

Principles:

  • Make just ci the single entrypoint for both CI and local.
  • Pin Erlang / Gleam versions on the workflow side.
  • Add extra toolchains only when you have @external, NIF, Wasm, or Elixir dependencies.
  • Do not pile shell scripts into the workflow; push logic down into the justfile.

Testing

Lock down pure functions first, then actors, then finally HTTP.

test/my_app_test.gleam

gleam
import gleam/http
import gleeunit
import my_app/app
import my_app/web
import wisp/simulate

pub fn main() -> Nil {
  gleeunit.main()
}

pub fn healthz_test() {
  let assert Ok(app_state) = app.start()
  let response = web.app(app_state)(simulate.request(http.Get, "/healthz"))

  assert response.status == 200
  assert simulate.read_body(response) == "ok\n"
}

Testing policy:

  • Test state transitions of pure modules directly.
  • For actor modules, test only the public API.
  • Prefer wisp/simulate for HTTP tests.
  • Inject fake services for external APIs.
  • Use poll/retry helpers instead of flaky sleeps.
  • Use birdie for outputs where snapshots fit.
  • Use qcheck for pure logic where property-based tests fit.
  • Use glacier when you want faster local iteration.

Basic birdie workflow:

  1. gleam test
  2. Check failing / new snapshots.
  3. gleam run -m birdie
  4. Review snapshots and commit.

Basic qcheck workflow:

  1. Pick one property of a pure function.
  2. Feed it generators through qcheck.given(...).
  3. When a counterexample appears, use the shrunk result to write a unit test.
  4. For long-running tests or parallel execution, use qcheck_gleeunit_utils.

Notes on qcheck_gleeunit_utils:

  • Erlang-target only.
  • To parallelize all tests together, use run.run_gleeunit.
  • To wrap only one long test, use test_spec.make.
  • To attach a custom timeout, use test_spec.make_with_timeout.
  • To make test groups explicit, use test_spec.run_in_parallel / run_in_order.

Test Structure

Once features grow, split test files by responsibility.

  • domain_test.gleam: pure domain logic
  • runtime_test.gleam / app_test.gleam: supervision and actor integration
  • web_app_test.gleam: HTTP contract
  • agent_test.gleam: external API orchestration
  • workspace_session_server_test.gleam: server / state helpers
  • workspace_bit_runtime_test.gleam: FFI / git / wasm integration
  • workspace_session_http_test.gleam: session API contract

Split the support modules too.

  • *_app_test_support.gleam: app startup, handler construction, runtime helpers
  • *_workspace_test_support.gleam: fixture directories, workspace helpers

Do not cram everything into a single giant test file. As refactoring proceeds, split the tests along with it.

Lint and Quality

Gleam fits better with strict use of the formatter and compiler warnings than with a separate first-party lint tool.

Minimum:

  • gleam format --check .
  • gleam check
  • gleam build --warnings-as-errors
  • gleam test

Supplementary:

  • Track deprecated APIs: gleam fix
  • Check docs: gleam docs build
  • Detect unused exports: gleam run -m cleam

Performance Measurement

Measure in three tiers.

  1. Micro benchmarks of pure functions.
  2. Integration benchmarks for actors / workspaces.
  3. Load tests against HTTP endpoints.

Principles:

  • Separate pure functions from I/O as benchmark targets.
  • Separate warmup from measurement.
  • Turn off debug logging.
  • Run gleam clean and pre-download dependencies before benchmarking.
  • Do not compare micro benchmark numbers against HTTP load-test numbers on equal footing.
  • For FFI / Wasm / Ports, measure cold start and hot path separately.

Tools:

  • Micro benchmarks: create a bench/ module and run it with gleam run -m bench/main.
  • If you want a library, use glychee.
  • HTTP load tests: k6 or wrk.
  • BEAM hotspots: from erl / gleam shell, use :eprof, :fprof, :erlang.statistics(:reductions).

Minimal HTTP measurement example:

sh
just run
k6 run bench/http.js

Start by copying assets/bench/http.js to bench/http.js.

FFI and Native Integration

When you use @external, stick to these rules.

  • Create a single adapter module.
  • Expose only pub opaque type Handle.
  • Do not leak too many Erlang/Elixir types or pids.
  • Keep the details of paths, ETS, NIF, Port, and Wasm runtimes inside internal modules.
  • Write both live tests and failure tests.

The compiler does not validate @external implementations, so minimize the Gleam-side surface area.

Additional Tools

Think of frequently used external tools as follows.

  • gleeunit: the default unit test runner. Start here.
  • birdie: snapshot tests. Good for pinning HTTP responses and generated text.
  • qcheck + qcheck_gleeunit_utils: property-based testing. Good for pure domain logic.
  • glacier: interactive / incremental test loop. Use as a drop-in replacement for gleeunit.
  • cleam: detect unused exports. Good for pruning the public API.
  • glychee: micro benchmarks. Good for comparing pure functions and small integrations.
  • k6: HTTP / WebSocket load testing. An external CLI, not a Gleam package.
  • logging: configuration for Erlang's logger. Reasonable to add for ops-heavy projects.
  • olive: dev proxy with live reload. Only bother when you want to improve the Wisp/Mist dev experience.

Selection:

  • Default: gleam format/check/build/test.
  • First additions worth considering: birdie, qcheck, cleam, glychee.
  • glacier and olive: when you want to improve local DX.
  • logging: for long-running services or production apps.

Documentation

The README should at least cover:

  • What is implemented and what is explicitly out of scope.
  • The main module prefixes and their responsibilities.
  • How to start, just ci, and the main endpoints.
  • How to read the test files.

For mid-sized or larger projects, add a docs/ directory and guide readers through it.

  • docs/reference-ja.md: Japanese implementation guide.
  • docs/reference-en.md: English implementation guide.

State clearly at the top of the README whether this project is "introductory" or a "practical reference implementation".

Reference Project Positioning

When presenting a Gleam project as a reference implementation, do not leave its positioning vague.

  • beginner sample: a small API with minimal OTP.
  • medium reference: wisp + mist + gleam_otp + just + CI + docs.
  • advanced integration: FFI, Wasm, external LLM, workspace/session orchestration.

When you include advanced material, explain separately whether each part is "standard Gleam style" or "complexity specific to this project".

Closure Checklist

Good checkpoints for calling a cut "done":

  • The public / internal boundary is organized.
  • just ci is green.
  • Test files are split per feature.
  • Support modules are split by responsibility.
  • The README covers implementation status and test layout.
  • If needed, docs/ contains a reference guide.

Review Checklist

  • Are the public constructors truly necessary?
  • Could pub type be made pub opaque type?
  • Are there modules that should be hidden in internal_modules?
  • Is the web layer doing more than decode/call/encode?
  • Is pure logic mixed with actor state?
  • Is just ci the shared entrypoint for local and CI?
  • Is gleam build --warnings-as-errors passing?
  • Are you baking in absolute paths or machine-local config?
  • Is the external/FFI boundary too wide?

References

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 Gleam Practice làm được gì?

Dùng khi viết hoặc đánh giá mã Gleam trên nền tảng Erlang — đặc biệt là dịch vụ HTTP dùng Wisp + Mist, tiến trình dựa trên OTP (các thành phần tương tự gen_server / supervisor), quy trình justfile, kiểm thử bằng gleeunit, `gleam format`, CI trên GitHub Actions và đo hiệu năng. Kích hoạt khi có `gleam.toml`, tệp `.gleam` hoặc dấu hiệu liên quan đến Erlang/BEAM, kể cả khi người dùng không nhắc đích danh "Gleam".

Vì sao nên dùng Gleam Practice 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. Gleam Practice 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 Gleam Practice trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/mizchi/skills/tree/main/gleam-practice. 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 Gleam Practice?

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 Gleam Practice 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 Gleam Practice 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 Gleam Practice có miễn phí không?

Kỹ năng này được mizchi 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 👇