feathers-schema

feathers-schema is a skill for Claude Code from hassan4702/feathers-plugin. It costs 149 tokens per session (1,355 once invoked), scanned A, original, MIT.

A guide for defining and securing FeathersJS v5 data models with TypeBox, a TypeScript schema library, and four kinds of value-transforming resolvers.

In plain words
What is it for?
Use it when editing a Feathers schema file, adding fields, validating request data or queries, setting defaults, computing values, or shaping public results.
Why use it?
It helps validate incoming data, derive TypeScript types, restrict records users can access, and hide sensitive fields in returned data.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import type { HookContext } from '../../declarations'.

Part of the feathersjs plugin — 4 skills, 1 agent shipped together

Good fit Use it when editing a Feathers schema file, adding fields, validating request data or queries, setting defaults, computing values, or shaping public results.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/hassan4702/feathers-plugin
agentmods
npx agentmods add skills/hassan4702/feathers-plugin/feathers-schema

Made for: Claude Code.

Or install feathersjs, the plugin that ships this one along with the rest of its 4 skills, 1 agent.

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 feathers-schema

README.md
[![agentmods](https://agentmods.dev/badge/skills/hassan4702/feathers-plugin/feathers-schema.svg)](https://agentmods.dev/skills/hassan4702/feathers-plugin/feathers-schema)
Your own site
<a href="https://agentmods.dev/skills/hassan4702/feathers-plugin/feathers-schema"><img src="https://agentmods.dev/badge/skills/hassan4702/feathers-plugin/feathers-schema.svg" alt="Measured on agentmods" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,355 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 original 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.00149 $0.01355
Opus 5 $0.00075 $0.00678
Sonnet 5 $0.00030 $0.00271
Haiku 4.5 $0.00015 $0.00136

Measured 8d ago against content hash 9ea907423ef0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

feathers-schema 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 8d ago.

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/feathers-schema/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FeathersJS Schemas & Resolvers

Schemas and resolvers are database-independent. A schema (TypeBox) defines shape, derives the TS type, and validates. A resolver transforms property values against the hook context. They are applied through the schemaHooks registered in the service file (see feathers-service).

The four kinds — what each is for

  • Result (<name>Resolver): shapes data being returned; the place to populate associations / virtual properties.
  • Data (<name>DataResolver): runs on create/update/patch data before saving; set defaults, computed values, hash passwords, stamp createdAt.
  • Query (<name>QueryResolver): validates/coerces the query string and is the right place to restrict which records a user may touch (row-level security).
  • External (<name>ExternalResolver): produces the safe, outward-facing version — hide sensitive fields here (e.g. password).

Defining the schema

import { resolve, virtual } from '@feathersjs/schema'
import { Type, getValidator, querySyntax } from '@feathersjs/typebox'
import type { Static } from '@feathersjs/typebox'
import type { HookContext } from '../../declarations'
import { dataValidator, queryValidator } from '../../validators'

export const messageSchema = Type.Object(
  {
    id: Type.Number(),            // MongoDB: _id: ObjectIdSchema()
    text: Type.String(),
    createdAt: Type.Number(),
    userId: Type.Number(),
    user: Type.Ref(userSchema)    // associated, populated by a virtual resolver
  },
  { $id: 'Message', additionalProperties: false }
)
export type Message = Static<typeof messageSchema>   // type derived from schema — single source of truth
export const messageValidator = getValidator(messageSchema, dataValidator)

$id must be globally unique. additionalProperties: false rejects unknown fields. Get the TS type with Static<typeof ...> — never hand-maintain a parallel interface.

Useful TypeBox helpers: Type.Optional(...), Type.Pick(schema, [...]), Type.Partial(schema) (for patch), Type.Intersect([...]), Type.Ref(otherSchema) for associations.

Read the full file on GitHub · 121 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. 8d ago First seen · 121 lines · 149 tokens per session scan A 9ea907423ef0

Subscribe to this mod's changes

feathers-schema is a skill published in the GitHub repository hassan4702/feathers-plugin (2 stars, last pushed 3mo ago), licensed MIT. It adds 149 tokens to every session and 1,355 once invoked, about $0.0007 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-08-31.

Related

Other skills, from other repositories

mako-neighborhoods

TRIGGER when: user wants entity-wide context for a table, route, or RPC -- schema + RLS + readers + writers + downstream touches all at once. Covers tableneighborhood, routecontext, rpcneighborhood.

drhalto/agentmako · 48 tokens

cqrs-implementation

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

wshobson/agents · 35 tokens

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 tokens

supabase-cli

This skill should be used when user asks to "use supabase CLI", "supabase init", "supabase start", "run migrations", "deploy edge functions", "manage Supabase project", or works with the supabase command-line tool for local development and project management.

fcakyon/claude-codex-settings · 60 tokens

supabase-js

This skill should be used when user asks to "use supabase-js", "query Supabase database", "supabase auth", "supabase storage", "supabase realtime", "supabase edge functions", or works with the @supabase/supabase-js JavaScript/TypeScript SDK.

fcakyon/claude-codex-settings · 64 tokens

architect/data-api-design

A guide to designing data models and application programming interfaces (APIs), which are the rules software uses to exchange data.

echoVic/boss-skill · 26 tokens