Logo Smartform Preview

Smartform Preview

Cộng đồng
babamba2
smartform-preview

Draw the expected print of a SmartForm as a JPG (plus the HTML it is drawn from) — windows at their real mm positions, SmartStyle fonts, template / table grids with borders and shading, SE78 graphics such as logos and signatures, loops with sample rows — with invented sample values in place of the &fields&, sized to the real field types. Reports the cells and windows whose content gets cut off.

Add to TypingMind

Tổng quan

Nhà phát hànhbabamba2
Kho mãsuperclaude-for-sap
Tên kỹ năngsmartform-preview
Sao
69
Bản fork
26
Tệp đi kèm
Chỉ có hướng dẫn
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ộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được babamba2 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 Smartform Preview 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/babamba2/superclaude-for-sap/tree/main/skills/smartform-preview
  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/babamba2/superclaude-for-sap.git /tmp/superclaude-for-sap
mkdir -p .claude/skills
cp -r /tmp/superclaude-for-sap/skills/smartform-preview .claude/skills/smartform-preview
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 Smartform Preview 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 Smartform Preview 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 Smartform Preview 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.

SC4SAP SmartForm → Print Preview

Reads one SmartForm from the connected system and draws what a printed page will look like, without running the print program: one JPG and one HTML page (A4 in mm). Field symbols (&HEADER-NAME1&) are filled with invented sample values that fit the field types read from the DDIC, so the picture shows realistic widths — and the places where the form cuts text off.

<Response_Prefix>Every response triggered by this skill MUST begin with [Model: <main-model> · Dispatched: <sub-summary>] per ../../common/model-routing-rule.md § Response Prefix Convention. This skill dispatches no agents (Dispatched: none).</Response_Prefix> <Target_Object>The target object is looked up on the active profile's system only. Not found → stop and ask per ../../common/multi-profile-artifact-resolution.md § Target object not on the active system — never substitute a similar name, never switch profiles on your own.</Target_Object>

<Team_Mode>No teamMode integration. Reading and drawing are scripted; the main thread writes the sample values.</Team_Mode>

<Use_When>

  • "SmartForm preview", "what does this form print", "expected output of ZXX_FORM", "스마트폼 미리보기", "출력물 예상 이미지", "スマートフォームのプレビュー"
  • A spec or test case needs a picture of the form output
  • Before / after a layout change of a form </Use_When>

<Do_Not_Use_When>

  • The user wants to change the form — this skill is read-only; SmartForm editing is not supported
  • SAPscript forms (SE71) or Adobe forms (SFP) — only SmartForms
  • The user wants the output with real document data — refuse (see Data_Rules) and offer invented values </Do_Not_Use_When>

<Decisions_Fixed>

TopicDecision
SourceMCP GetSmartFormContent (active version, logon language) → <form>.content.json in the MCP output directory
ValuesInvented by the main thread from the field types (GetStructure / GetDataElement / GetTable), never read from documents
Loops / tables3 sample rows unless the user asks for more; a row count that overflows MAIN shows where the page would break
PagesFirst page; firstPage / lastPage windows all shown (one-page document)
Cut-off textDrawn cut off, as SAP prints it (cell clips, no wrap); listed in the report
Borders / shadingAs stored in the form — gaps in borders are real
Output<artifact-base>/smartforms/<FORM>/<FORM>-preview.{jpg,html} + values.json (artifact base per ../../common/multi-profile-artifact-resolution.md)
</Decisions_Fixed>

Step 1 — Target. Form name from ARGUMENTS; if missing ask once. Uppercase it.

Step 2 — Read the form. GetSmartFormContent(form_name, summary: true) — the summary lists windows, data declarations, symbols, graphics, styles and files.content (the full result on disk). Read only the summary; never load the content file into the conversation.

  • graphics[].error or dynamicReferences (keys set at print time) → the drawing shows a box there; say so in the result.
  • If <out>/values.json exists from an earlier run, offer to reuse it (Recommended) or write new values.

Step 3 — Where each symbol prints.

node scripts/smartform/build-preview.mjs symbols "<content>"

→ per symbol: its declaration (HEADER → type ZXX_S_HEAD), every place it prints (window, paragraph, font pt, cell width mm, in a loop or not).

Step 4 — Field types. For every declaration type behind a symbol: GetStructure (structures, table lines), GetDataElement (single fields such as CHAR100, STCEG); GetTable when the type is a table. Parallel calls. Keep per field: data type, length, decimals, description.

Step 5 — Sample values → write <out>/values.json with the Write tool:

