Logo Factory

Factory

Cộng đồng
AirsupHQ
factory

Turn a one line description of a factory ("a line that makes 2,000 e-bike motors a day", "a bakery that bakes 10,000 croissants an hour", "a battery cell gigafactory") into a single self-contained HTML page with a live 3D tilt-shift miniature of that factory, driven by a real discrete event simulation (stations, cycle times, batches, finite buffers, shifts, breakdowns, scrap) with a live HUD for throughput against target, takt, utilization, WIP, lead time and the bottleneck, where clicking a station lets you add a machine or change a cycle time and watch the bottleneck move. Use it whenever someone wants to see, size, explain or pitch a production line, plant, assembly line, process or factory, asks "how many machines do I need", "where is the bottleneck", "can this line make N a day", wants a factory simulation or digital twin demo, or describes a product and a volume, even if they never say "simulation".

Tổng quan

Nhà phát hànhAirsupHQ
Kho mãfactory-skill
Tên kỹ năngfactory
Sao
49
Bản fork
9
Tệp đi kèm
31
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ộ.

  • 31 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 AirsupHQ 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 Factory 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/AirsupHQ/factory-skill/tree/main
  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/AirsupHQ/factory-skill.git \
  .claude/skills/factory
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 Factory 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 Factory 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 Factory 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.

Factory

Describe a factory in one line. Claude builds it as a live 3D simulation you can run.

The page is a model factory on a table, seen through a tilt-shift lens: a cut-away hall with the line inside, machines that move while they work, product flowing on conveyors, people, forklifts, a truck yard. Under it runs a discrete event simulation. Every number on screen comes from that simulation, never from a script: the throughput, the utilization bars, the WIP, the pulsing red outline around the bottleneck. When someone adds a machine at the bottleneck, the simulation gets one more server, the conveyor in front of it drains, and the outline moves to the next constraint.

The one rule that matters

The simulation is the explanation, so it has to be true.

  • Cycle times, batch sizes, dwell times, breakdown rates and yields come from how the real process works. Use the numbers a process engineer would recognise and say in note where they come from ("18 min at 180 C", "51 slots, 3 needle head"). When you have to estimate, say "typical".
  • Machine counts come from the sizing rule, which the page prints in the inspector: machines = CEIL(rate_in x cycle / (batch x availability x target utilization)).
  • Throughput, utilization and the bottleneck come out of the simulation. Never tune inputs to make a nicer result. If the first line misses its target, that is the finding: report it, show it, and let the user fix it with the slider.

Workflow

Run date at the start. A factory takes 10 to 25 minutes.

  1. Read the line. Pull out the product, the volume and the time unit. Fill in what is missing with stated assumptions: shifts (2 x 8 h unless the process runs around the clock, like cells, chemicals or glass), the product variant ("250 W rear hub motor"), the scope ("the canning hall, from bright tanks to pallets"). Say them in one short paragraph before building.
  2. Route. Write the real process route as 6 to 10 stations, in flow order, with branches where sub-assemblies are made in parallel and joined (stator + rotor + housing into motor assembly). Each station: what happens, the machine that does it, the cycle time per unit or per batch, the batch, MTBF/MTTR if it is a machine that breaks, yield if it is a test or inspection. references/process.md has typical numbers for common processes and how to pick them.
  3. Pick the token. One token is one unit unless the line is fast. Choose perToken so one token leaves the line every 5 s to 2 h (a tray of 40 croissants, a case of 24 cans, a tray of 96 cells).
  4. Write spec.js (schema below). Start from the closest example in examples/.
  5. Check it headless. node scripts/check.mjs spec.js. It sizes the line and runs 5 production days of the same engine the page runs, and prints per station: machines, capacity per day, busy, down, blocked, starved, failures; then the forecast and the bottleneck. Read it like an engineer:
    • Does each machine count look like a real plant? 446 proofer slots is right (4 chambers of 120); 40 laminators is a wrong cycle time.
    • Is the bottleneck plausible? Long dwell steps and machines with poor availability usually are.
    • Fix mistakes in the inputs (a wrong unit, a batch you forgot). Do not fix the result.
  6. Build. node scripts/build.mjs spec.js <out>.html writes one file of about 1 MB with three.js, the runtime and the spec inlined. It opens from disk with no server and no network.
  7. Look at it. node scripts/capture.mjs <out>.html shot.png --query "assemble=0" (needs Playwright) and read the PNG. The line should fill the frame, every station should have its machines, product should be on the conveyors, the HUD should show a throughput. Zero console errors.
  8. Answer with the file path, the forecast against the target, the bottleneck and why, the sizing of the bottleneck station, and one what-if to try ("add a third winder: the forecast goes from 1,943 to 2,0xx a day and the constraint moves to EOL test"). Run that what-if through check.mjs (edit servers on a copy) before you quote it.

Spec

js
FactorySkill.define({
  id: 'ebike-motors',                        // file name
  prompt: 'a line that makes 2,000 e-bike motors a day',  // the user's line, typed into the page
  title: 'E-bike hub motor line',
  product: { name: 'motor', unit: 'motors', perToken: 1 },
  demand: { perDay: 2000 },                  // or perHour, or perWeek (5 days)
  calendar: { shifts: 2, hoursPerShift: 8, startHour: 6 },
  sizing: { targetUtil: 0.85 },              // planned utilization for the sizing rule
  release: 'capacity',                       // 'capacity': raw material always there (find the max), 'takt': released at demand
  seed: 11,
  stations: [
    { id: 'stamp', name: 'Lamination press', machine: 'press', ct: 22, cv: 0.04, buffer: 8,
      mtbf: 6 * 3600, mttr: 25 * 60, input: 'coil', stage: 'stack', note: '64 laminations at 180 strokes/min' },
    { id: 'wind', name: 'Needle winding', machine: 'winder', ct: 150, after: ['stamp'], stage: 'wound' },
    ...
  ],
  stages: { coil: { shape: 'coil', color: '#8d949b' }, stack: { shape: 'ring', color: '#6f7780' }, ... },
})

Station fields:

fieldmeaning
id, namekey and the name on the plate and in the HUD
machinea kit machine (table below) or an alias such as lathe, proofer, pasteurizer, seamer
ctseconds per cycle per machine; with batch it is the time for the whole batch
cvcoefficient of variation of the cycle (lognormal). Automatic 0.02 to 0.06, manual 0.1 to 0.2
batchunits taken and released together (a chamber oven, a mixer, a TVAC)
perMachineunits one physical machine holds at once in continuous flow (tunnel oven, spiral, proofer, formation rack). The DES gets that many servers per machine with ct = dwell time
servers'auto' (default, sizing rule) or a number of machines (times perMachine)
buffercapacity of the input buffer (each input of a join has its own)
mtbf, mttrmean busy seconds between failures and mean repair seconds (exponential)
yieldfraction good; the rest is scrapped at this station
afterpredecessor ids. Default: the previous station. A station with input starts a new branch
inputthe raw material stage a branch starts from
stagethe product stage this station outputs (looks up stages)
notewhere the numbers come from, shown in the inspector
variant, color, accent, length, radius, height, fill, web, glowlooks
operators, reserve, at: [col, row, dir]people beside machines, spare floor slots, manual grid placement

The model is a tree into one last station (the sink): every station feeds exactly one next station.

Kit

Machines (real scale, metres) in runtime/kit.js:

machinelooks likekind
cncmachining centre, window, moving spindle, chip conveyorside
presspress with ram and flywheel, coil feeder; variant: 'magnetizer'side
winderneedle winder, spinning table, wire spoolsside
robotfenced 6 axis arm cell; variant: 'weld' adds arc and sparksside
benchassembly bench with an operator, bins, tool balancerside
testertest rack with screens and a clamp fixtureside
ovenchamber oven with racks (batch); variant: 'proofer'side
mixerspiral or planetary mixer with turning bowlside
fillerrotary filler / seamer in a glass enclosureside
formationracks with blinking channels (formation, ageing, burn-in)side
tankstainless tank with agitator, ladder, pipingside
laserlaser cell with glowing windowside
turntablecalibration turntable with camera tripodsside
cageflight / function test cage; the unit lifts while testedside
bayintegration bay with gantry crane and technicians; variant: 'cleanroom'side
chamberthermal vacuum / autoclave vessel with a round door (batch)side
kittingshelving with bins and a pickerside
stackerhigh speed stacking / winding headside
cellgeneric enclosed process cell (anything else)side
tunneltunnel oven, dryer; `variant: 'pasteurizer''washer'`
spiralspiral cooler / freezer / proofer towerinline
rollerssheeter, laminator, `variant: 'calender''slitter'`
coaterroll to roll coater with drying oveninline
smtprinter + pick and place + reflowinline
visioninspection arch over a beltinline
packercase packer / flow wrapperinline

Product shapes for stages: ring wound rotor hub disc coil box crate tote croissant tray dough sheet can sixpack bottle cell pouch roll module pack pcb frame drone satellite bus sneaker bag puck. Each takes color and scale; tray takes item: 'croissant' | 'dough'.

A process with no fitting machine: use cell with a glow colour, or define one in the spec file before define (guarded, so check.mjs can run the file without a browser):

js
if (FactorySkill.Kit) FactorySkill.Kit.def('kiln', (o) => {
  const K = FactorySkill.Kit, { g, M, body, acc } = K.sideBase(o, 3, 2.4)
  K.box(g, 3, 2.2, 2.2, body, 0, 0, 0)                 // K.box(parent, w, h, d, material, x, yBottom, z)
  const door = K.live(K.group(g, 0, 0, -1.1))          // parts that move live in K.live groups
  K.box(door, 1.4, 1.6, 0.08, acc, 0, 0.3, 0)
  return K.finish({ g, kind: 'side', w: 3, d: 2.4, h: 2.4, entry: K.V(0, 0.9, -1.3),
    work: K.workFixed(0, 0.9, 0), anim(s) { door.position.y = s.state === 'busy' ? 0 : 1.4 } }, o, [1.2, 2.2, -0.9])
})

references/kit.md has the whole API (materials, parts, people, vehicles, work(i, p) for units that move through a machine).

The page

  • Opens on the assembled factory, already 3 production hours in (more for slow lines) so buffers hold WIP. ?intro=1 types the prompt and assembles the factory station by station first.
  • HUD: throughput per day over the last 4 h against the target, a sparkline per production hour, takt, WIP, lead time, the bottleneck card, one bar per station split into busy, blocked, starved and down. The bottleneck station gets a pulsing red outline on the floor; nothing else is labelled.
  • Click a station (or its row) for the inspector: machines with minus and plus (spare floor is reserved), cycle time and buffer sliders, the sizing formula with its numbers, MTBF/MTTR, failures, scrap, and a 3 day forecast of the changed line from the same engine.
  • Speed buttons scale production time; the clock shows day, time and shift.
  • ?film=1 stops the clock: window.__film.step(dt) renders one frame. window.factory exposes select(id), setMachines(id, n), setCT(id, s), setBuffer(id, n), camTo({az, el, dist, target}, s), stationCenter(id), forecast(), sim, world.
  • Other URL options: speed, seed, release=takt, select=<id>, ui=0, assemble=0, ao=0.

Look

Tilt-shift miniature photography, not a CAD view: warm sun with soft shadows, ambient occlusion, a narrow band of focus with heavy blur above and below, saturated warm grade, vignette, grain. The factory sits on a diorama base on a table: cut-away hall (back and left walls full height, front and right cut low with the section face coloured), racking along the back wall, clutter on free floor, truck yard, parking, trees, a sign. Machines are cream with one accent colour per station. references/look.md explains each choice and what to keep when you extend it.

Verify like a critic

  • check.mjs numbers match the HUD after a few hours (the HUD window is 4 h, so it is noisier).
  • Every station shows its machines; nothing floats; tokens sit on belts or in machines.
  • At the bottleneck the input buffer is full and machines upstream show amber (blocked); downstream rows show grey (starved). If not, the bottleneck is downtime driven: say so.
  • Add a machine at the bottleneck in the page: the forecast line updates and the outline moves within about an hour of production time.

Files

pathwhat
runtime/des.jsthe simulation engine and the sizing rule (pure, runs in Node and the browser)
runtime/kit.jsmachines, products, people, vehicles
runtime/world.jslayout, hall, conveyors, token placement from simulation state
runtime/look.jsrenderer, light, AO, bloom, tilt-shift, grade
runtime/app.js, runtime/hud.csspage, HUD, inspector, film hooks
vendor/three.bundle.jsthree.js r185 and the addons used (MIT)
scripts/check.mjs, scripts/build.mjs, scripts/capture.mjsheadless run, build, screenshot
examples/*/spec.jssix factories made with this skill, each with its built page

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

Turn a one line description of a factory ("a line that makes 2,000 e-bike motors a day", "a bakery that bakes 10,000 croissants an hour", "a battery cell gigafactory") into a single self-contained HTML page with a live 3D tilt-shift miniature of that factory, driven by a real discrete event simulation (stations, cycle times, batches, finite buffers, shifts, breakdowns, scrap) with a live HUD for throughput against target, takt, utilization, WIP, lead time and the bottleneck, where clicking a station lets you add a machine or change a cycle time and watch the bottleneck move. Use it whenever...

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

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

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

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