Install
$ agentstack add skill-cuonglph11-mini-chris-typescript-language ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
TypeScript Language Patterns
Priority: P0 (Critical)
Implementation Guidelines
- Type annotations: Explicit params and return types; infer locals.
- Interfaces vs types:
interfacefor object shapes and APIs;typefor unions, intersections, and aliases. - Strict mode: Use
strict: true. Null safety: optional chaining?.and nullish coalescing??. - Enums: Prefer literal unions or
as const; avoid runtimeenum. - Generics: Use for reusable, type-safe code.
- Type guards: Use
typeof,instanceof, or user-defined type predicates. - Utility types: Use
Partial,Pick,Omit,Recordand custom utilities as needed. - Immutability: Prefer
readonlyarrays/objects; use const assertionsas constandsatisfies. - Template literal types: Use for patterns like
on${Capitalize}. - Discriminated unions: Use a literal
kind(or similar) property to discriminate. - Advanced: Mapped, conditional, and indexed access types when appropriate.
- Access: Default
public; useprivate/protectedor#privatewhen needed. - Branded types: Use for nominal typing, e.g.
string & { __brand: 'Id' }.
Anti-Patterns
- No
any: Useunknownor specific types; neverany. - No
Function: Use concrete signatures, e.g.() => void. - No runtime
enum: Use union types oras constto avoid runtime cost. - No non-null assertion
!: Use proper narrowing instead. - No lint disables: Do not use
eslint-disableorts-ignore; fix issues properly.
Testing Patterns
- Mock types: Use
jest.Mockedoras unknown as T; neverany. - Enums: Use enum values (e.g.
AppointmentStatus.UPCOMING) not string literals where the type is an enum. - DTOs: Ensure test data includes all required fields expected by DTOs.
- Repository mocks: Mock every repository method used by the code under test (
findOne,create,save,findAndCount,createQueryBuilder, etc.).
Common Test Issues
| Problem | Solution | | --------------------------------- | ------------------------------------------------------------------------------------------ | | Service method name mismatch | Check implementation and mock the methods actually called. | | Error message mismatch | Use exact messages from shared constants (e.g. ErrorMessages). | | Mock missing required properties | Provide full mocks or use as unknown as Type for complex cases. | | CurrentUser incomplete in mocks | Include all required fields (id, email, subscriptionTier, createdAt, updatedAt). | | Auth/guard mocks failing | Provide complete service mocks (e.g. logger, userRepository) or cast via unknown. | | Wrong controller params | Match decorators (e.g. @CurrentUserDecorator()) and pass the correct types. |
Quick Reference
// Branded type
type UserId = string & { __brand: "Id" };
// satisfies: validate shape and infer
const cfg = { port: 3000 } satisfies Record;
// Discriminated union
type Result = { kind: "ok"; data: T } | { kind: "err"; error: Error };
Additional Resources
For advanced type patterns and utility types, see [reference.md](reference.md).
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: cuonglph11
- Source: cuonglph11/mini-chris
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.