kn-template

Generate code from templates with dry-run validation.

234|50|Updated Dec 25, 2025
One-click install
npx skills add https://github.com/knowns-dev/knowns --skill kn-template
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kn-template
Source: https://github.com/knowns-dev/knowns/tree/main/.agent/skills/kn-template
Command: npx skills add https://github.com/knowns-dev/knowns --skill kn-template

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of code from templates to ensure consistent scaffolding across projects.

Core Features & Use Cases

  • List available templates to discover options.
  • Get template details to review prompts, linked docs, and output files.
  • Read linked documentation to understand usage and constraints.
  • Run templates with a dry-run option to validate outputs, then execute for real.
  • Create new templates with description and documentation linkage.
  • Configure templates with prompts and file mappings (name, description, doc, prompts, files).

Quick Start

List templates with mcp__knowns__list_templates({}) Get details with mcp__knowns__get_template({ "name": "<template-name>" }) Read doc with mcp__knowns__get_doc({ "path": "<doc-path>", "smart": true }) Run template (dry-run) with mcp__knowns__run_template({ "name": "<template-name>", "variables": { "name": "MyComponent" }, "dryRun": true }) Run template for real with mcp__knowns__run_template({ "name": "<template-name>", "variables": { "name": "MyComponent" }, "dryRun": false }) Create a new template with mcp__knowns__create_template({ "name": "<template-name>", "description": "Description", "doc": "patterns/<related-doc>" })

Frequently Asked Questions about kn-template

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate boilerplate code from templates for consistent UI components?

You can automate code generation from templates by listing available options, retrieving template details, and executing them with variables. The skill supports dry-run validation to preview outputs before actual file generation, ensuring consistent scaffolding across projects.

What is scaffolding and how does template-based code generation work?

Template-based code generation works by defining reusable file structures, prompts, and variable mappings. You configure a template with documentation links, then execute it to automatically produce consistent boilerplate files across multiple software projects.

Can I validate generated code outputs before writing files to my project?

Yes, you can validate generated code outputs before writing files by using the dry-run capability. You execute the template with the dryRun parameter set to true to preview the generated structure and variables, then run it for real to deploy the files.

How do I create a new template with custom prompts and file mappings?

You create a new template by defining its name, description, and linked documentation path. After creation, you configure the template by defining its interactive prompts and mapping variables to specific output file structures.

Does this code generation tool require any external dependencies?

No, this code generation tool does not require any external dependencies to function. It operates independently to list, retrieve, configure, and execute templates for generating consistent project scaffolding without needing prerequisite libraries.