Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add fideguch/my_pm_tools --skill typescript-best-practicesgit clone --depth 1 https://github.com/fideguch/my_pm_toolsWrote 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.
[](https://agentmods.dev/skills/fideguch/my_pm_tools/typescript-best-practices)<a href="https://agentmods.dev/skills/fideguch/my_pm_tools/typescript-best-practices"><img src="https://agentmods.dev/badge/skills/fideguch/my_pm_tools/typescript-best-practices.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01454 |
| Opus 5 | $0.00000 | $0.00727 |
| Sonnet 5 | $0.00000 | $0.00291 |
| Haiku 4.5 | $0.00000 | $0.00145 |
Grade A, and why
typescript-best-practices 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript ベストプラクティス & プロジェクト初期設定スキル
メタデータ
- トリガー: 「TypeScript設定」「tsconfig設定」「TypeScriptプロジェクト初期設定」「型安全」
- 前提条件: Node.js プロジェクト
概要
TypeScript プロジェクトの初期設定と型安全なコーディングのベストプラクティスを提供するスキル。 tsconfig.json の最適設定、パス エイリアス、厳格モードの段階的導入をガイドする。
Phase 1: TypeScript 導入判定
1.1 新規プロジェクト
npm install --save-dev typescript @types/node
npx tsc --init
1.2 既存 JavaScript プロジェクトの移行
npm install --save-dev typescript @types/node
# allowJs: true で段階的に移行
Phase 2: tsconfig.json 推奨設定
2.1 厳格モード(推奨)
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"exactOptionalPropertyTypes": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"isolatedModules": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "./dist",
"rootDir": "./src",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "coverage", "**/*.test.ts"]
}
2.2 フレームワーク別追加設定
Next.js:
{
"compilerOptions": {
"jsx": "preserve",
"incremental": true,
"plugins": [{ "name": "next" }]
}
}
React (Vite):
{
"compilerOptions": {
"jsx": "react-jsx",
"moduleResolution": "bundler"
}
}
Phase 3: 型安全コーディングガイドライン
3.1 避けるべきパターン
// BAD: any の使用
function process(data: any) { ... }
// GOOD: 適切な型定義
interface ProcessInput {
id: string;
value: number;
}
function process(data: ProcessInput) { ... }
// BAD: 型アサーション の乱用
const user = response as User;
// GOOD: 型ガードの使用
function isUser(obj: unknown): obj is User {
return typeof obj === 'object' && obj !== null && 'id' in obj;
}
if (isUser(response)) { ... }
// BAD: Non-null assertion の乱用
const name = user!.name;
// GOOD: オプショナルチェーン + nullish coalescing
const name = user?.name ?? 'Unknown';
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.
- 7d ago First seen · 230 lines · 0 tokens per session scan A aaa916d7375b
typescript-best-practices is a skill published in the GitHub repository fideguch/my_pm_tools (1 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,454 tokens. 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.
Other skills, from other repositories
add-export
Add a new subpath export to the @cyanheads/mcp-ts-core package. Use when creating a new public API surface that consumers import from a dedicated subpath (e.g., @cyanheads/mcp-ts-core/newutil).
basic-inline-skill
A minimal instruction-only skill with inline content and the function builder alternative.
typescript-lsp
Search TypeScript SYMBOLS (functions, types, classes) - NOT text. Use Glob to find files, Grep for text search, LSP for symbol search. Provides type-aware results that understand imports, exports, and relationships.
scraperapi-nodejs-sdk
Best-practices reference for the ScraperAPI Node.js / JavaScript SDK (scraperapi-sdk npm package). Consult whenever the user is writing, debugging, or reviewing JavaScript or TypeScript code that calls ScraperAPI. Use when user asks: "scrape a website with Node.js and ScraperAPI", "ScraperAPI JavaScript example", "how…
typescript-best-practices
TypeScript/Node.js best practices. Use when writing or reviewing TypeScript code. Covers type safety, async patterns, and error handling.
api-errors
McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.