/meteor:meteor-securityfrom Meteor
Audits and hardens Meteor 3 applications: checks method argument validation, publication userId guards, browser-policy CSP, DDP rate limits, OAuth encryption, and legacy allow/deny patterns.
Ships in Meteor. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Meteor's security model is opinionated: the server holds authority, the client cannot be trusted, and the only places that filter data before it reaches users are methods (write paths) and publications (read paths).
check() every argument and guard on
this.userId or Meteor.userId() when authentication matters?this.userId (when
user-specific) and project columns with fields?audit-argument-checks in dev to catch missing check().browser-policy and configure CSP.DDPRateLimiter rules for sensitive methods (login, password
reset, resource creation).oauthSecretKey to encrypt provider
secrets at rest.deny rules until an equivalent method-only policy is active;
Accounts can add an owner-only profile allowance even without an app
allow rule. See the profile policy below.Check package versions. For 3.4.4/3.5.5/3.6.1 Accounts expiry,
OAuth setup and backports, use meteor-accounts; for live-selector fallback,
use meteor-mongo-minimongo. Security backports do not include every 3.6 feature.
In Meteor 3.6's fixed Accounts pairing, custom users collections receive account
indexes and, when client mutation methods exist, the default owner-only profile
allowance. Configure the collection on both runtimes before installing guards.
Keep Meteor.users.deny({ update: () => true }) on the selected collection when
all client profile writes must be blocked, until an equivalent policy is proven.
defineMutationMethods: false supplies a method-only collection without those
validators; Meteor 3.6 still creates account indexes. Earlier packages require
checking their setup behavior. See meteor-accounts for collection identity,
secondary Accounts instances and package boundaries. Never trust roles stored
in a client-editable profile.
import { Meteor } from "meteor/meteor";
import { check, Match } from "meteor/check";
Meteor.methods({
async updateProfile(payload) {
check(payload, { displayName: String, bio: Match.Optional(String) });
if (!this.userId) {
throw new Meteor.Error("not-authorized");
}
await Meteor.users.updateAsync(this.userId, { $set: { profile: payload } });
},
async updateAddress(payload) {
check(payload, String);
if (!Meteor.userId()) {
throw new Meteor.Error("not-authorized");
}
await Meteor.users.updateAsync(Meteor.userId(), { $set: { address: payload } });
},
});
Reject any method that does not match: check on every argument, userId
gate when needed, Meteor.Error(code, reason) for failures, *Async
Mongo on the server.
Meteor.publish("items.mine", function () {
if (!this.userId) return this.ready();
return Items.find(
{ ownerId: this.userId },
{ fields: { title: 1, qty: 1 }, limit: 200 },
);
});
Reject any publication that returns an unbounded cursor, omits the field projection, or skips a userId filter on user-specific data.
browser-policymeteor add browser-policy
// server top-level or inside Meteor.startup
import { BrowserPolicy } from "meteor/browser-policy-common";
import { Meteor } from "meteor/meteor";
Meteor.startup(async () => {
await BrowserPolicy.content.disallowInlineScripts();
BrowserPolicy.content.disallowEval();
BrowserPolicy.framing.disallow();
});
BrowserPolicy is server-only. Configure it during module initialization or
startup so every request receives one deterministic process-wide policy. The
current implementation invalidates its cached CSP after a mutation, but do not
mutate this global policy per request or per user. See
references/browser-policy-csp.md for recipes (Stripe, Google Maps,
fonts, inline-style allowance).
import { DDPRateLimiter } from "meteor/ddp-rate-limiter";
DDPRateLimiter.addRule(
{
type: "method",
name: "login",
clientAddress: () => true,
},
5,
60000, // 5 attempts per 60s, per IP
);
Only matcher fields contribute to the rate-limit bucket key. Without
clientAddress, connectionId, or userId, every matching caller shares one
global bucket. Meteor 3.5+ permits async matcher functions for database-backed
decisions; keep their queries fast because the connection waits for them. On
Meteor 3.0 through 3.4, matchers must stay synchronous. Use a fixed rule,
precomputed synchronous state, or upgrade rather than awaiting Mongo there.
The default rule (5 in 10s per matched method per DDP connection for login / signup / password
reset) ships with accounts-base. Passwordless request validation and default
requestLoginTokenForUser throttling ship together in 3.6 and backports
3.5.5/3.4.4. Inspect both resolved packages; use meteor-accounts for pairings
and atomic-completion differences. Earlier packages need explicit validation
and abuse protection. Handle callback rate errors without immediate retries. Remove the
default rule with Accounts.removeDefaultRateLimit() only if you replace it.
For cookie hardening on [email protected] (3.6) or the 3.3.2
backport (3.5.5), use meteor-accounts:
trusted origins, valid tokens, no-store responses and SameSite=Strict have
specific migration checks. Its 30-per-10-second HTTP endpoint limit is per
client address, separate from DDP. HttpOnly storage does not stop active
same-origin XSS from obtaining the resume token used for DDP authentication.
Add oauth-encryption and pass a 16-byte base64 key (NOT 32 bytes) to
Accounts.config at module top level (not inside Meteor.startup):
meteor node -e "console.log(require('crypto').randomBytes(16).toString('base64'))"
import { Accounts } from "meteor/accounts-base";
Accounts.config({
oauthSecretKey: Meteor.settings.oauthSecretKey,
});
At startup, accounts-oauth seals an unsealed provider application secret at
ServiceConfiguration.configurations.secret. Provider packages also seal
supported per-user token fields, such as services.github.accessToken or
Twitter's accessTokenSecret. There is no generic
Meteor.users.services.<provider>.secret field. Inspect the provider schema
before asserting which user credential is encrypted.
audit-argument-checksmeteor add audit-argument-checks
Throws if any method or publication runs without check() covering
every argument. Methods that legitimately accept arbitrary input declare
this explicitly:
Meteor.methods({
rawLog(...args) {
check(args, [Match.Any]);
// ...
},
});
Meteor.settings.public.<secret>. The client sees public. Move
secrets to the top level of settings.json.Meteor.users collection. Always project (e.g.
fields: { username: 1, profile: 1 }) and filter. Publish email only to
the owning user or another explicitly authorized audience.BrowserPolicy.content.allowOriginForAll for a third-party script. It
grants the origin to every current content directive. Allow only the script,
frame, connect, image, style, or font directives the integration needs.Accounts.config({ oauthSecretKey }) inside Meteor.startup.
Must be at module top level so it loads before the OAuth packages
read it.references/method-and-publish-guards.mdreferences/browser-policy-csp.mdreferences/eval-cases.mdmeteor-methods, meteor-pubsub, meteor-accounts.What SKILL.md sets; muted values are Claude Code's defaults
17 skills in this plugin
/meteor-accountsUse when wiring up authentication in a Meteor 3 app. Triggers on accounts-password, accounts-base, OAuth (Google, Facebook, GitHub, Apple, Twitter, Meetup, Weibo), accounts-2fa, accounts-passwordless, ServiceConfiguration.configurations.upsertAsync, Accounts.createUserAsync, Accounts.setPasswordAsync, Accounts.forgotPassword, Accounts.resetPassword, Accounts.verifyEmail, useHttpOnlyCookies, clientStorage, Meteor.loginWithPasswordAnd2faCode, email verification, accounts-express, authFetchAllowedOrigins. Use this skill when the user asks about signups, signins, or asks about token storage vs HttpOnly cookies.
/meteor-blazeUse when building or debugging Meteor 3 Blaze interfaces: meteor create --blaze, Spacebars, helpers/events, lifecycle, Tracker, ReactiveVar/ReactiveDict, subscriptions, Promise helpers, #let states, Template.dynamic, Blaze.render, and blaze-hot HMR. Triggers on stale async results, lost reactivity after await, data-context lookup surprises, duplicate DOM integrations, Rspack full reloads, raw HTML in triple braces, jQuery not found, Expected template or null, Template.instance() is null after await, missing event.dataTransfer, Reactive HTML attributes, BLOCKOPEN, TRIPLE template tag, Expected "li" end tag, or Template can't be named. Use this skill when asked about reusable Blaze components, the Blaze PWA scaffold, package/backend selection, Rspack entry imports, or template tests. For Meteor 2 to 3 upgrades, use migrate-to-meteor-3; for unexplained cross-layer failures, meteor-debugging.
npx claudepluginhub meteor/agent-skills --plugin meteorOther plugins' skills for the same job