Agent skill

Knap Markdown Templates

by kepano in kepano/obsidian-skills

Renders Markdown notes from Knap templates and JSON data on the command line, including notes built from Defuddle web page output.

MITAuto-check passedDocuments & Office

Install Knap Markdown Templates

skills CLI
$ npx skills add kepano/obsidian-skills --skill knap -a claude-code

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

GitHub CLI
$ gh skill install kepano/obsidian-skills knap --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/kepano/obsidian-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/knap .claude/skills/knap && 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
knap
GitHub stars
49k
Used in
2 other repos
Token cost
~986 tokens
SKILL.md length
420 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Renders Markdown notes from Knap templates and JSON data on the command line, including notes built from Defuddle web page output.

  • Applying a Knap template to an article or record stored as JSON
  • SKILL.md covers Usage, Templates, Defuddle pipeline and Batch rendering
  • Calls npm and npx
  • Turning rows of JSON or CSV data into a set of Markdown notes

What it does

Knap is a command line tool that fills Markdown templates using variables, filters and logic blocks. The skill shows the agent how to call `knap render` with a template file, inline template text or stdin, and how to pass data as a JSON file, inline JSON or piped input. Single values can be overridden with `--set`, and `-o` writes the result to a file, creating parent folders as needed.

Before rendering, the agent can run `knap validate` to check template syntax, filter names and fixed filter arguments, then render with real data to catch runtime problems. Frontmatter properties go through the `yaml_property` filter so values are quoted correctly. The CLI has no Web Clipper browser variables or DOM-based HTML filters, so everything comes from the JSON you supply, and the built-in `knap help` pages document syntax and filters offline.

When your agent uses it

  • Applying a Knap template to an article or record stored as JSON
  • Turning rows of JSON or CSV data into a set of Markdown notes
  • Formatting the JSON output of a Defuddle page extraction as a note
  • Checking that a Knap template has valid syntax before using it

Example prompts

  • “Render templates/book.md with data/book.json and save it to notes/book.md.”
  • “Turn every row of reading-list.csv into its own Markdown note using my Knap template.”
  • “Validate my article template with Knap and tell me which filter names are wrong.”
  • “Extract this blog post with Defuddle and render it into a note using the clipping template.”

Requirements

  • Node.js 20 or later
  • The Knap CLI (`npm install -g knap` or `npx knap`)

What it can do on your machine

Read from SKILL.md and the folder at commit 3ccff53. 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:

    • npm
    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use npm and npx, which can reach the network depending on how they are called.

    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

Knap Markdown Templates loads about 986 tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 420 words of instructions outside code blocks.

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

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 kepano/obsidian-skills at commit 3ccff53, republished under its MIT licence (© kepano). 420 words, ~986 tokens.

