本文へ移動
cccskills
無料GitHub で公開

typst-author

Generate idiomatic Typst (.typ) code, edit and troubleshoot Typst documents and projects, and answer Typst syntax/reference questions. Use when working with .typ files or when the user explicitly asks for Typst document creation, editing, debugging, compilation, formatting, template work, or package usage.

インストール方法を見る

含まれるファイル(199)

  • SKILL.md9.0 KB
  • docs/changelog/0.1.0.md3.5 KB
  • docs/changelog/0.10.0.md6.4 KB
  • docs/changelog/0.11.0.md16.9 KB
  • docs/changelog/0.11.1.md2.6 KB
  • docs/changelog/0.12.0.md23.3 KB
  • docs/changelog/0.13.0.md21.0 KB
  • docs/changelog/0.13.1.md956 B
  • docs/changelog/0.14.0.md38.6 KB
  • docs/changelog/0.14.1.md5.2 KB
  • docs/changelog/0.14.2.md1.7 KB
  • docs/changelog/0.2.0.md2.1 KB
  • docs/changelog/0.3.0.md3.5 KB
  • docs/changelog/0.4.0.md5.5 KB
  • docs/changelog/0.5.0.md3.5 KB
  • docs/changelog/0.6.0.md3.1 KB
  • docs/changelog/0.7.0.md7.8 KB
  • docs/changelog/0.8.0.md6.6 KB
  • docs/changelog/0.9.0.md11.0 KB
  • docs/changelog/earlier.md15.7 KB
  • docs/changelog/index.md966 B
  • docs/guides/accessibility.md42.4 KB
  • docs/guides/for-latex-users.md27.4 KB
  • docs/guides/index.md428 B
  • docs/guides/page-setup.md17.5 KB
  • docs/guides/tables.md48.4 KB
  • docs/index.md680 B
  • docs/reference/context.md9.1 KB
  • docs/reference/data-loading/cbor.md2.2 KB
  • docs/reference/data-loading/csv.md1.9 KB
  • docs/reference/data-loading/index.md1.6 KB
  • docs/reference/data-loading/json.md3.1 KB
  • docs/reference/data-loading/read.md827 B
  • docs/reference/data-loading/toml.md3.0 KB
  • docs/reference/data-loading/xml.md1.6 KB
  • docs/reference/data-loading/yaml.md2.9 KB
  • docs/reference/foundations/arguments.md2.2 KB
  • docs/reference/foundations/array.md15.6 KB
  • docs/reference/foundations/assert.md1.9 KB
  • docs/reference/foundations/auto.md420 B
  • docs/reference/foundations/bool.md194 B
  • docs/reference/foundations/bytes.md2.6 KB
  • docs/reference/foundations/calc.md17.9 KB
  • docs/reference/foundations/content.md3.5 KB
  • docs/reference/foundations/datetime.md8.0 KB
  • docs/reference/foundations/decimal.md5.3 KB
  • docs/reference/foundations/dictionary.md4.0 KB
  • docs/reference/foundations/duration.md1.8 KB
  • docs/reference/foundations/eval.md872 B
  • docs/reference/foundations/float.md3.2 KB
  • docs/reference/foundations/function.md5.4 KB
  • docs/reference/foundations/index.md2.9 KB
  • docs/reference/foundations/int.md6.5 KB
  • docs/reference/foundations/label.md1.8 KB
  • docs/reference/foundations/module.md1.1 KB
  • docs/reference/foundations/none.md367 B
  • docs/reference/foundations/panic.md439 B
  • docs/reference/foundations/plugin.md7.6 KB
  • docs/reference/foundations/regex.md1.4 KB
  • docs/reference/foundations/repr.md1.2 KB
  • docs/reference/foundations/selector.md3.8 KB
  • docs/reference/foundations/std.md1.6 KB
  • docs/reference/foundations/str.md10.6 KB
  • docs/reference/foundations/symbol.md1.7 KB
  • docs/reference/foundations/sys.md742 B
  • docs/reference/foundations/target.md1.3 KB
  • docs/reference/foundations/type.md1.9 KB
  • docs/reference/foundations/version.md1.7 KB
  • docs/reference/html/elem.md1.3 KB
  • docs/reference/html/frame.md665 B
  • docs/reference/html/index.md3.3 KB
  • docs/reference/html/typed.md50.9 KB
  • docs/reference/index.md1.1 KB
  • docs/reference/introspection/counter.md9.1 KB
  • docs/reference/introspection/here.md1.3 KB
  • docs/reference/introspection/index.md1.3 KB
  • docs/reference/introspection/locate.md1.1 KB
  • docs/reference/introspection/location.md2.9 KB
  • docs/reference/introspection/metadata.md966 B
  • docs/reference/introspection/query.md4.5 KB
  • docs/reference/introspection/state.md9.8 KB
  • docs/reference/layout/align.md1.8 KB
  • docs/reference/layout/alignment.md1.6 KB
  • docs/reference/layout/angle.md292 B
  • docs/reference/layout/block.md5.2 KB
  • docs/reference/layout/box.md4.5 KB
  • docs/reference/layout/colbreak.md847 B
  • docs/reference/layout/columns.md2.0 KB
  • docs/reference/layout/direction.md1.6 KB
  • docs/reference/layout/fraction.md407 B
  • docs/reference/layout/grid.md25.2 KB
  • docs/reference/layout/h.md2.0 KB
  • docs/reference/layout/hide.md911 B
  • docs/reference/layout/index.md2.5 KB
  • docs/reference/layout/layout.md2.6 KB
  • docs/reference/layout/length.md1.9 KB
  • docs/reference/layout/measure.md1.9 KB
  • docs/reference/layout/move.md1.1 KB
  • docs/reference/layout/pad.md1.3 KB
  • docs/reference/layout/page.md10.3 KB
  • docs/reference/layout/pagebreak.md1.2 KB
  • docs/reference/layout/place.md6.1 KB
  • docs/reference/layout/ratio.md1.4 KB
  • docs/reference/layout/relative.md2.3 KB
  • docs/reference/layout/repeat.md1.2 KB
  • docs/reference/layout/rotate.md1.5 KB
  • docs/reference/layout/scale.md1.6 KB
  • docs/reference/layout/skew.md1.4 KB
  • docs/reference/layout/stack.md1.5 KB
  • docs/reference/layout/v.md1.1 KB
  • docs/reference/math/accent.md1.6 KB
  • docs/reference/math/attach.md2.8 KB
  • docs/reference/math/binom.md386 B
  • docs/reference/math/cancel.md2.4 KB
  • docs/reference/math/cases.md1.1 KB
  • docs/reference/math/class.md870 B
  • docs/reference/math/equation.md3.1 KB
  • docs/reference/math/frac.md1.4 KB
  • docs/reference/math/index.md5.7 KB
  • docs/reference/math/lr.md3.4 KB
  • docs/reference/math/mat.md3.6 KB
  • docs/reference/math/op.md824 B
  • docs/reference/math/primes.md409 B
  • docs/reference/math/roots.md714 B
  • docs/reference/math/sizes.md2.1 KB
  • docs/reference/math/stretch.md830 B
  • docs/reference/math/styles.md921 B
  • docs/reference/math/underover.md4.2 KB
  • docs/reference/math/variants.md2.7 KB
  • docs/reference/math/vec.md1.3 KB
  • docs/reference/model/bibliography.md3.4 KB
  • docs/reference/model/cite.md2.5 KB
  • docs/reference/model/document.md1.9 KB
  • docs/reference/model/emph.md776 B
  • docs/reference/model/enum.md5.5 KB
  • docs/reference/model/figure.md10.8 KB
  • docs/reference/model/footnote.md4.4 KB
  • docs/reference/model/heading.md6.9 KB
  • docs/reference/model/index.md1.8 KB
  • docs/reference/model/link.md4.5 KB
  • docs/reference/model/list.md3.3 KB
  • docs/reference/model/numbering.md3.0 KB
  • docs/reference/model/outline.md10.7 KB
  • docs/reference/model/par.md16.4 KB
  • docs/reference/model/parbreak.md453 B
  • docs/reference/model/quote.md3.3 KB
  • docs/reference/model/ref.md5.3 KB
  • docs/reference/model/strong.md823 B
  • docs/reference/model/table.md20.7 KB
  • docs/reference/model/terms.md3.3 KB
  • docs/reference/model/title.md1.0 KB
  • docs/reference/pdf/artifact.md1.4 KB
  • docs/reference/pdf/attach.md1.6 KB
  • docs/reference/pdf/data-cell.md1.6 KB
  • docs/reference/pdf/header-cell.md2.8 KB
  • docs/reference/pdf/index.md13.3 KB
  • docs/reference/pdf/table-summary.md2.1 KB
  • docs/reference/png.md3.1 KB
  • docs/reference/scripting.md12.8 KB
  • docs/reference/styling.md5.8 KB
  • docs/reference/svg.md2.6 KB
  • docs/reference/symbols/emoji.md38.8 KB
  • docs/reference/symbols/index.md829 B
  • docs/reference/symbols/sym.md35.8 KB
  • docs/reference/syntax.md11.7 KB
  • docs/reference/text/highlight.md2.1 KB
  • docs/reference/text/index.md1.2 KB
  • docs/reference/text/linebreak.md922 B
  • docs/reference/text/lorem.md546 B
  • docs/reference/text/lower.md312 B
  • docs/reference/text/overline.md1.8 KB
  • docs/reference/text/raw.md9.1 KB
  • docs/reference/text/smallcaps.md1.5 KB
  • docs/reference/text/smartquote.md2.3 KB
  • docs/reference/text/strike.md1.7 KB
  • docs/reference/text/sub.md1.9 KB
  • docs/reference/text/super.md2.0 KB
  • docs/reference/text/text.md20.5 KB
  • docs/reference/text/underline.md1.7 KB
  • docs/reference/text/upper.md313 B
  • docs/reference/visualize/circle.md2.2 KB
  • docs/reference/visualize/color.md20.6 KB
  • docs/reference/visualize/curve.md8.4 KB
  • docs/reference/visualize/ellipse.md1.9 KB
  • docs/reference/visualize/gradient.md14.4 KB
  • docs/reference/visualize/image.md6.5 KB
  • docs/reference/visualize/index.md1.9 KB
  • docs/reference/visualize/line.md1.4 KB
  • docs/reference/visualize/path.md2.4 KB
  • docs/reference/visualize/polygon.md2.5 KB
  • docs/reference/visualize/rect.md3.7 KB
  • docs/reference/visualize/square.md2.5 KB
  • docs/reference/visualize/stroke.md4.6 KB
  • docs/reference/visualize/tiling.md3.9 KB
  • docs/tutorial/advanced-styling.md18.9 KB
  • docs/tutorial/formatting.md10.3 KB
  • docs/tutorial/index.md2.1 KB
  • docs/tutorial/making-a-template.md15.2 KB
  • docs/tutorial/writing-in-typst.md12.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

