Logo Modsmith

Modsmith

Cộng đồng
DannyMac180
modsmith

Các mẫu thiết kế, đánh giá chi phí và template sẵn dùng cho Claude Mods (plugin Claude Code có hành vi được triển khai dưới dạng mô-đun function hooks). Bổ sung những gì tính năng tạo mod tích hợp sẵn chưa có: các thiết kế đã được kiểm chứng (fork-check-draw, tool + ledger, mode registry, trạng thái được hỗ trợ bởi artifact), đánh giá chi phí prompt cache và token, quy trình thẩm định mod của người khác, cùng các quy tắc để kết hợp nhiều mod. DÙNG KHI: tạo mod, tạo Claude mod, tìm template mod, kiểm tra kiến thức sau mỗi lượt, dùng assumptions tool / register_assumption, tạo supervisor kiểm tra lượt làm việc, kiểm tra các bước tiếp theo, dùng mode selector / mode registry, phân bổ effort theo lĩnh vực, tạo model router giữ lại cache, đánh giá chi phí prompt cache của mod, hỏi chi phí mỗi lượt chạy của mod, rà soát hoặc thẩm định mod trước khi cài đặt, kết hợp các mod, dùng artifact Kanban làm trạng thái dự án dùng chung. KHÔNG DÙNG KHI: xử lý các hook lệnh shell kiểu cũ trong settings.json (PreToolUse, v.v.), tạo skill hoặc lệnh slash thông thường, tạo MCP server hoặc tra cứu riêng về hooks API (hãy dùng hướng dẫn tạo plugin và các kiểu được tạo của engine).

Add to TypingMind

Tổng quan

Nhà phát hànhDannyMac180
Kho mãskills
Tên kỹ năngmodsmith
Sao
538
Bản fork
49
Tệp đi kèm
41
Giấy phépMIT
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ộ.

  • 41 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 DannyMac180 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 Modsmith 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/DannyMac180/skills/tree/main/modsmith
  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/DannyMac180/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/modsmith .claude/skills/modsmith
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 Modsmith 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 Modsmith 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 Modsmith 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.

ModSmith

Claude Code ships its own mod authoring: the plugin-authoring skill and the generated declarations (claude-code.d.ts, written beside every mod as .claude-plugin/types/claude-code/index.d.ts and by /plugin-types). Those are the API. This skill does not re-teach it. It adds four things on top:

  1. Patterns that work, as complete templates you copy and change.
  2. Cost and prompt-cache review: what a mod costs per turn, what breaks the cache, and how to vet someone else's mod before installing it.
  3. Composition: how mods share a site, state and the cache.
  4. Decision notes: every mod ships a DECISIONS.md of what was chosen, what was rejected and what is still unverified.

Harnesses go out of date fast. When anything here disagrees with the generated declarations for the running build, the declarations win. Load the built-in plugin-authoring skill for any API question.

Step 1: Surface the unknowns

Before writing code, ask the few questions that decide the design. Use the question tool (AskUserQuestion) when it is available, one round, and skip any question the request already answers.

QuestionWhy it decides the design
What should it show or change, and where? (band above the prompt, footer label, pane, a tool Claude calls, a rewrite of what runs)Picks the event and the site
What triggers it? (every turn, turns that changed files, a slash command, a timer)Picks the gate
May it spend tokens per turn, and roughly how many? (none / one cached fork on qualifying turns / more)Fork, complete or no model call at all
Which mods must it work with? (quiz, supervisor, mode registry, token gauge...)Shared sites, state contracts, hotkey clashes

Say what you will assume for anything left unanswered, and record it in the mod's DECISIONS.md.

Step 2: Pick a pattern

People ask forPatternTemplateCost per turn
"Quiz me after each turn"fork-check-drawtemplates/quiz-after0 on chat/read-only/subagent turns; one cached fork after a main turn that changed something
"Check the work: goal met, lazy, needed approval?"fork-check-drawtemplates/next-steps-supervisor0 on chat/read-only turns; one cached fork after a turn that changed something or made 8+ calls
"Make Claude list its assumptions / what it skipped"tool + ledgertemplates/assumption-ledgerNo model calls; ~200 cached input tokens for the tool definition; ~40-80 output per entry Claude records
"A mode switch other plugins can join", "effort by domain"registrytemplates/mode-registry + templates/effort-modesNo model calls; each effort switch costs one cache rebuild (measured ~10k tokens in a 37k session)
"A shared board several Claudes update"artifact-backed statetemplates/artifact-dashboard + references/artifact-dashboard.md0 model tokens (reads are tool calls); ~130 tokens once per conversation
Anything elseminimaltemplates/minimal0

Figures are the templates' own estimates unless marked measured; each template's README has the detail.

Step 3: Build from the template

Copy the template folder, rename the plugin in .claude-plugin/plugin.json (and its PluginState key in types/index.d.ts), then change behaviour. The layout:

