Agent skill

Add Syntax Construct

by jolars in jolars/panache

Add a new block-level or inline-level syntax construct to Panache's parser and formatter — confirm the pandoc-native shape first, add SyntaxKinds for every byte category, gate it behind an extension…

MITAuto-check passedDevelopment

Install Add Syntax Construct

skills CLI
$ npx skills add jolars/panache --skill add-syntax-construct -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jolars/panache add-syntax-construct --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jolars/panache.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-syntax-construct .claude/skills/add-syntax-construct && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-syntax-construct
GitHub stars
234
Token cost
~1.8k tokens
SKILL.md length
850 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Add a new block-level or inline-level syntax construct to Panache's parser and formatter — confirm the pandoc-native shape first, add SyntaxKinds for every byte category, gate it behind an extension…

  • Works in 8 steps: Confirm the pandoc-native shape first → Add SyntaxKind variants → Gate it behind a flag → …
  • Asked to support a new Markdown/Quarto/Pandoc construct
  • SKILL.md covers Scope boundaries, Step 1 — Confirm the…, Step 2 — Add SyntaxKind variants and Step 3 — Gate it behind a flag, plus 8 more sections
  • Calls cargo and pandoc

What it does

Add Syntax Construct is an agent skill from jolars/panache. Add a new block-level or inline-level syntax construct to Panache's parser and formatter — confirm the pandoc-native shape first, add SyntaxKinds for every byte category, gate it behind an extension or flavor, slot the block parser at the right precedence in the registry, teach the formatter, and pin it with fixtures in both golden suites. Use when asked to support a new Markdown/Quarto/Pandoc construct, or when a construct parses but formats wrongly because it was only half-wired.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Linting and formatting. It works with Pandoc. The repository describes itself as: Language server, formatter, and linter for Markdown, Quarto, and R Markdown. The licence is MIT.

When your agent uses it

  • Asked to support a new Markdown/Quarto/Pandoc construct
  • A construct parses but formats wrongly because it was only half-wired

Example prompts

  • “/add-syntax-construct”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Confirm the pandoc-native shape first
  2. Add SyntaxKind variants
  3. Gate it behind a flag
  4. Typed AST wrapper
  5. Teach the formatter
  6. Fixtures in both suites
  7. Verify
  8. Document

What it can do on your machine

Read from SKILL.md and the folder at commit 167b303. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo
    • pandoc

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Syntax Construct loads about 1.8k tokens when it runs. Until then it costs about 127 tokens; SKILL.md has 850 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~127
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jolars/panache at commit 167b303, republished under its MIT licence (© jolars). 850 words, ~1,789 tokens.

Download SKILL.mdSave it as .claude/skills/add-syntax-construct/SKILL.md (or your agent's skills folder).
name
add-syntax-construct
description
Add a new block-level or inline-level syntax construct to Panache's parser and formatter — confirm the pandoc-native shape first, add SyntaxKinds for every byte category, gate it behind an extension or flavor, slot the block parser at the right precedence in the registry, teach the formatter, and pin it with fixtures in both golden suites. Use when asked to support a new Markdown/Quarto/Pandoc construct, or when a construct parses but formats wrongly because it was only half-wired.

Use this skill when adding syntax Panache does not yet understand, or when finishing a construct that was wired into the parser but not the formatter.

This is the most error-prone change in the codebase. Skipping a step here does not fail loudly at the point of the mistake — it surfaces later as a losslessness failure, a silently unformatted node, or a global precedence regression in a conformance suite.

Scope boundaries

  • Not for lint rules. Use the add-lint-rule skill.
  • Not for conformance triage. If the goal is "make example N pass", use commonmark-conformance or html-conformance instead — those start from a failing case, not from a construct.
  • Not for inline IR migration. Moving an existing Pandoc inline onto the unified IR is pandoc-ir-migrate.

Step 1 — Confirm the pandoc-native shape first

Pandoc's AST decides what the CST must be able to express. Do not design the CST from the surface syntax alone.

bash
printf '<your construct>' | pandoc -f markdown -t native
printf '<your construct>' | cargo run -- parse --to pandoc-ast

The second command prints the same shape as the first, so divergences diff directly. Note what pandoc nests and what it flattens — that is the structure the CST has to support, even if the surface syntax looks flat.

If the construct is Quarto- or MyST-specific and pandoc does not know it, find the closest pandoc construct it degrades to, and check assets/pandoc-spec/.

Step 2 — Add SyntaxKind variants

In crates/panache-parser/src/syntax/kind.rs, SCREAMING_SNAKE_CASE.

Add a distinct kind for every byte category you need to round-trip: the marker, the delimiters, the content, and any attribute payload. A construct that reuses TEXT for its markers cannot be formatted without re-lexing later, which is the usual reason a construct ends up needing a second pass.

Step 3 — Gate it behind a flag

New syntax almost always belongs to an extension or a flavor.

  1. Add the flag to Extensions in crates/panache-parser/src/options.rs.
  2. Wire the host-side default in src/config.rs.
  3. Set it per flavor.

A construct that is unconditionally live changes behavior for commonmark and will break that conformance suite. This is not optional.

If the flag adds a config key, regenerate the schema: UPDATE_EXPECTED=1 cargo test config_schema.

Step 4a — Block-level constructs

Add a module under crates/panache-parser/src/parser/blocks/ exporting try_parse_*() / emit_*(). Implement BlockParser in crates/panache-parser/src/parser/block_dispatcher.rs and insert it into the BlockParserRegistry::new() vector.

Registry order is precedence. The vector is deliberately aligned with pandoc's reader order, documented in a doc comment on the registry citing pandoc/src/Text/Pandoc/Readers/Markdown.hs:487-515. Placing a parser in the wrong slot is the single most common cause of subtly wrong output. Existing load-bearing constraints, each with a comment at its entry:

  • fenced code must precede YAML metadata
  • MyST directives must precede fenced code (brace-tagged opener wins)
  • close-parsers precede their open-parsers (fenced divs, MyST directives)
  • headings must precede horizontal rules
  • admonitions must precede indented code (4-space body would be eaten)
  • indented code must follow fenced code

Justify your position in a comment next to the entry, as the existing ones do.

detect_prepared() may return a payload (Box<dyn Any>) that parse_prepared() consumes, so emission never re-parses. Use it instead of scanning the line twice — re-scanning in emission is the quiet path back to two-pass parsing.

Show full SKILL.md (344 more words)Show less

Step 4b — Inline-level constructs

Add a module under crates/panache-parser/src/parser/inlines/ and hook it into inlines/core.rs.

Check whether the surrounding dialect is already on the unified inline IR (inlines/inline_ir.rs) before choosing where to put the logic. The IR currently backs CommonMark only; the Pandoc dialect is mid-migration. Adding to the wrong side means the work is undone by the next migration step.

Step 5 — Typed AST wrapper

Add one in crates/panache-parser/src/syntax/ if the linter or LSP needs to interrogate the node. Consumers should never match on raw SyntaxKind sequences — that is what the wrappers exist to prevent.

Step 6 — Teach the formatter

Block dispatch is the match node.kind() in crates/panache-formatter/src/formatter/core.rs; inline handling lives in formatter/inline.rs.

An unhandled kind typically falls through to verbatim-ish output. That looks correct in a flat smoke test and breaks as soon as wrapping, indentation, or container nesting is involved — which is why step 7 insists on nested fixtures.

Step 7 — Fixtures in both suites

Both, not either:

  • Parser golden case in crates/panache-parser/tests/fixtures/cases/<name>/ (input.md + optional parser-options.toml) pins the CST via insta and proves losslessness.
  • Formatter golden case in tests/fixtures/cases/<name>/ (input.*, expected.*, optional panache.toml). Register the directory name in the golden_test_cases! macro at the bottom of tests/golden_cases.rs or it silently never runs.

Cover the construct nested inside a list item and inside a blockquote. Container prefixes are where most constructs break, and a top-level-only fixture will not catch it.

Step 8 — Verify

bash
# Losslessness + idempotency on a real document using the construct
cargo run -- debug format --checks all scratch.qmd

# The real regression signal: a new block parser changes precedence globally
cargo test -p panache-parser --test commonmark
cargo test -p panache-parser --test pandoc

cargo test --workspace
cargo clippy --workspace --all-targets --all-features -- -D warnings

If a conformance suite regresses, the registry slot is the first suspect.

Step 9 — Document

Update the relevant page under docs/. If a config key was added, the schema regeneration from step 3 must be committed alongside.

Failure modes, in the order they usually appear

SymptomCause
Losslessness failureA byte category has no SyntaxKind; markers folded into TEXT
Construct parses, output unchangedFormatter match has no arm for the kind
Unrelated CommonMark examples regressRegistry slot too early, or the construct is not extension-gated
Breaks only inside a list or quoteNo nested fixture; container prefix handling untested
Formatting is not idempotentFormatter re-emits a marker the parser already captured

© jolars, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/add-syntax-construct of jolars/panache.

Open the folder on GitHubat commit 167b303

Compare with similar skills

Add Syntax Construct next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Syntax Construct compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Syntax Construct this skilljolars/panache234—~1.8kAutomated safety check: PassMIT
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.2k—~2.2kAutomated safety check: PassMIT
Babysit PR To Pass CIsgl-project/sglang37k2 repos~3kAutomated safety check: PassApache-2.0
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
Go Pedantrychromedp/chromedp13k—~3.7kAutomated safety check: PassMIT
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence

Similar skills

  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.2k GitHub stars~2.2k tokensUpdated 27 days ago
    DevelopmentAuto-check passed
  • Babysit PR To Pass CI

    sgl-project/sglang

    Start and persistently pursue a goal to babysit an SGLang pull request until selected GitHub Actions workflows pass on the latest PR head.

    37k GitHub starsUsed in 2 repos~3k tokens
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • WooCommerce Markdown Guidelines

    woocommerce/woocommerce

    Rules for writing and editing markdown in the WooCommerce repository, with the project's markdownlint settings for headings, lists and code blocks.

    11k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed

More from jolars/panache

All 10 skills in this repo
  • Grow Panache's CommonMark spec conformance under Flavor::CommonMark by running every spec.txt example through the shared parser, comparing rendered HTML against the spec's expected HTML…

    234 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • External Tools

    jolars/panache

    Work on Panache's delegation of embedded code blocks to third-party formatters and linters (ruff, shfmt, shellcheck, rustfmt, ...) — add or change a preset, fix the offset mapping that translates a…

    234 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Linter Investigation

    jolars/panache

    Investigate panache's linter (and, secondarily, its parser) against a real-world Quarto/Markdown codebase.

    234 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Math Parser Formatter

    jolars/panache

    Implement or debug Panache's TeX math parser and formatter internals, including the lossless CST, semantic model, diagnostics, and Badness parity.

    234 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Add Lint Rule

    jolars/panache

    Add a new built-in lint rule to the Panache linter — wire it into the registry, gate it on the right extension/flavor, add a regression fixture with focused assertions, and document it.

    234 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Perf Investigation

    jolars/panache

    Profile-driven performance work on the panache parser or formatter.

    234 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Add Syntax Construct

What does Add Syntax Construct do?

Add a new block-level or inline-level syntax construct to Panache's parser and formatter — confirm the pandoc-native shape first, add SyntaxKinds for every byte category, gate it behind an extension…. Add Syntax Construct is an agent skill from jolars/panache. Add a new block-level or inline-level syntax construct to Panache's parser and formatter — confirm the pandoc-native shape first, add SyntaxKinds for every byte category, gate it behind an extension or flavor, slot the block parser at the right precedence in the registry, teach the formatter, and pin it with fixtures in both golden suites.

When should I use Add Syntax Construct?

Add Syntax Construct fits situations like: asked to support a new Markdown/Quarto/Pandoc construct; A construct parses but formats wrongly because it was only half-wired.

How do I install Add Syntax Construct in Claude Code?

Run `npx skills add jolars/panache --skill add-syntax-construct -a claude-code`. Or copy the skill folder (.agents/skills/add-syntax-construct in jolars/panache) into .claude/skills/add-syntax-construct in your project. Claude Code loads it when a task matches its description.

How do I install Add Syntax Construct in Codex?

Run `npx skills add jolars/panache --skill add-syntax-construct -a codex`. Or copy the skill folder (.agents/skills/add-syntax-construct in jolars/panache) into .agents/skills/add-syntax-construct in your project. Codex loads it when a task matches its description.

Can I use Add Syntax Construct in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jolars/panache --skill add-syntax-construct -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-syntax-construct, .gemini/skills/add-syntax-construct, .github/skills/add-syntax-construct and .opencode/skills/add-syntax-construct in your project.

What does Add Syntax Construct need to run?

Going by SKILL.md and its folder, Add Syntax Construct needs the command-line tools its instructions call (cargo and pandoc).

Does Add Syntax Construct access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Syntax Construct safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Syntax Construct use?

Add Syntax Construct is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Syntax Construct use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Syntax Construct?

Skills that share tags, products or a category with Add Syntax Construct: Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.2k stars), Babysit PR To Pass CI (sgl-project/sglang, 37k stars), Rust Best Practices (farm-fe/farm, 5.6k stars) and Go Pedantry (chromedp/chromedp, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Syntax Construct?

jolars (a GitHub user) maintains it in jolars/panache, which has 234 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 6, 2026.

Source: jolars/panache on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.