typst-author skill

Overview

This skill helps agents generate, edit, and reason about Typst documents. It provides quick‑start examples, detailed workflows, and links to the full Typst documentation (guides, tutorials, reference).

Minimal document example

#set document(title: "My Document", author: "Author Name")
#set page(numbering: "1")
#set text(lang: "en")

// Enable paragraph justification and character-level justification
#set par(
  justify: true,
  justification-limits: (
    tracking: (min: -0.012em, max: 0.012em),
    spacing: (min: 75%, max: 120%),
  )
)

#title[My Document]

= Heading 1

This is a paragraph in Typst.

== Heading 2

#lorem(50)

Workflows

  • Creating a new Typst project: Use the "Minimal document example" above as a starting point. Skim the tutorial for the basics (docs/tutorial/writing-in-typst.md), then create the .typ file(s). After each .typ edit, follow the post-edit formatting checks below when typstyle is available.
  • Editing existing content: Locate the target text and apply changes; confirm syntax against the reference when needed (docs/reference/). After each modified .typ file, follow the post-edit formatting checks below.
  • Formatting & Styling: Consult the styling guide (docs/reference/styling.md) for set rule, show rule, and custom themes.

Documentation

  • Syntax & foundations: docs/reference/syntax.md
  • Styling & show/set rules: docs/reference/styling.md
  • Scripting & runtime behavior: docs/reference/scripting.md
  • Page setup & tables: docs/guides/page-setup.md and docs/guides/tables.md
  • Task-oriented authoring help: docs/tutorial/writing-in-typst.md, docs/guides/*.md, and docs/reference/**/*.md

Detailed instructions

  1. PRIORITY: Trust local documentation. Your internal training data regarding Typst may be outdated or hallucinated. Always verify function names, parameters, and syntax against the local docs/ folder before generating code.
  2. Read the relevant documentation using local file search and open tools on the paths above.
  3. Use local docs for syntax and reference questions. Verify syntax, function names, parameters, and reference behavior from the bundled docs. Run a minimal Typst probe only when runtime or evaluation behavior remains unclear after checking the docs.
  4. Generate or modify the .typ source according to the user's request.
  5. Run the post-edit formatting checks below for every .typ file you created or edited in that pass.
  6. Validate with typst compile after the formatting decision is complete when you created or edited .typ files, or when the user explicitly asks for verification (if tool access is allowed).
  7. Summarize touched files and outcomes. Provide full .typ content only when the user requests it or when direct editing is not possible, and optionally include a rendered preview (PDF/HTML).

Probing uncertain behavior

  • Use a probe when the bundled docs do not settle runtime or evaluation behavior.
  • Model the case with Typst scripting as described in docs/reference/scripting.md.
  • When a probe is necessary, prefer a fileless probe through stdin instead of creating scratch .typ files. Expose the value with metadata(...) <probe> and read it with typst query - "<probe>" --field value --one. See docs/reference/introspection/query.md and docs/reference/introspection/metadata.md.
  • Example: printf '#metadata(1 + 2) <probe>\n' | typst query - "<probe>" --field value --one

Post-edit formatting checks

  1. Check whether typstyle is available with command -v typstyle. If it is unavailable, skip the remaining formatting checks.
  2. After each .typ file modification, run typstyle --check <file> for the file you just created or edited.
  3. If typstyle --check fails, inspect the formatter changes with typstyle --diff <file> before deciding what to do.
  4. Apply formatting with typstyle -i <file> only when the formatter changes are limited to a newly created file or to code you created or edited in the current task.
  5. Stop and ask the user when formatting would change untouched pre-existing code. If the diff reaches outside your own edits, or if you cannot confidently prove that every formatter change is limited to your edits, ask instead of formatting.

Quick syntax reference

Critical distinctions

Hash usage (markup vs code)

  • Use # to start a code expression inside markup or content blocks; it disambiguates code from text. This is required for content-producing function calls and field access in markup: #figure[...], #image("file.png"), text(...)[#numbering(...)].
  • Do not use # inside code contexts (argument lists, code blocks, show-rule bodies). Example: #figure(image("file.png")) (no # before image).
  • Reference: docs/reference/scripting.md, docs/tutorial/writing-in-typst.md
// Incorrect (missing # inside content block)
text(...)[(numbering(...))]

// Correct
text(...)[(#numbering(...))]

Styling rules: set vs show

  • set: Set rule to configure optional parameters on element functions (style defaults scoped to the current block or file).
  • show: Show rule to target selected elements and apply a set rule or transform/replace the element output.
  • Use set for common styling; use show for selective or structural changes (e.g., heading.where(level: 1), labels, text, regex).
// Set rule: configure optional parameters for an element type
#set heading(numbering: "I.")
#set text(font: "New Computer Modern")

// Show-set rule: apply a set rule only to selected elements
#show heading: set text(navy)

// Show transform rule: replace/reshape element output
#show heading: it => block[#emph(it.body)]

Common mistakes to avoid

  • Calling things "tuples" (Typst only has arrays).
  • Using [] for arrays (use () instead).
  • Accessing array elements with arr[0] (use arr.at(0)).
  • Omitting # in markup/content blocks (e.g., text(...)[numbering(...)] should be text(...)[#numbering(...)]).
  • Using # inside code contexts (e.g., figure(#image("x.png")) in an argument list).
  • Mixing up content blocks [] with code blocks {}.
  • Forgetting to include the namespace when accessing imported variables/functions (e.g., use color.hsl instead of just hsl).
  • Using LaTeX syntax (do NOT use \begin{...}, \section, or other LaTeX commands).
  • Hallucinating environments (e.g., tabular does not exist; use table).

Advanced features

For large projects

When working on large projects, consider organizing the project across multiple files.

Troubleshooting

Missing font warnings

If you see "unknown font family" warnings, remove the font specification to use system defaults. Note: Font warnings don't prevent compilation; the document will use fallback fonts.

Template/Package not found

If import fails with "package not found":

  • Verify exact package name and version on Typst Universe.
  • Check for typos in @preview/package:version syntax.

Compilation errors

Common fixes:

  • "expected content, found ...": You're using code where markup is expected - wrap in #{ } or use proper syntax.
  • "expected expression, found ...": Missing # (or #(...)) in markup/content blocks.
  • "unknown variable": Check spelling, ensure imports are correct.
  • Array/dictionary errors: Review syntax - use () for both, dictionaries need key: value, singleton arrays are (elem,).

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

共享规范知识库。包含数学建模竞赛的写作规范、题型防错速查、图表规范等参考内容。其他 skills 在执行过程中按需读取,无需单独触发。

日本語の概要は準備中です。原文の説明を表示しています。

jihe520/MathModelAgent6,1932026年10月3日 更新

数学建模竞赛工作流入口。用于启动完整建模流程:询问用户偏好,生成 plan.md 和 todo.md,并按阶段调用赛题分析、建模、代码与图表、流程图、论文撰写、验证验收等 skills。

日本語の概要は準備中です。原文の説明を表示しています。

jihe520/MathModelAgent6,1932026年10月3日 更新

数学建模赛题分析与建模设计合并阶段。用于读取题面和附件,完成子问题拆解、数据理解、假设预检、变量定义、模型公式、目标函数、约束条件、求解策略和可交给代码实现的建模报告。

日本語の概要は準備中です。原文の説明を表示しています。

jihe520/MathModelAgent6,1932026年10月3日 更新

数学建模编程实现与数据图表生成阶段。根据 ANALYSIS_MODELING_REPORT.md 编写可复现代码、运行求解、验证约束、输出 RESULTS_REPORT.md 并生成论文可用的数据驱动图表 PDF。

日本語の概要は準備中です。原文の説明を表示しています。

jihe520/MathModelAgent6,1932026年10月3日 更新

4drawio

無料

数学建模非数据型图示绘制阶段。根据 ANALYSIS_MODELING_REPORT.md、RESULTS_REPORT.md 和已有 figures/ 生成技术路线图、子问题求解流程图、模型结构图、数据处理流程图等 DrawIO 图,并导出论文可引用 PDF。

日本語の概要は準備中です。原文の説明を表示しています。

jihe520/MathModelAgent6,1932026年10月3日 更新

5writing

無料

数学建模竞赛论文撰写阶段,支持 Typst 和 LaTeX 双引擎。根据 ANALYSIS_MODELING_REPORT.md、RESULTS_REPORT.md 和 figures/*.pdf 选择比赛模板、排版引擎、组织章节,并在论文正文中按章节直接插入图表。

日本語の概要は準備中です。原文の説明を表示しています。

jihe520/MathModelAgent6,1932026年10月3日 更新

jihe520 のスキルをすべて見る

このスキルの問題を報告する