json
{ "form": "ZXX_FORM", "defaultParagraph": "AA", "rows": 3,
  "values": { "HEADER-NAME1": "Northwind Trading Co., Ltd.",
              "GS_ITEM-MATNR": ["100234", "100235", "100512"] } }
  • Write values as printed: dates and numbers in the user's format (country file / config.json → country; KR / US style 1,250.000, DE style 1.250,000), currency amounts with their decimals, units as their external code.
  • Numbers (CURR / QUAN / DEC / INT / P) print right-justified in their output length — pad with leading blanks (QUAN 13,3 → 17 characters: " 12.500") unless the symbol has a length or (C) option. Signed fields (CURR, signed DEC) end with the sign position: a blank when positive (" 1,234.56 "), - when negative. In a narrow cell the blanks wrap the number onto a second line that a fixed-height row cuts off — SAP prints the cell empty, and so must the preview.
  • A variable the form's code sets differently in one place (a footer total in a loop's last event) takes a value for that text node only: "L_WRBTR@%TEXT59": "99,999.96" wins over "L_WRBTR": [...].
  • A dynamic text node (text type D, REF_NAME &GV_TEXT&) prints a text table: give its lines, "GV_TEXT": ["First line", {"TDFORMAT": "", "TDLINE": "continued"}] (a string = a * line; a blank TDFORMAT continues the paragraph). One text per loop row = an array of such arrays.
  • Realistic lengths: names and texts typically 50–90 % of the field length; keys at their usual length (4500001234, 0010004567). A symbol inside a loop or table gets an array, one value per row; totals add up.
  • Values hang together: same buyer in buyer and ship-to when the form implies it, item amounts = quantity × price, a total that matches.
  • defaultParagraph: the paragraph for lines formatted * (the style's standard paragraph is not in the content). Take the paragraph of the neighbouring label of the same kind (e.g. the title cell next to it); say which one in the result. Keep the choice in values.json for later runs.
  • System symbols (SFSY-PAGE, SFSY-FORMPAGES) default to 1; set them only for a different picture.

Step 6 — Build.

node scripts/smartform/build-preview.mjs build "<content>" --values "<out>/values.json" --out-dir "<out>" [--rows N] [--mark]

--mark tints the sample values yellow (for review); unfilled symbols always show as blue &NAME& placeholders. The JSON report lists filled, unfilled, overflow (cells / windows whose content does not fit), approximations and the defaultParagraph used.

Step 7 — Check and show. Read the JPG and look at it before answering: overlapping windows, empty windows, missing graphics, symbols left blue. Fix values.json and rebuild for value problems; report layout findings — never "fix" the form's layout in the drawing.

<Data_Rules> Only the form definition, styles, graphics and DDIC metadata are read. Sample values are invented — never business data, never real customer, vendor or company names, never real tax numbers or addresses of real parties. Do not call GetTableContents / GetSqlQuery to fill the form; a request for "the real output of document X" is refused: say the preview uses invented values and the real output comes from the print program (e.g. the output type's processing program or SMARTFORMS test). </Data_Rules>

<Output_Format>

SmartForm preview: ZXX_FORM  (page %PAGE1, A4 portrait)
Windows: 7 · Graphics: 2 (logo, signature) · Symbols: 30 filled, 0 left blank · Sample rows: 3
Cut off as printed (4): "Purchase Order No." (%TEXT24), "(Unit)" (%TEXT45, %TEXT50), …
Window overflow: %WINDOW4 — graphic 27.2 mm in a 25 mm window
Standard paragraph: AA assumed for '*' lines
JPG:  .sc4sap/work/DEV/smartforms/ZXX_FORM/ZXX_FORM-preview.jpg
HTML: .sc4sap/work/DEV/smartforms/ZXX_FORM/ZXX_FORM-preview.html
Values: .sc4sap/work/DEV/smartforms/ZXX_FORM/values.json

Next: "10 rows", "other values", "mark the sample values", "show the second page"

Reply in the user's language; show the JPG to the user when the client can display images. </Output_Format>

<MCP_Tools_Used>

  • GetSmartFormContent (summary: true)
  • GetStructure, GetDataElement, GetTable, GetDomain (field types only) </MCP_Tools_Used>

<Related_Skills>

  • /sc4sap:program-to-spec — the print program's specification (attach the preview as expected output)
  • /sc4sap:program-to-manual — user manual of the print program </Related_Skills>

Task: $ARGUMENTS

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

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

Draw the expected print of a SmartForm as a JPG (plus the HTML it is drawn from) — windows at their real mm positions, SmartStyle fonts, template / table grids with borders and shading, SE78 graphics such as logos and signatures, loops with sample rows — with invented sample values in place of the &fields&, sized to the real field types. Reports the cells and windows whose content gets cut off.

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

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/babamba2/superclaude-for-sap/tree/main/skills/smartform-preview. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để 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 Smartform Preview?

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

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