Pular para o conteúdo
Skillpedia
Automações51 mil · #3417

knap

O que ela faz

Ensina seu agente a renderizar modelos com variáveis, filtros e lógica simples, para que o mesmo layout seja preenchido com dados diferentes. Ela é para quem cria muitas notas ou documentos parecidos.

Quando usar

  • ✓Quando você tiver uma lista de dados e quiser uma nota criada para cada item.
  • ✓Quando quiser um modelo preenchido com valores de um arquivo JSON.
  • ✓Quando quiser que o conteúdo da web seja formatado em uma nota usando um modelo.

Link da skill

https://github.com/kepano/obsidian-skills/blob/main/skills/knap/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/kepano/obsidian-skills/blob/main/skills/knap/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Pode transformar esta lista de títulos de livros em um arquivo CSV em uma nota por livro, usando o meu modelo?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente combina um modelo com os seus dados e produz uma saída em Markdown, impressa ou salva em um arquivo. Ele usa a ajuda embutida da ferramenta para consultar a sintaxe dos modelos.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

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:

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.

Perguntas frequentes

Em que formato os dados precisam estar?

A skill diz que os dados devem ser um objeto JSON, e suas propriedades viram variáveis do modelo.

Ela consegue criar muitos arquivos de uma vez?

Sim. A skill cobre a geração em lote de arquivos Markdown a partir de dados.

Precisa estar instalada?

Sim. Precisa da ferramenta de linha de comando Knap, que a skill manda instalar com npm. Ela exige o Node.js 20 ou mais recente.

Detalhes

Descrição original do autor

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.

repo: kepano/obsidian-skills

Popularidade

Estrelas no GitHub
51 mil
Posição no ranking
#3417
Licença
MIT
Atualizada em
15/09/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas