knap

knap is a skill for Claude Code, Codex from guanyang/open-agent-hub. It costs 50 tokens per session (900 once invoked), scanned A, original, MIT.

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.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install with agentmods
npx agentmods add skills/guanyang/open-agent-hub/knap
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add guanyang/open-agent-hub --skill knap
Clone the repo
git clone --depth 1 https://github.com/guanyang/open-agent-hub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for knap

README.md
[![agentmods](https://agentmods.dev/badge/skills/guanyang/open-agent-hub/knap/github.svg)](https://agentmods.dev/skills/guanyang/open-agent-hub/knap)
Your own site
<a href="https://agentmods.dev/skills/guanyang/open-agent-hub/knap"><img src="https://agentmods.dev/badge/skills/guanyang/open-agent-hub/knap/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for knap

Your own site · 80×15
<a href="https://agentmods.dev/skills/guanyang/open-agent-hub/knap"><img src="https://agentmods.dev/badge/skills/guanyang/open-agent-hub/knap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 900 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.00900
Opus 5 $0.00025 $0.00450
Sonnet 5 $0.00010 $0.00180
Haiku 4.5 $0.00005 $0.00090

Measured today against content hash ef5666573358, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

knap scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/knap/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on 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.

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 103 lines · 50 tokens per session scan A ef5666573358

Subscribe to this mod's changes

knap is a skill published in the GitHub repository guanyang/open-agent-hub (967 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 900 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-12.

Related

Other skills, from other repositories

voice-extractor

Capture a user's real writing voice from 5-20 prior samples, store a local voice.yaml fingerprint, and enforce it on newsjack drafts so AI tells disappear. Measures voice with named stylometry lenses (Burrows's Delta function-word vector, MATTR lexical diversity, sentence-length burstiness, Biber Dimension-1 register…

elvisun/newsjack · 90 tokens

agent-generator

An agent-definition generator that turns a user's description of an agent's responsibilities into a Markdown file. It first checks existing agents to avoid overlapping work.

majiayu000/claude-skill-registry · 82 tokens

agent-deck

Terminal session manager for AI coding agents. Use when user mentions "agent-deck", "session", "sub-agent", "MCP attach", or needs to (1) create/start/stop/restart/fork sessions, (2) attach/detach MCPs, (3) manage groups/profiles, (4) get session output, (5) configure agent-deck, (6) troubleshoot issues, or (7) launch…

majiayu000/claude-skill-registry · 113 tokens

agent-estate

Perpetual autonomous work loop for Claude Code — no end condition, no memory regression, no context overfill. Maintains a persistent ledger across all sessions.

majiayu000/claude-skill-registry · 36 tokens

press-clip

Turn a live article URL into a press clip that looks like the real coverage — the publication's own logo, fonts, photos and layout kept intact, the ads and clutter removed, and (for a roundup) just the client's section. Renders to PDF. You inspect each site and tailor the removal; the bundled script carries no…

elvisun/newsjack · 74 tokens

ac-handoff-creator

Create handoff packages for session transitions. Use when ending sessions, preparing for continuation, saving session state, or creating resumable context.

majiayu000/claude-skill-registry · 33 tokens