Knap
SkillFiles & storageKnap is a skill that has an AI agent render Markdown from templates and structured data using the Knap CLI. It turns JSON or CSV data into notes, batch-generates one file per row or record, and can format Defuddle output into a note. Templates support variables, filters, and logic, and output files are written to disk.
Then ask your AI: use the Knap skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Install Node.js 20 or later, then install the CLI with npm install -g knap, or use npx knap.
What your AI can do with it
- Render a Markdown template with JSON variables using knap render
- Batch-generate one Markdown file per row or record from CSV or JSON
- Use variables, filters, and logic such as {{ variable }} and {% if %}
- Validate a template before rendering with knap validate
- Pipe Defuddle web page JSON into a formatted note
- Override variables with --set or pipe JSON data through stdin
Getting started
- Install Node.js 20 or later, then install the CLI with npm install -g knap, or use npx knap.
- Run knap --help to see available commands and options.
- Learn the template language through the offline reference, for example knap help syntax and knap help filters.
- Write a template file using variables, filters, and logic, and prepare a JSON object as data.
- Render with knap render template.md --data article.json -o note.md, or validate first with knap validate template.md.
What this skill tells your AI
The instructions your AI receives, as published by kepano/obsidian-skills in skills/knap/SKILL.md and read by Ahel’s review.
Use Knap CLI to render Markdown templates with variables, filters, and logic.
If not installed: npm install -g knap (requires Node.js 20 or later). Alternatively, use npx knap.
Run knap --help for available commands and options. Discover the language through the CLI's offline reference:
knap help syntax
knap help filters
knap help filter date
knap help tags
knap help tag for
Use the lists to find names, then request individual help for syntax, parameters, and examples with expected output.
Usage
Render a template with JSON variables:
knap render template.md --data article.json -o note.md
Supply a template and data inline:
knap render -t '# {{ title | trim }}' --data-json '{"title":"Hello"}'
Override a variable or pipe JSON data:
knap render template.md --data article.json --set 'title=Custom title'
cat article.json | knap render template.md --data -
Data must be a JSON object; its properties become template variables. --set overrides literal top-level keys with strings. Use JSON for nested objects, arrays, numbers, and booleans.
Choose one template source (file, -t, or stdin) and one data source (--data or --data-json). Only one input can read stdin. Without a template file or -t, Knap reads the template from stdin.
Output defaults to stdout. -o creates parent directories and overwrites the destination after rendering succeeds. Errors exit with status 1; diagnostics go to stderr. Warnings can accompany successful output.
Templates
Use {{ variable }} for values, | for filters, and {% ... %} for logic. For example, save this as template.md:
---
{{ title | yaml_property:"title" }}
{{ tags | yaml_property:"tags" }}
---
# {{ title | trim }}
{% if author %}
By {{ author }}
{% endif %}
{{ content }}
Use yaml_property for complete frontmatter properties so values are quoted and indented correctly. The CLI includes standard filters, but does not supply Web Clipper browser variables, selectors, prompts, or DOM-dependent HTML filters. Supply variables through JSON.
Check a template before rendering:
knap validate template.md
Validation checks syntax, filter names, and static filter arguments without data or file output. It does not check variable existence, runtime values, or dynamic arguments; render with real data to check runtime behavior. Diagnostics go to stderr and include relevant help commands.
Defuddle pipeline
Extract a web page as JSON with Markdown content, then render it into a note:
defuddle parse https://example.com/article --md --json \
| knap render template.md --data - -o note.md
Defuddle's JSON properties, such as title and content, become template variables directly.
Batch rendering
Create one file per CSV row, JSON array object, or JSON file in a folder:
knap batch template.md --data articles.csv --output-dir notes \
--filename '{{ title | safe_name }}.md'
Use --data articles.json for an array or --data ./articles for a folder of JSON objects. CSV headers become variable names and values remain strings. Piped data defaults to JSON; add --format csv for piped CSV.
Use --dry-run to validate and list output paths without writing files. Existing files require --overwrite, including during a dry run. Duplicate output names within a batch are errors even with --overwrite.
Filename templates must produce a single filename with its extension, without directories. Use safe_name for data-derived names. Without --filename, Knap preserves source JSON basenames or numbers CSV rows and array items as 1.md, 2.md, and so on.
Signals
- GitHub stars
- 49k
- Forks
- 4k
- Last commit
- Sep 2026
Ahel review
K1binfo
installs-packages
Automated review, not a security audit. Ruleset v1+k2.
Others that do the same job
Questions
- How do I apply a Knap template?
- Run knap render with a template source and a data source, for example knap render template.md --data article.json -o note.md. Choose one template source (file, -t, or stdin) and one data source (--data or --data-json).
- How do I turn JSON or CSV data into notes?
- Supply the data as a JSON object whose properties become template variables, then render the template. For CSV or JSON records, batch-generate one file per row or record. Use --set to override literal top-level keys with strings.
Advanced
- Item type
- skill
- Key
knap-kepano- Source
- github.com/kepano/obsidian-skills
github.com/kepano/obsidian-skills
Related picks
Skill · thedaviddias
The pick for JavaScriptmodern-javascript-patterns
Skill · sickn33
The pick for JavaScriptlark-markdown
Skill · larksuite
The pick for Markdownmarkdown-formatter
Skill · nvidia
The pick for Markdownpptx
Skill · anthropics
More in Files & storagedocx
Skill · anthropics
More in Files & storage