pandoc-9-lua-filters
Sub-skill of pandoc: 9. Lua Filters.
Best use case
pandoc-9-lua-filters is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of pandoc: 9. Lua Filters.
Teams using pandoc-9-lua-filters should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/9-lua-filters/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How pandoc-9-lua-filters Compares
| Feature / Agent | pandoc-9-lua-filters | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of pandoc: 9. Lua Filters.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 9. Lua Filters
## 9. Lua Filters
```lua
-- filters/word-count.lua
-- Count words in document
local word_count = 0
function Str(el)
word_count = word_count + 1
return el
end
function Pandoc(doc)
print("Word count: " .. word_count)
return doc
end
```
```lua
-- filters/uppercase-headers.lua
-- Convert all headers to uppercase
function Header(el)
return pandoc.walk_block(el, {
Str = function(s)
return pandoc.Str(string.upper(s.text))
end
})
end
```
```lua
-- filters/remove-links.lua
-- Remove all hyperlinks, keeping text
function Link(el)
return el.content
end
```
```lua
-- filters/custom-blocks.lua
-- Convert custom div blocks to styled output
function Div(el)
if el.classes:includes("warning") then
-- For LaTeX output
local latex_begin = pandoc.RawBlock('latex',
'\\begin{tcolorbox}[colback=yellow!10,colframe=orange]')
local latex_end = pandoc.RawBlock('latex', '\\end{tcolorbox}')
table.insert(el.content, 1, latex_begin)
table.insert(el.content, latex_end)
return el.content
end
if el.classes:includes("info") then
local latex_begin = pandoc.RawBlock('latex',
'\\begin{tcolorbox}[colback=blue!5,colframe=blue!50]')
local latex_end = pandoc.RawBlock('latex', '\\end{tcolorbox}')
table.insert(el.content, 1, latex_begin)
table.insert(el.content, latex_end)
return el.content
end
end
```
```lua
-- filters/include-files.lua
-- Include content from external files
function CodeBlock(el)
if el.classes:includes("include") then
local file = io.open(el.text, "r")
if file then
local content = file:read("*all")
file:close()
-- Get file extension for syntax highlighting
local ext = el.text:match("%.(%w+)$")
local lang = ext or ""
return pandoc.CodeBlock(content, {class = lang})
end
end
end
```
```bash
# Use Lua filters
pandoc document.md -o document.pdf \
--lua-filter=filters/uppercase-headers.lua \
--lua-filter=filters/custom-blocks.lua
# Chain multiple filters
pandoc document.md -o document.pdf \
--filter pandoc-crossref \
--lua-filter=filters/custom-blocks.lua \
--citeproc
```Related Skills
pandoc-subsection
Sub-skill of pandoc: Subsection.
pandoc-integration-with-git-hooks
Sub-skill of pandoc: Integration with Git Hooks (+1).
pandoc-7-citations-and-bibliography
Sub-skill of pandoc: 7. Citations and Bibliography (+1).
pandoc-5-custom-latex-templates
Sub-skill of pandoc: 5. Custom LaTeX Templates (+1).
pandoc-2-image-management
Sub-skill of pandoc: 2. Image Management (+2).
pandoc-11-makefile-for-document-projects
Sub-skill of pandoc: 11. Makefile for Document Projects (+1).
pandoc-10-batch-conversion-scripts
Sub-skill of pandoc: 10. Batch Conversion Scripts.
pandoc-1-basic-format-conversion
Sub-skill of pandoc: 1. Basic Format Conversion (+3).
docx-extract-text-with-pandoc
Sub-skill of docx: Extract Text with Pandoc (+2).
test-oversized-skill
A test fixture skill that exceeds 200 lines with multiple H2/H3 sections for split testing.
interactive-report-generator
Generate interactive HTML reports with Plotly visualizations from data analysis results. Supports dashboards, charts, and professional styling.
data-validation-reporter
Generate interactive validation reports with quality scoring, missing data analysis, and type checking. Combines Pandas validation, Plotly visualization, and YAML configuration for comprehensive data quality reporting.