Agent skill

Koapp Model

by AxiosLeo in AxiosLeo/node-koapp

Validate and serialize structured data with the @axiosleo/koapp Model class powered by validatorjs.

MITAuto-check passedMarketing & SEO

Install Koapp Model

skills CLI
$ npx skills add AxiosLeo/node-koapp --skill koapp-model -a claude-code

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

GitHub CLI
$ gh skill install AxiosLeo/node-koapp koapp-model --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/AxiosLeo/node-koapp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/assets/skills/koapp-model .claude/skills/koapp-model && 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
koapp-model
GitHub stars
145
Token cost
~1.6k tokens
SKILL.md length
408 words
Files
2
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Validate and serialize structured data with the @axiosleo/koapp Model class powered by validatorjs.

  • Creating typed payload objects
  • SKILL.md covers Import, Constructor, Static helper and Instance methods, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Running rules like required/integer/email/min/max

What it does

Koapp Model is an agent skill from AxiosLeo/node-koapp. Validate and serialize structured data with the @axiosleo/koapp Model class powered by validatorjs. Use when creating typed payload objects, running rules like required/integer/email/min/max, converting between JSON and plain objects, listing properties, or automatically raising HttpError(400) on validation failure inside a koapp handler.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `examples.md`).

It sits in Marketing & SEO, covering Schema markup. The repository describes itself as: About Design for quickly developing OpenAPI applications using Node.js. The licence is MIT.

When your agent uses it

  • Creating typed payload objects
  • Running rules like required/integer/email/min/max
  • Converting between JSON and plain objects
  • Listing properties

Example prompts

  • “/koapp-model”

What it can do on your machine

Read from SKILL.md and the folder at commit 102955d. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

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

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    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

Koapp Model loads about 1.6k tokens when it runs. Until then it costs about 88 tokens; SKILL.md has 408 words of instructions outside code blocks.

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

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 AxiosLeo/node-koapp at commit 102955d, republished under its MIT licence (© AxiosLeo). 408 words, ~1,559 tokens.

Download SKILL.mdSave it as .claude/skills/koapp-model/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
koapp-model
description
Validate and serialize structured data with the @axiosleo/koapp Model class powered by validatorjs. Use when creating typed payload objects, running rules like required/integer/email/min/max, converting between JSON and plain objects, listing properties, or automatically raising HttpError(400) on validation failure inside a koapp handler.

@axiosleo/koapp Model

Source: src/model.js.

Model is a lightweight data container around validatorjs. It assigns incoming fields onto itself, optionally validates them, and provides utility methods for serialization.

Import

javascript
const { Model } = require('@axiosleo/koapp');

Constructor