my-mod/
  .claude-plugin/plugin.json   name, version, description, author, license,
                               "types": "./types/index.d.ts" when it keeps $.state
  hooks/hooks.json             { "modules": ["./register.tsx"] }
  hooks/register.tsx           export const register: Register = (on, options) => { ... }
  types/index.d.ts             declare module 'claude-code' { interface PluginState { 'my-mod': {...} } }
  tests/*.test.ts(x)           claude plugin test
  README.md                    what it does in plain words, cost per turn, composes with, install
  DECISIONS.md                 chosen / rejected / unverified

Rules every template follows, and yours should too:

  • Call next(e) when not acting; answer without next only for your own command or tool, narrowed by a matcher.
  • At a tree site, draw {await next(e)} beside your own tree; step aside when e.props.hasSurvey.
  • Gate anything that costs tokens, and give it a slash command that turns it off (stored in $.store).
  • Catch every $ promise you don't return. Parse model JSON defensively.
  • Never claim something works that you didn't verify. It goes in DECISIONS.md under "not verified".

Step 4: Cost and cache review

Follow references/cost-review.md. In short:

sh
claude plugin validate <mod>                  # what the engine sees it hook and call
bun scripts/audit-mod.ts <mod>                # cost, cache and reach heuristics
# or: node --experimental-strip-types --no-warnings scripts/audit-mod.ts <mod>

Read every hook the audit flags, then show the user the short report from the end of cost-review.md (risk, tokens per turn, cache impact, off switch, what it can touch). Mark estimates as estimates; measure with the snippets in that file when it matters.

Vetting someone else's mod before installing. Same pass, stricter: read the whole hooks module and everything it imports (including Client modules), run validate and the audit on the folder, check each capability in the vetting table in cost-review.md ($.process, $.fs.write, $.mcp.call, tool.check allows, prompt rewrites are the ones to question hardest), then load it alone in a scratch project with claude --debug --plugin-dir <dir>. Give the user the report and let them decide; don't install it for them.

Step 5: Composition check

Per references/composition.md:

  • Does it pass the chain on everywhere it isn't the answer?
  • Does it draw with others ({await next(e)}, prop sites changed and passed on) and yield to surveys?
  • Does it own its state and let others change it only by hooking state.set? Is the contract in types/index.d.ts and named in plugin.json?
  • Do its hotkeys clash with mods it will sit beside? (quiz-after uses 1-3, s, x; next-steps-supervisor n, m; mode-registry 0-9 in its picker.) A bare digit typed into an empty prompt presses a band Button.
  • Does it change what the main thread sends (effort, model, system prompt)? Then it changes every fork-based mod's bill too: say so in the README.

Step 6: Validate, test, load, share

sh
claude plugin validate <mod>          # add --strict in CI
claude plugin test <mod>              # runs tests/*.test.ts(x) against the engine
claude --plugin-dir <mod>             # load from source; saving a file hot-reloads it

Type-check against the generated declarations with the tsconfig.json from the d.ts header (the engine writes one beside a mod it loads from a folder). references/testing.md covers the test kit's traps.

Share: a repo can be its own marketplace.

sh
claude plugin marketplace add <owner>/<repo>
claude plugin install <plugin>@<marketplace>

Tell people what it costs per turn and how to turn it off, in the README's first screen.

Gotchas (checked against 2.1.286)

  • Don't declare, import or take a parameter named h or Fragment, and don't add a @jsx pragma. JSX compiles to the global h; the engine prepends the pragma itself.
  • Client module paths are string literals. A variable is refused at load.
  • $.clock.now() returns Promise<number>. Await it.
  • Drawing above the prompt works on the terminal and the desktop app. AbovePrompt is raised on those two surfaces; test both with the kit's $.ui.mount over ['terminal', 'desktop'].
  • A render hook never writes state. $.state.set while drawing is denied; write from a press handler or another event. State a drawing reads belongs in $.state (a hot reload loses module variables).
  • The band is capped at half the terminal's rows, and redraws fold to ten a second (thirty for the band and the shown pane).
  • A hook has a 10 s budget; $ calls in flight don't count against it, but $.clock.sleep does. A failing hook is skipped and the chain goes on (fail open).
  • Headless runs: a claude -p run reports a module that did not load on stderr, including when the function-hooks switch is off there; set CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 in that process if so. Interactive sessions on this build needed no flag.

More, with symptoms: references/gotchas.md.

Files

PathWhat
references/cost-review.mdCache breakers, fork vs complete, per-turn gates, timers, growth, vetting table, measuring, the report
references/composition.mdChain, shared sites, $.state contracts, ordering, cache etiquette, testing with inline plugins
references/artifact-dashboard.mdArtifact database as shared project state: what a mod can reach, the pattern, limits
references/gotchas.mdTraps by symptom
references/testing.mdclaude plugin test and its traps
scripts/audit-mod.tsStatic cost/cache/reach audit of a mod folder
templates/*Seven mods; each has README.md and DECISIONS.md

Where the ideas come from

The patterns follow Thariq Shihipar (Anthropic) on the Latent.Space podcast: shareable mods that warn you about prompt-cache costs, forked subagents as the cheap way to ask questions about a turn, a quiz after the turn, an assumptions tool, a next-steps supervisor, mods that compose through a mode selector, and artifact dashboards as shared project state.

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

Các mẫu thiết kế, đánh giá chi phí và template sẵn dùng cho Claude Mods (plugin Claude Code có hành vi được triển khai dưới dạng mô-đun function hooks). Bổ sung những gì tính năng tạo mod tích hợp sẵn chưa có: các thiết kế đã được kiểm chứng (fork-check-draw, tool + ledger, mode registry, trạng thái được hỗ trợ bởi artifact), đánh giá chi phí prompt cache và token, quy trình thẩm định mod của người khác, cùng các quy tắc để kết hợp nhiều mod. DÙNG KHI: tạo mod, tạo Claude mod, tìm template mod, kiểm tra kiến thức sau mỗi lượt, dùng assumptions tool / register_assumption, tạo supervisor kiểm...

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

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

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

Có. Kỹ năng này được DannyMac180 phát hành trên GitHub theo giấy phép MIT. 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 👇