typescript-safety
Secures TypeScript message boundaries using Zod validation and strict type safety rules.
Install
mkdir -p .claude/skills/typescript-safety && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18445" && unzip -o skill.zip -d .claude/skills/typescript-safety && rm skill.zipInstalls to .claude/skills/typescript-safety
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when writing TypeScript at message boundaries, runtime inputs, shared contracts, or any code that crosses the content-script/SW/backend trust boundary — to enforce Zod validation, discriminated unions, no-any rules, and sender verification.Key capabilities
- →Validate messages with Zod schemas at SW port boundaries
- →Verify message sender before processing port messages
- →Enforce no `any` in shared contracts
- →Use `unknown` and narrowing for I/O boundaries
- →Implement discriminated unions for message verb dispatch
- →Enable strict mode in `tsconfig.json`
How it works
The skill enforces type safety by validating all inbound messages with Zod schemas, verifying senders, and applying strict TypeScript rules at trust boundaries.
Inputs & outputs
When to use typescript-safety
- →Validate runtime inputs from external sources
- →Secure message handlers in background scripts
- →Define type-safe contract interfaces
- →Prevent runtime crashes from malformed JSON
About typescript-safety
Ensures type safety where external data enters the system (SSE, DOM, storage). Implements Zod validation, prevents 'any' usage, and verifies message schemas in background and content scripts.
Use when writing TypeScript at message boundaries, runtime inputs, shared contracts, or any code that crosses the content-script/SW/backend trust boundary — to enforce Zod validation, discriminated unions, no-any rules, and sender verification.
When not to use it
- →For pure CSS or DOM geometry work with no runtime parsing
Limitations
- →The skill does not apply to pure CSS or DOM geometry work
- →The skill does not apply to documentation-only changes
- →The skill bans `any` in shared contracts
How it compares
This approach systematically applies type safety and validation at critical system boundaries, preventing common runtime errors that manual coding might miss.
Compared to similar skills
typescript-safety side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| typescript-safety (this skill) | 0 | 2mo | No flags | Advanced |
| tech-debt-analyzer | 5 | 10mo | Review | Intermediate |
| codex-code-review | 1 | 8mo | Review | Intermediate |
| tech-debt | 1 | 3mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
tech-debt-analyzer
ailabs-393
This skill should be used when analyzing technical debt in a codebase, documenting code quality issues, creating technical debt registers, or assessing code maintainability. Use this for identifying code smells, architectural issues, dependency problems, missing documentation, security vulnerabilities, and creating comprehensive technical debt documentation.
codex-code-review
tyrchen
Perform comprehensive code reviews using OpenAI Codex CLI. This skill should be used when users request code reviews, want to analyze diffs/PRs, need security audits, performance analysis, or want automated code quality feedback. Supports reviewing staged changes, specific files, entire directories, or git diffs.
tech-debt
vm0-ai
Technical debt management - scan codebase for bad smells and create tracking issues
security-scan
redpanda-data
Resolve npm dependency vulnerabilities detected by security scans.
dependency-vulnerability-triage
lichunboa
Turns npm audit/Snyk results into prioritized patch plans with severity assessment, safe upgrade paths, breaking change analysis, and rollback strategies. Use for "dependency security", "vulnerability patching", "npm audit", or "security updates".
chrome-devtools
mrgoonie
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.