javascript
new Model(obj?, rules?, messages?);
ArgTypePurpose
objobjectSource data; each key is copied onto the instance via Object.assign
rulesRulesvalidatorjs rule set, e.g. `{ name: 'required
messagesErrorMessagesCustom error messages keyed by rule, e.g. { required: 'The :attribute is required.' }

When rules are provided and validation fails, the constructor throws HttpError(400, <first-error-message>). Inside a koapp handler that translates to a standard 400 response without any extra plumbing.

Static helper

javascript
Model.create(obj, rules, messages);

Shortcut for new Model(obj, rules, messages) that benefits from subclass context (same as new this(...)).

Instance methods

MethodReturnsNotes
toJson()stringJSON.stringify(this)
toObj()objectJSON.parse(this.toJson()); strips class identity
properties()string[]Enumerable own keys
count()numberproperties().length
validate(rules, messages?)ValidatorRuns validatorjs manually and returns the raw Validator object

validate() does not throw - use it when you need the full error map:

javascript
const m = new Model({ email: 'not-an-email' });
const v = m.validate({ email: 'required|email' });
if (v.fails()) {
  console.log(v.errors.all()); // { email: ['The email format is invalid.'] }
}

Extending Model

javascript
class UserModel extends Model {
  constructor(data) {
    super(data, {
      name: 'required|string',
      email: 'required|email',
      age: 'integer|min:0'
    }, {
      required: 'The :attribute field is required.'
    });
  }

  greet() {
    return `Hi, ${this.name}`;
  }
}

const user = new UserModel(context.body);
// If the body fails validation, HttpError(400, ...) is thrown automatically.

When user is created successfully, user.name, user.email, user.age are all available, plus any custom methods.

Validation rules cheat sheet

Common rules from validatorjs:

required            - present and non-empty
string              - typeof === 'string'
integer             - integer number (accepts strings that parse)
numeric             - finite number (accepts strings)
boolean             - true/false/0/1/'0'/'1'/'true'/'false'
email               - RFC-style email
url                 - absolute URL
in:a,b,c            - value in enumerated list
not_in:a,b,c        - value not in list
min:N               - string length / number value ≥ N
max:N               - string length / number value ≤ N
between:a,b         - inclusive range
size:N              - exact length / value
regex:/pat/         - matches regex
array               - is an array
alpha               - letters only
alpha_num           - letters or digits
alpha_dash          - letters, digits, _, -
required_if:field,value
required_unless:field,value
confirmed           - pairs with `<field>_confirmation`
date                - parseable date

Combine with |: required|string|min:3|max:64.

Nesting Models

Model instances serialize via JSON, so nesting works naturally:

javascript
const address = new Model({
  street: '1 Main St',
  city: 'Springfield'
});

const user = new Model({
  name: 'Alice',
  address
});

console.log(user.toObj());
// { name: 'Alice', address: { street: '1 Main St', city: 'Springfield' } }
console.log(user.properties()); // ['name', 'address']
console.log(user.count());      // 2

Note that toObj() returns plain objects - class identity is stripped, so user.toObj().address instanceof Model === false.

Validating without Model

If you only need to validate a payload once without persisting an instance, Model.create(data, rules) and discard the return value:

javascript
router.post('/login', async (context) => {
  Model.create(context.body, {
    email: 'required|email',
    password: 'required|min:8'
  });
  // Reaches here only if validation passes
  const { success } = require('@axiosleo/koapp');
  success({ ok: true });
});
Show full SKILL.md (173 more words)Show less

Comparison with router-level validators

Router validatorsModel validation
Declarative, lives next to the routeImperative, lives in code
Fields split into params / query / bodyArbitrary object shape
Runs automatically before the handlerRuns where you call it
Limited to the request payloadCan be reused for DB rows, intermediate data, etc.

Use router validators for request shape enforcement, and Model when you need to pass the validated data around or serialize it.

Common pitfalls

  • Validators that look at missing fields (e.g. integer) still pass when the field is absent unless paired with required.
  • The 400 message is the first failing rule's message; the others are discarded. Use model.validate(...) manually if you need all errors.
  • Object.assign (used in the constructor) copies own enumerable properties; prototype getters/setters on obj are not preserved.
  • toObj() and toJson() include all own properties. If you want to hide fields, delete them before serialization or implement a custom toJSON().

See also

  • Response helpers used after a successful Model.create: koapp-response
  • Validating fields declaratively on the route: koapp-router
  • Concrete model recipes: examples.md

© AxiosLeo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in assets/skills/koapp-model of AxiosLeo/node-koapp.

  • SKILL.md
  • examples.md

Open the folder on GitHubat commit 102955d

Compare with similar skills

Koapp Model 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.

Koapp Model compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Koapp Model this skillAxiosLeo/node-koapp145—~1.6kAutomated safety check: PassMIT
SEO GeoReScienceLab/opc-skills1.8k4 repos~2.1kAutomated safety check: PassApache-2.0
GEO-First SEO Audit Toolzubair-trabzada/geo-seo-claude11k—~2.8kAutomated safety check: NotesMIT
Portaljs Add Dcatdatopian/portaljs2.4k1 repos~1.8kAutomated safety check: PassMIT
Schema Markupfreekmurze/dotfiles1k15 repos~1.2kAutomated safety check: PassNone
SEO Optimizerailabs-393/ai-labs-claude-skills4541 repos~3.2kAutomated safety check: PassMIT

Similar skills

  • SEO Geo

    ReScienceLab/opc-skills

    SEO & GEO (Generative Engine Optimization) for websites. An agent skill from ReScienceLab/opc-skills.

    1.8k GitHub starsUsed in 4 repos~2.1k tokens
    Marketing & SEOAuto-check passed
  • GEO-First SEO Audit Tool

    zubair-trabzada/geo-seo-claude

    Audits a website for AI search visibility across ChatGPT, Claude, Perplexity and Google AI Overviews while checking traditional SEO, schema and E-E-A-T content quality.

    11k GitHub stars~2.8k tokensUpdated yesterday
    Marketing & SEOAuto-check: notes
  • Portaljs Add Dcat

    datopian/portaljs

    Make a PortalJS portal harvestable by national/EU/US open-data portals — emit standards-compliant DCAT catalog feeds (DCAT 2/3, DCAT-AP, DCAT-US, national profiles) in JSON-LD, Turtle, and RDF/XML…

    2.4k GitHub starsUsed in 1 repo~1.8k tokens
    Marketing & SEOAuto-check passed
  • Schema Markup

    freekmurze/dotfiles

    When the user wants to add, fix, or optimize schema markup and structured data on their site.

    1k GitHub starsUsed in 15 repos~1.2k tokens
    Marketing & SEOAuto-check passed
  • SEO Optimizer

    ailabs-393/ai-labs-claude-skills

    This skill should be used when analyzing HTML/CSS websites for SEO optimization, fixing SEO issues, generating SEO reports, or implementing SEO best practices.

    454 GitHub starsUsed in 1 repo~3.2k tokens
    Marketing & SEOAuto-check passed
  • Geo

    liangdabiao/GEO-Content-Optimizer-Skill

    完整的 GEO(生成式引擎优化)服务流水线:给一个产品官网 URL 和介绍材料, 做站点诊断与 AI 答案采样、生成带验收标准的执行工单、产出可直接部署的资产 (llms.txt / JSON-LD / 定义块 / FAQ / 内容大纲与初稿)、自动验收工单是否闭环、 并打包成可直接发给客户的交付物。可按周期复跑,做长期 GEO 运营与月报。

    203 GitHub starsUsed in 1 repo~2.3k tokens
    Marketing & SEOAuto-check: notes

More from AxiosLeo/node-koapp

All 8 skills in this repo
  • Koapp

    AxiosLeo/node-koapp

    Overview of the @axiosleo/koapp framework - a Koa-based web, TCP socket, and WebSocket framework for Node.js.

    145 GitHub stars~1.3k tokensUpdated 22 days ago
    Auto-check passed
  • Koapp Apps

    AxiosLeo/node-koapp

    Choose and configure the right @axiosleo/koapp Application class - KoaApplication for HTTP, SocketApplication for TCP sockets, WebSocketApplication for WebSocket.

    145 GitHub stars~1.2k tokensUpdated 22 days ago
    Auto-check passed
  • Koapp Controller

    AxiosLeo/node-koapp

    Organize route handlers into reusable classes by extending the @axiosleo/koapp Controller base class.

    145 GitHub stars~1.3k tokensUpdated 22 days ago
    Auto-check passed
  • Koapp Response

    AxiosLeo/node-koapp

    Send structured responses from @axiosleo/koapp handlers using success/failed/result/response/error helpers and HttpError/HttpResponse classes.

    145 GitHub stars~1.5k tokensUpdated 22 days ago
    Auto-check passed
  • Koapp Router

    AxiosLeo/node-koapp

    Define routes, path parameters, validators, and nested routers with the @axiosleo/koapp Router class.

    145 GitHub stars~1.6k tokensUpdated 22 days ago
    Auto-check passed
  • Koapp Sse

    AxiosLeo/node-koapp

    Stream Server-Sent Events (SSE) from a @axiosleo/koapp Koa route using the KoaSSEMiddleware.

    145 GitHub stars~1.5k tokensUpdated 22 days ago
    Auto-check passed

Categories

Questions about Koapp Model

What does Koapp Model do?

Validate and serialize structured data with the @axiosleo/koapp Model class powered by validatorjs. Koapp Model is an agent skill from AxiosLeo/node-koapp. Validate and serialize structured data with the @axiosleo/koapp Model class powered by validatorjs.

When should I use Koapp Model?

Koapp Model fits situations like: creating typed payload objects; running rules like required/integer/email/min/max; converting between JSON and plain objects; listing properties.

How do I install Koapp Model in Claude Code?

Run `npx skills add AxiosLeo/node-koapp --skill koapp-model -a claude-code`. Or copy the skill folder (assets/skills/koapp-model in AxiosLeo/node-koapp) into .claude/skills/koapp-model in your project. Claude Code loads it when a task matches its description.

How do I install Koapp Model in Codex?

Run `npx skills add AxiosLeo/node-koapp --skill koapp-model -a codex`. Or copy the skill folder (assets/skills/koapp-model in AxiosLeo/node-koapp) into .agents/skills/koapp-model in your project. Codex loads it when a task matches its description.

Can I use Koapp Model 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 AxiosLeo/node-koapp --skill koapp-model -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/koapp-model, .gemini/skills/koapp-model, .github/skills/koapp-model and .opencode/skills/koapp-model in your project.

What does Koapp Model need to run?

SKILL.md names no scripts, command-line tools or credentials: Koapp Model is instructions for the agent only.

Does Koapp Model access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Koapp Model 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 Koapp Model use?

Koapp Model 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 Koapp Model use?

About 1.6k tokens (SKILL.md is roughly 6.2k 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 Koapp Model?

Skills that share tags, products or a category with Koapp Model: SEO Geo (ReScienceLab/opc-skills, 1.8k stars), GEO-First SEO Audit Tool (zubair-trabzada/geo-seo-claude, 11k stars), Portaljs Add Dcat (datopian/portaljs, 2.4k stars) and Schema Markup (freekmurze/dotfiles, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Koapp Model?

AxiosLeo (a GitHub user) maintains it in AxiosLeo/node-koapp, which has 145 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 16, 2026.

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