Download SKILL.mdSave it as .claude/skills/knap/SKILL.md (or your agent's skills folder).
name
knap
description
Render Markdown from templates and structured data using Knap CLI. Use when the user asks to apply a Knap template, turn JSON or CSV data into notes, batch-generate Markdown files, or format Defuddle output into a note.

Knap

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:

bash
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:

bash
knap render template.md --data article.json -o note.md

Supply a template and data inline:

bash
knap render -t '# {{ title | trim }}' --data-json '{"title":"Hello"}'

Override a variable or pipe JSON data:

bash
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:

knap
---
{{ 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:

bash
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.

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

Defuddle pipeline

Extract a web page as JSON with Markdown content, then render it into a note:

bash
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:

bash
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.

© kepano, 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 skills/knap of kepano/obsidian-skills.

Open the folder on GitHubat commit 3ccff53

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in kepano/obsidian-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Knap Markdown Templates 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.

Knap Markdown Templates compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Knap Markdown Templates this skillkepano/obsidian-skills49k2 repos~986Automated safety check: PassMIT
Obsidian MarkdownKevRojo/Dulus153—~1.4kAutomated safety check: PassGPL-3.0
EPUB to HyperCard Obsidiantwhsi/skills259—~1kAutomated safety check: PassNone
Obsidian MarkdownAtmosphere/atmosphere3.8k20 repos~1.3kAutomated safety check: PassApache-2.0
Luhmann Note Numberertwhsi/skills259—~1.5kAutomated safety check: PassNone
Obsidian Markdown SyntaxAgriciDaniel/claude-obsidian15k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Obsidian Markdown

    KevRojo/Dulus

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    153 GitHub stars~1.4k tokensUpdated 6 days ago
    Documents & OfficeAuto-check passed
  • Converts an EPUB card book into an Obsidian folder with one Markdown file per card, keyword cards, navigation links and an optional shareable zip.

    259 GitHub stars~1k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Obsidian Markdown

    Atmosphere/atmosphere

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    3.8k GitHub starsUsed in 20 repos~1.3k tokens
    Documents & OfficeAuto-check passed
  • Assigns and checks Luhmann-style codes for book manuscript notes and Obsidian card folders without renumbering existing notes.

    259 GitHub stars~1.5k tokensUpdated 2 mo ago
    Knowledge ManagementAuto-check passed
  • Obsidian Markdown Syntax

    AgriciDaniel/claude-obsidian

    Explains, drafts and validates Obsidian Flavored Markdown such as properties, wikilinks, embeds, callouts and Mermaid, with vault edits applied through approved transactions.

    15k GitHub stars~1.1k tokensUpdated 28 days ago
    Knowledge ManagementAuto-check passed
  • Experiment Log Standardizer

    Yuan1z0825/nature-skills

    Turns uploaded photos, voice notes, text or local files into standardized experiment logs in Markdown with YAML frontmatter, optionally through Feishu CLI and Obsidian.

    47k GitHub starsUsed in 2 repos~942 tokens
    Research & ScienceAuto-check passed

More from kepano/obsidian-skills

  • Defuddle

    kepano/obsidian-skills

    Uses the Defuddle CLI to pull clean, readable Markdown, JSON or metadata from web pages, stripping navigation, ads and clutter to save tokens.

    49k GitHub starsUsed in 11 repos~208 tokens
    Auto-check passed

Questions about Knap Markdown Templates

What does Knap Markdown Templates do?

Renders Markdown notes from Knap templates and JSON data on the command line, including notes built from Defuddle web page output. Knap is a command line tool that fills Markdown templates using variables, filters and logic blocks. The skill shows the agent how to call `knap render` with a template file, inline template text or stdin, and how to pass data as a JSON file, inline JSON or piped input.

When should I use Knap Markdown Templates?

Knap Markdown Templates fits situations like: applying a Knap template to an article or record stored as JSON; turning rows of JSON or CSV data into a set of Markdown notes; formatting the JSON output of a Defuddle page extraction as a note; checking that a Knap template has valid syntax before using it.

How do I install Knap Markdown Templates in Claude Code?

Run `npx skills add kepano/obsidian-skills --skill knap -a claude-code`. Or copy the skill folder (skills/knap in kepano/obsidian-skills) into .claude/skills/knap in your project. Claude Code loads it when a task matches its description.

How do I install Knap Markdown Templates in Codex?

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

Can I use Knap Markdown Templates 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 kepano/obsidian-skills --skill knap -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/knap, .gemini/skills/knap, .github/skills/knap and .opencode/skills/knap in your project.

What does Knap Markdown Templates need to run?

Going by SKILL.md and its folder, Knap Markdown Templates needs the command-line tools its instructions call (npm and npx). Our summary lists: Node.js 20 or later; The Knap CLI (`npm install -g knap` or `npx knap`).

Does Knap Markdown Templates access the network?

SKILL.md contains no URLs. Its commands use npm and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Knap Markdown Templates 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 Knap Markdown Templates use?

Knap Markdown Templates 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 Knap Markdown Templates use?

About 986 tokens (SKILL.md is roughly 3.9k 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 Knap Markdown Templates?

Skills that share tags, products or a category with Knap Markdown Templates: Obsidian Markdown (KevRojo/Dulus, 153 stars), EPUB to HyperCard Obsidian (twhsi/skills, 259 stars), Obsidian Markdown (Atmosphere/atmosphere, 3.8k stars) and Luhmann Note Numberer (twhsi/skills, 259 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Knap Markdown Templates?

kepano (a GitHub user) maintains it in kepano/obsidian-skills, which has 49,313 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 15, 2026.

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