Obsidian Plugin Development Guidelines
gapmiss/obsidian-plugin-skill
Rules and references for building Obsidian plugins: ESLint rules, TypeScript practices, memory cleanup, API choices, UI standards and the community submission process.
Replaces bare `as` casts in production TypeScript with a decision tree of tighter types, type predicates, satisfies and audited cast helpers.
$ npx skills add prisma/orm --skill no-bare-casts -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install prisma/orm no-bare-casts --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/prisma/orm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills-contrib/no-bare-casts .claude/skills/no-bare-casts && rm -rf skills-srcUse ~/.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/
Install the "no-bare-casts" agent skill from https://github.com/prisma/orm/tree/main/skills-contrib/no-bare-casts into .claude/skills/no-bare-casts/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "no-bare-casts", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/prisma/orm/tree/main/skills-contrib/no-bare-castsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add prisma/orm --skill no-bare-casts -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install prisma/orm no-bare-casts --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prisma/orm.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills-contrib/no-bare-casts .agents/skills/no-bare-casts && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "no-bare-casts" agent skill from https://github.com/prisma/orm/tree/main/skills-contrib/no-bare-casts into .agents/skills/no-bare-casts/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "no-bare-casts", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add prisma/orm --skill no-bare-casts -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install prisma/orm no-bare-casts --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prisma/orm.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills-contrib/no-bare-casts .cursor/skills/no-bare-casts && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "no-bare-casts" agent skill from https://github.com/prisma/orm/tree/main/skills-contrib/no-bare-casts into .cursor/skills/no-bare-casts/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "no-bare-casts", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/prisma/orm.git --path skills-contrib/no-bare-casts--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add prisma/orm --skill no-bare-casts -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install prisma/orm no-bare-casts --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prisma/orm.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills-contrib/no-bare-casts .gemini/skills/no-bare-casts && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "no-bare-casts" agent skill from https://github.com/prisma/orm/tree/main/skills-contrib/no-bare-casts into .gemini/skills/no-bare-casts/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "no-bare-casts", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install prisma/orm no-bare-castsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add prisma/orm --skill no-bare-casts -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/prisma/orm.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills-contrib/no-bare-casts .github/skills/no-bare-casts && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "no-bare-casts" agent skill from https://github.com/prisma/orm/tree/main/skills-contrib/no-bare-casts into .github/skills/no-bare-casts/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "no-bare-casts", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add prisma/orm --skill no-bare-casts -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install prisma/orm no-bare-casts --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prisma/orm.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills-contrib/no-bare-casts .opencode/skills/no-bare-casts && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "no-bare-casts" agent skill from https://github.com/prisma/orm/tree/main/skills-contrib/no-bare-casts into .opencode/skills/no-bare-casts/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "no-bare-casts", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
no-bare-castsReplaces bare `as` casts in production TypeScript with a decision tree of tighter types, type predicates, satisfies and audited cast helpers.
Any bare `as` in production TypeScript or TSX is treated as a prompt to work through a decision tree before the cast is written or kept. The steps run in order: tighten the type at the source, add a runtime type predicate, restructure a generic bound, use `satisfies` when you only want a check, use `castAs<T>(value)` when the assertion is purely declarative, and only then reach for `blindCast`.
The `blindCast` helper takes the target type plus a string-literal reason that a reviewer can judge, so a vague reason is grounds to push back. Both helpers are imported from @internal/utils/casts, and test files are exempt. When a file that already contains a bare cast is touched for any reason, the cast should be converted or removed, because the CI check `pnpm lint:casts` rejects pull requests that raise the cast count.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 095af7a. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
pnpmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
No Bare Casts loads about 705 tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 306 words of instructions outside code blocks.
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.
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.
The full file from prisma/orm at commit 095af7a, republished under its Apache-2.0 licence (© prisma). 306 words, ~705 tokens.
.claude/skills/no-bare-casts/SKILL.md (or your agent's skills folder).as castsAny bare as in production TypeScript is a signal to stop and work through the decision tree below. Test files (*.test.ts, *.test-d.ts, test/**/*.ts) are exempt — tests use as for stubbing and type assertions and that's fine.
Work through these in order before writing or keeping a cast:
function isUser(x): x is User) narrow the type at runtime, eliminating the cast?satisfies. expr satisfies T checks the type without coercing it and is unaffected by this rule. Prefer it when you want a type-check, not a coercion.castAs<T>(value). When the value already satisfies T and the assertion is purely declarative, castAs is the right form.blindCast<T, "Reason">(value). The Reason literal must name the specific compromise in language a reviewer can evaluate.import { blindCast, castAs } from '@internal/utils/casts';// Escape hatch — the value is genuinely opaque or unrelated to the target type.
// The Reason literal documents the compromise; the reviewer evaluates it.
function blindCast<TargetType, Reason extends string>(input: unknown): TargetType
// Declarative assertion — the value already satisfies T at runtime.
function castAs<T>(value: T): TReason barblindCast is the auditable escape hatch of last resort — not a convenience wrapper. Reach for it only after the decision tree above has been exhausted. The second type argument must be a string literal that a reviewer can act on:
// ✅ Names the specific constraint
blindCast<User, "deserialized from contract validator; shape has already been checked">(raw)
// ❌ Adds no information — reviewer has nothing to evaluate
blindCast<User, "trust me">(raw)A vague reason is the reviewer's signal to push back and the author's signal to revisit the type design.
When you touch a file that contains a bare as cast — even as part of unrelated work — convert it to one of the accepted forms or eliminate it. The CI ratchet (pnpm lint:casts) rejects per-PR cast-count increases; converting on contact is how the total comes down over time.
© prisma, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills-contrib/no-bare-casts of prisma/orm.
Open the folder on GitHubat commit 095af7a
No Bare Casts 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| No Bare Casts this skillprisma/orm | 48k | — | ~705 | Automated safety check: Pass | Apache-2.0 | |
| Obsidian Plugin Development Guidelinesgapmiss/obsidian-plugin-skill | 190 | — | ~4.5k | Automated safety check: Pass | MIT | |
| Strict Programming Practicescode-yeongyu/oh-my-openagent | 70k | — | ~9.5k | Automated safety check: Pass | Custom licence | |
| Fallow Setupfallow-rs/fallow-skills | 129 | — | ~1.1k | Automated safety check: Pass | MIT | |
| LobeHub TypeScript Style Guidelobehub/lobehub | 83k | — | ~968 | Automated safety check: Pass | Custom licence | |
| Typescript Best Practicesjwynia/agent-skills | 165 | — | ~2.5k | Automated safety check: Pass | MIT |
gapmiss/obsidian-plugin-skill
Rules and references for building Obsidian plugins: ESLint rules, TypeScript practices, memory cleanup, API choices, UI standards and the community submission process.
code-yeongyu/oh-my-openagent
Applies strict, type-first coding rules for Python, Rust, TypeScript and Go, loading the matching language reference before the agent writes or edits any code.
fallow-rs/fallow-skills
Set up or modernize code-quality tooling for JavaScript and TypeScript projects.
lobehub/lobehub
House rules for TypeScript type safety, async code and imports in the LobeHub codebase, covering inference, error suppression, module augmentation and IO patterns.
jwynia/agent-skills
Guide AI agents through TypeScript coding best practices including type safety, error handling, code organization, and architecture patterns.
pproenca/dot-skills
A skill your agent uses when writing, reviewing, or refactoring TypeScript or React code for craftsmanship — naming, function and component shape, error handling, data modeling, tests, and…
prisma/orm
Runs a loop on a GitHub pull request: fetch review state, triage comments into actions, implement them and resolve threads, repeating until nothing actionable is left.
prisma/orm
Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts.
prisma/orm
Implements triaged pull request review actions, commits focused fixes, posts status replies on GitHub and resolves the threads.
prisma/orm
Runs the triage step of the review-framework loop: reads fetched PR review state, builds `review-actions.json`, validates it and renders `review-actions.md`.
prisma/orm
Replaces a plain TypeScript union plus switch statements with frozen subclasses and a visitor interface when several places dispatch on the same variants.
prisma/orm
Guides an outside contributor through opening a prisma/orm pull request from a fork that follows CONTRIBUTING.md and passes review on the first round.
Works with
Categories
Replaces bare `as` casts in production TypeScript with a decision tree of tighter types, type predicates, satisfies and audited cast helpers. Any bare `as` in production TypeScript or TSX is treated as a prompt to work through a decision tree before the cast is written or kept. The steps run in order: tighten the type at the source, add a runtime type predicate, restructure a generic bound, use `satisfies` when you only want a check, use `castAs<T>(value)` when the assertion is purely declarative, and only then reach for `blindCast`.
No Bare Casts fits situations like: writing `as` in TypeScript production code and wanting a safer alternative; silencing a type error with a cast or meeting `as unknown as`; editing a file that already contains bare casts; reviewing a pull request where a cast site needs a justification.
Run `npx skills add prisma/orm --skill no-bare-casts -a claude-code`. Or copy the skill folder (skills-contrib/no-bare-casts in prisma/orm) into .claude/skills/no-bare-casts in your project. Claude Code loads it when a task matches its description.
Run `npx skills add prisma/orm --skill no-bare-casts -a codex`. Or copy the skill folder (skills-contrib/no-bare-casts in prisma/orm) into .agents/skills/no-bare-casts in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add prisma/orm --skill no-bare-casts -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/no-bare-casts, .gemini/skills/no-bare-casts, .github/skills/no-bare-casts and .opencode/skills/no-bare-casts in your project.
Going by SKILL.md and its folder, No Bare Casts needs the command-line tools its instructions call (pnpm). Our summary lists: A TypeScript codebase that provides the blindCast and castAs helpers.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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.
No Bare Casts is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 705 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with No Bare Casts: Obsidian Plugin Development Guidelines (gapmiss/obsidian-plugin-skill, 190 stars), Strict Programming Practices (code-yeongyu/oh-my-openagent, 70k stars), Fallow Setup (fallow-rs/fallow-skills, 129 stars) and LobeHub TypeScript Style Guide (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
prisma (a GitHub organization, an official publisher) maintains it in prisma/orm, which has 47,701 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 6, 2026.
Source: prisma/orm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.