ArkType
Skill3 starsChanged 3 months agoMITView on GitHub
This skill explains how to use ArkType, a validation library for TypeScript. Read this skill when writing validation logic using ArkType.
- Installs packages
4 other projects use a version of this.
Adopted by
Most recently taken up by
- epicenter-md/epicentertheir own version, first seen Oct 8, 2026
- EpicenterHQ/epicentertheir own version, first seen Oct 8, 2026
- lobomfz/skillstheir own version, first seen Apr 28, 2026
- eralmansouri/arktype-claude-plugintheir own version, first seen Jan 19, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- eralmansouri/arktype-claude-plugin★ 2same name
- lobomfz/skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- cleanup-changesSkill
- identify-search-maintenanceSkill
- prove-it-diagnosticsSkill
- review-loopSkill
- simple-engineeringSkill
- web-masterSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
If ArkType is not yet present in the project's dependencies, you can install it with npm install arktype.
- Distinctive: line 100
If you don't need the full features of ArkType and only want to use type-safe regular expressions, you can use ArkRegex.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ArkType
This skill explains how to use ArkType, a validation library for TypeScript. Read this skill when writing validation logic using ArkType. ArkType is a library that allows you to validate values using a notation very similar to that of TypeScript type definitions.
Installation
If ArkType is not yet present in the project's dependencies, you can install it with npm install arktype. If the project uses a package manager other than npm, use that instead.
Basic usage
import { type } from "arktype";
const User = type({
name: "string",
platform: "'android' | 'ios'",
email: "string.email",
score: "number.integer <= 100",
"versions?": "(number | string)[]",
details: {
// nested definitions don't need to be wrapped
"['devices' | 'apps']": "string[]"
},
areWeCoolYet: "boolean = true"
});
// extract the type if needed
type User = typeof User.infer;
const out = User(value);
if (out instanceof type.errors) {
console.error(out.summary);
} else {
console.log(`Hello, ${out.name}`);
}
// throws an error if the value is invalid.
const user = User.assert(value);
// `.allows()` is a type guard and does not apply morphs or transformations
if (User.allows(value)) {
console.log("value is correct");
}Note: Object types allow and preserve undeclared properties by default. Use "+": "reject" to reject them or "+": "delete" to strip them.
Optional properties
Optional properties does not implicitly allow undefined as a value.
const User = type({
// `name` may be absent
"name?": "string",
// `value` is required, but may be undefined
value: "string | undefined",
// `label` may be absent or explicitly undefined
"label?": "string | undefined"
});Constraints
// you can add non-standard constraints with `.narrow()`
const Odd = type("number").narrow((n, ctx) => (n % 2 === 0 ? ctx.mustBe("odd") : true));Builtin keywords
In ArkType, for example, you can represent a URL-formatted string with type("string.url"), and you can morph it into a URL object while performing validation using type("string.url.parse").
For all built-in primitives and keywords, refer to the documentation: https://arktype.io/docs/keywords
Regex
const User = type({
birthday: "x/^(?<month>\\d{2})-(?<day>\\d{2})-(?<year>\\d{4})$/"
});
const data = User.assert({ birthday: "05-21-1993" });
// fully type-safe
data.birthday.groups.month; // "05"
data.birthday.groups.day; // "21"
data.birthday.groups.year; // "1993"If you don't need the full features of ArkType and only want to use type-safe regular expressions, you can use ArkRegex.
import { regex } from "arkregex";
// RegExp-compatible
const semver = regex("^(\\d+)\\.(\\d+)\\.(\\d+)$");Morphs & JSON
const morphed = type("string").pipe((s) => s.trim());
const parseJson = type("string.json.parse").to({
version: "string.semver"
});
const out = parseJson('{ "version": "2.0.0" }');Recursive Types
import { scope } from "arktype";
const userScope = scope({
User: {
id: "string",
friends: "User[]"
},
UsersById: {
"[string]": "User | undefined"
}
});
const userModule = userScope.export();
const out = userModule.User(value);Creating validators and types from variables
// `as const` is required
const allowedValues = ["foo", "bar", "baz"] as const;
const AllowedValue = type.enumerated(...allowedValues);
// "foo" | "bar" | "baz"
type AllowedValue = typeof AllowedValue.infer;Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

