Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Markdown Citation Renderer

markdown.render_citations

ProductionBounded custom (Class B)Deterministicstrictmoderatev1.0.0
File inputNo network

Overview

You send Markdown plus canonical CSL-JSON items. The skill recognizes a documented citation subset, formats it with a closed six-style catalog, sanitizes all generated HTML, and returns unresolved keys without fetching anything. It does not accept custom styles, BibTeX, RIS, DOI lookup, or arbitrary URLs. Accepts file input via file_ref — no need to extract file content first.

Citation formatting and bibliography ordering are easy to get subtly wrong; this skill gives agents one bounded, versioned contract.

Reliability

STRICT for the pinned parser, citeproc-java 3.5.0, closed style catalog, locale, and sanitizer. Failures include CITATION_BIBLIOGRAPHY_INVALID, CITATION_KEY_UNRESOLVED, CITATION_STYLE_UNSUPPORTED, CITATION_LOCALE_UNSUPPORTED, MARKDOWN_INVALID_ENCODING, MARKDOWN_COMPLEXITY_LIMIT, and OUTPUT_LIMIT_EXCEEDED.

Context footprint

At most 1000 bibliography items, 2000 citation occurrences, 16384 UTF-8 bytes per free-text field, and 1000000 output bytes. A successful call costs 2 execution credits.

When to use it

When Markdown contains the documented @key citation subset and all CSL-JSON items are already available.

When a custom style, remote lookup, or full Pandoc citation grammar is required.

Powered by citeproc-java 3.5.0 and Squillify's canonical Markdown parser.

Scope

Note
Formats Squillify's bounded Markdown citation subset from CSL-JSON.

Non-goals

  • No arbitrary CSL styles
  • No BibTeX or RIS import
  • No DOI lookup
  • No network access
  • No figure or table numbering

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

document-processingformatting

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call2 credits

File handling

Accepts file_refProduces file_refMax input976.6 KBMax file size488.3 KB

File limits

Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.

LimitValueLimited by
Maximum size per input file488.3 KiBSkill maximum

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify using a self-contained open-source component
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Self contained open source component
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response may contain submitted or transformed content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
markdownstringNoInline Markdown up to 200000 characters. Required unless file_ref is present; omit only when file_ref is present. If both are present, file_ref wins and _meta._input_conflict_resolved reports it.
file_refstringNoTenant-scoped strict UTF-8 Markdown file up to 500000 bytes. When omitted, the inline markdown field is used.
profilestringNocommonmark, gfm, or squillify-safe; defaults to squillify-safe.
themestringNosquillify (default), none, light, dark, or auto. The default embeds the frozen Squillify Design System presentation.
includeCssbooleanNoEmbed the selected scoped Markdown stylesheet; defaults to true. Set false when the host page already provides it.
bibliographyobjectYesRequired {type:'csl_json',items:[...]}; at most 1000 bounded items with unique ids.
stylestringNoOne of apa-7, chicago-author-date, harvard, mla-9, ieee, or nature; defaults to apa-7.
localestringNoClosed locale identifier; version 1 supports en-US only and defaults to en-US.
outputFormatstringNoOnly html is supported in version 1; defaults to html.
includeBibliographybooleanNoInclude formatted bibliography entries; defaults to true.
errorPolicystringNoreport (default) preserves unresolved syntax with warnings; fail rejects the first unresolved key.

Output schema

FieldTypeRequiredDescription
renderedContentstringYesSanitized rendered Markdown HTML.
bibliographyarrayYesFrom 0 through 1,000 closed {id, html} bibliography entry objects in style order.
unresolvedKeysarrayYesFrom 0 through 1,000 unresolved citation-key strings in encounter order.
warningsarrayYesFrom 0 through 1,000 closed unresolved-citation warning objects.
_metaobjectYesClosed receipt containing parser, style, locale, sanitization, and citation-engine provenance.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"markdown.render_citations","input":{"markdown":"Claim [@doe2024].","bibliography":{"type":"csl_json","items":[{"id":"doe2024","type":"article-journal","title":"Example"}]}}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("markdown.render_citations", {"includeCss":false,"bibliography":{"type":"csl_json","items":[{"id":"doe2024","title":"Example","issued":{"date-parts":[[2024]]},"type":"article-journal","author":[{"family":"Doe","given":"Jane"}]}]},"markdown":"Claim [@doe2024]."});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
CITATION_BIBLIOGRAPHY_INVALID400NoThe request payload failed this skill's input validation.
CITATION_KEY_UNRESOLVED400NoThe request payload failed this skill's input validation.
CITATION_STYLE_UNSUPPORTED400NoThe request payload failed this skill's input validation.
CITATION_LOCALE_UNSUPPORTED400NoThe request payload failed this skill's input validation.
MARKDOWN_INVALID_ENCODING400NoThe request payload failed this skill's input validation.
MARKDOWN_COMPLEXITY_LIMIT429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • No arbitrary CSL styles
  • No BibTeX or RIS import
  • No DOI lookup
  • No network access
  • No figure or table numbering
  • Pandoc compatibility
  • Remote bibliography lookup
  • Custom institutional styles

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "markdown.render_citations",
  "input": {
    "includeCss": false,
    "bibliography": {
      "type": "csl_json",
      "items": [
        {
          "id": "doe2024",
          "title": "Example",
          "issued": {
            "date-parts": [
              [
                2024
              ]
            ]
          },
          "type": "article-journal",
          "author": [
            {
              "family": "Doe",
              "given": "Jane"
            }
          ]
        }
      ]
    },
    "markdown": "Claim [@doe2024]."
  }
}

Examples

Render one author-date citation

Inputjson
{
  "includeCss": false,
  "bibliography": {
    "type": "csl_json",
    "items": [
      {
        "id": "doe2024",
        "title": "Example",
        "issued": {
          "date-parts": [
            [
              2024
            ]
          ]
        },
        "type": "article-journal",
        "author": [
          {
            "family": "Doe",
            "given": "Jane"
          }
        ]
      }
    ]
  },
  "markdown": "Claim [@doe2024]."
}
Expected outputjson
{
  "warnings": [],
  "renderedContent": "<article class=\"sqfy-markdown sqfy-markdown-v2 sqfy-theme-squillify sqfy-markdown-citations\"><p>Claim <span class=\"sqfy-citation\">(Doe, 2024)</span>.</p></article>",
  "_meta": {
    "inputBytes": 31,
    "style": "apa-7",
    "theme": "squillify",
    "cssIncluded": false,
    "sanitized": true,
    "profileVersion": "1",
    "parser": "commonmark",
    "parserVersion": "0.24.0",
    "inputChars": 31,
    "nodeCount": 2,
    "styleDigest": "sha256:1ece4fb3c295e66d04b4394e295aa58a87741ceeef1658192437eb9953c2f13e",
    "themeVersion": "sqfy-markdown-v2",
    "profile": "squillify-safe",
    "truncated": false,
    "_input_conflict_resolved": false,
    "locale": "en-US",
    "citationEngineVersion": "3.5.0",
    "citationEngine": "citeproc-java"
  },
  "bibliography": [
    {
      "id": "doe2024",
      "html": "  <div class=\"csl-entry\">Doe, J. (2024). <span>Example</span>.</div>\n"
    }
  ],
  "unresolvedKeys": []
}

Report an unresolved key

Inputjson
{
  "includeBibliography": false,
  "markdown": "Claim [@missing].",
  "bibliography": {
    "type": "csl_json",
    "items": []
  },
  "includeCss": false
}
Expected outputjson
{
  "warnings": [
    {
      "code": "CITATION_KEY_UNRESOLVED",
      "key": "missing",
      "message": "Citation key is not present in the bibliography"
    }
  ],
  "renderedContent": "<article class=\"sqfy-markdown sqfy-markdown-v2 sqfy-theme-squillify sqfy-markdown-citations\"><p>Claim <span class=\"sqfy-citation\">[@missing]</span>.</p></article>",
  "_meta": {
    "inputBytes": 31,
    "style": "apa-7",
    "theme": "squillify",
    "cssIncluded": false,
    "sanitized": true,
    "profileVersion": "1",
    "parser": "commonmark",
    "parserVersion": "0.24.0",
    "inputChars": 31,
    "nodeCount": 2,
    "styleDigest": "sha256:1ece4fb3c295e66d04b4394e295aa58a87741ceeef1658192437eb9953c2f13e",
    "themeVersion": "sqfy-markdown-v2",
    "profile": "squillify-safe",
    "truncated": false,
    "_input_conflict_resolved": false,
    "locale": "en-US",
    "citationEngineVersion": "3.5.0",
    "citationEngine": "citeproc-java"
  },
  "bibliography": [],
  "unresolvedKeys": [
    "missing"
  ]
}
  • Research notes with an explicit bibliography
  • Deterministic reference-list generation

Avoid for

  • Pandoc compatibility
  • Remote bibliography lookup
  • Custom institutional styles

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

formattingmarkdowndocument