Agent skill

Typescript Strict Patterns

by Hack23 in Hack23/cia

TypeScript strict mode, type safety, readonly patterns, type guards for frontend tooling used in CI/CD

Apache-2.0Auto-check passedDevelopment

Install Typescript Strict Patterns

skills CLI
$ npx skills add Hack23/cia --skill typescript-strict-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Hack23/cia typescript-strict-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Hack23/cia.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/typescript-strict-patterns .claude/skills/typescript-strict-patterns && rm -rf skills-src

Use ~/.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/

Facts

Skill name
typescript-strict-patterns
GitHub stars
239
Token cost
~1.3k tokens
SKILL.md length
210 words
Files
1
Skills in repo
78
Repo updated
First seen
Licence
Apache-2.0

At a glance

TypeScript strict mode, type safety, readonly patterns, type guards for frontend tooling used in CI/CD

  • Tasks that involve Type safety
  • SKILL.md covers Purpose, When to Use, Strict Mode Configuration and Type Safety Patterns, plus 3 more sections
  • Calls npm; reaches data.riksdagen.se
  • Tasks that involve CI/CD

What it does

Typescript Strict Patterns is an agent skill from Hack23/cia. TypeScript strict mode, type safety, readonly patterns, type guards for frontend tooling used in CI/CD

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Type safety and CI/CD. It works with TypeScript and Java. The repository describes itself as: Citizen Intelligence Agency. Open-source intelligence platform analyzing Swedish political activities using AI and data visualization. Tracks politicians, government… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Type safety
  • Tasks that involve CI/CD

Example prompts

  • “/typescript-strict-patterns”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit bbed538. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • data.riksdagen.se

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Typescript Strict Patterns loads about 1.3k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 210 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from Hack23/cia at commit bbed538, republished under its Apache-2.0 licence (© Hack23). 210 words, ~1,302 tokens.

Download SKILL.mdSave it as .claude/skills/typescript-strict-patterns/SKILL.md (or your agent's skills folder).
name
typescript-strict-patterns
description
TypeScript strict mode, type safety, readonly patterns, type guards for frontend tooling used in CI/CD
license
Apache-2.0

TypeScript Strict Patterns Skill

Purpose

Ensure type-safe TypeScript development for CI/CD tooling, MCP servers, and build scripts used in the CIA platform. This skill covers strict compiler options, type guard patterns, and defensive coding practices for TypeScript components within a primarily Java/Maven project.

When to Use

  • ✅ Writing MCP server tools in TypeScript
  • ✅ Creating GitHub Actions custom actions
  • ✅ Building CI/CD pipeline scripts and utilities
  • ✅ Developing static site generators for political data
  • ✅ Writing type-safe configuration parsers

Do NOT use for:

  • ❌ Vaadin UI components (Java-based, use vaadin-component-design skill)
  • ❌ Backend service logic (use Java/Spring patterns)

Strict Mode Configuration

json
{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "noImplicitOverride": true,
    "noPropertyAccessFromIndexSignature": true,
    "exactOptionalPropertyTypes": true,
    "forceConsistentCasingInFileNames": true,
    "isolatedModules": true,
    "esModuleInterop": true,
    "moduleResolution": "node16",
    "module": "node16",
    "target": "ES2022",
    "declaration": true,
    "declarationMap": true,
    "sourceMap": true,
    "outDir": "./dist"
  }
}
What Strict Mode Enables
FlagPurpose
strictNullChecksPrevents null/undefined assignment errors
strictFunctionTypesEnforces contravariant function parameter types
strictPropertyInitializationRequires class properties to be initialized
noImplicitAnyDisallows implicit any types
noImplicitThisErrors on this with implicit any type

Type Safety Patterns

Discriminated Unions for Political Data
typescript
interface Politician {
  readonly type: "politician";
  readonly personId: string;
  readonly firstName: string;
  readonly lastName: string;
  readonly party: SwedishParty;
}

interface Committee {
  readonly type: "committee";
  readonly committeeId: string;
  readonly name: string;
  readonly members: readonly string[];
}

type PoliticalEntity = Politician | Committee;

// Type guard
function isPolitician(entity: PoliticalEntity): entity is Politician {
  return entity.type === "politician";
}
Readonly Patterns
typescript
// Immutable data structures for political records
interface VotingRecord {
  readonly personId: string;
  readonly votes: ReadonlyArray<Vote>;
  readonly summary: Readonly<VotingSummary>;
}

// Readonly mapped type for API responses
type Immutable<T> = {
  readonly [K in keyof T]: T[K] extends object ? Immutable<T[K]> : T[K];
};

type ImmutableApiResponse = Immutable<RiksdagApiResponse>;
Type Guards for Runtime Validation
typescript
function isValidParty(value: unknown): value is SwedishParty {
  const validParties = ["S", "M", "SD", "C", "V", "KD", "L", "MP"] as const;
  return typeof value === "string" && validParties.includes(value as SwedishParty);
}

function assertNonNull<T>(value: T | null | undefined, name: string): asserts value is T {
  if (value === null || value === undefined) {
    throw new Error(`Expected non-null value for ${name}`);
  }
}
Branded Types for Domain Safety
typescript
type PersonId = string & { readonly __brand: "PersonId" };
type CommitteeId = string & { readonly __brand: "CommitteeId" };

function createPersonId(raw: string): PersonId {
  if (!/^[0-9a-f-]{36}$/.test(raw)) {
    throw new Error(`Invalid person ID format: ${raw}`);
  }
  return raw as PersonId;
}

Error Handling Patterns

typescript
// Result type for safe error handling
type Result<T, E = Error> =
  | { readonly success: true; readonly value: T }
  | { readonly success: false; readonly error: E };

async function fetchPoliticianData(id: PersonId): Promise<Result<Politician>> {
  try {
    const response = await fetch(`https://data.riksdagen.se/person/${id}`);
    if (!response.ok) {
      return { success: false, error: new Error(`HTTP ${response.status}`) };
    }
    const data: unknown = await response.json();
    const validated = validatePoliticianData(data);
    return { success: true, value: validated };
  } catch (error) {
    return { success: false, error: error instanceof Error ? error : new Error(String(error)) };
  }
}

CI/CD Integration

Package.json Scripts
json
{
  "scripts": {
    "build": "tsc --project tsconfig.json",
    "typecheck": "tsc --noEmit",
    "lint": "eslint src/ --ext .ts",
    "test": "vitest run"
  }
}
GitHub Actions Type Checking
yaml
- name: TypeScript Type Check
  run: npx tsc --noEmit --strict

Security Considerations

  • Validate all external data at runtime — types are erased at runtime
  • Use unknown over any for untyped data from APIs
  • Sanitize string inputs before interpolation into commands or queries
  • Never trust type assertions (as) without validation
  • Audit dependencies with npm audit before adding packages

© Hack23, 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

Files

Just SKILL.md in .github/skills/typescript-strict-patterns of Hack23/cia.

Open the folder on GitHubat commit bbed538

Compare with similar skills

Typescript Strict Patterns 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.

Typescript Strict Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Typescript Strict Patterns this skillHack23/cia239—~1.3kAutomated safety check: PassApache-2.0
Linea Dependency MaintenanceConsensys-Incorporated/linea-attestation-registry1771 repos~3.7kAutomated safety check: WarnMIT
TrueLicense Maven Central Releasechristian-schlichtherle/truelicense400—~846Automated safety check: PassApache-2.0
Update Dependenciesalorence/django-modern-rpc111—~1.3kAutomated safety check: PassMIT
Python Pypi Package Buildergithub/awesome-copilot40k1 repos~4.6kAutomated safety check: PassMIT
Azsdk Common Generate SDK LocallyAzure/azure-sdk-for-android121—~1.5kAutomated safety check: PassMIT

Similar skills

  • Linea Dependency Maintenance

    Consensys-Incorporated/linea-attestation-registry

    Safely plan and execute dependency maintenance for JavaScript/TypeScript (npm, pnpm) and GitHub Actions, including npm lockfiles, pnpm workspaces, catalogs, overrides, SHA-pinned action versions…

    177 GitHub starsUsed in 1 repo~3.7k tokens
    DevelopmentAuto-check: warnings
  • TrueLicense Maven Central Release

    christian-schlichtherle/truelicense

    Documents how TrueLicense is published to Maven Central from a version tag, the plugin constraints behind it and how to rehearse a release locally.

    400 GitHub stars~846 tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Update Dependencies

    alorence/django-modern-rpc

    Routine update of all project dependencies — uv itself, uv.lock (all groups), tool versions pinned in GitHub workflows and .pre-commit-config.yaml (uv, ruff, mypy...), and SHA-pinned GitHub Actions.

    111 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Python Pypi Package Builder

    github/awesome-copilot

    Official

    End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI.

    40k GitHub starsUsed in 1 repo~4.6k tokens
    DevelopmentAuto-check passed
  • Azsdk Common Generate SDK Locally

    Azure/azure-sdk-for-android

    Official

    Generate, build, and test Azure SDKs locally from TypeSpec with automatic customization.

    121 GitHub stars~1.5k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • Juror Review

    Juror-AI/juror

    Inspect Juror Cloud PR findings and, only after an explicit confirmation, start or rerun a hosted Juror review.

    120 GitHub stars~576 tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from Hack23/cia

All 78 skills in this repo
  • WCAG 2.1 AA compliance, ARIA attributes, keyboard navigation, screen reader optimization for accessible political data platforms

    239 GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Advanced chart types, D3.js/Vaadin Charts patterns, political data visualization, time series analysis

    239 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • AI Governance

    Hack23/cia

    AI governance, EU AI Act compliance, OWASP LLM security, responsible AI practices for GitHub Copilot agents

    239 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • API Integration

    Hack23/cia

    External API integration patterns, retry logic, circuit breakers, caching, rate limiting for government data APIs

    239 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • AWS CloudWatch metrics, alarms, dashboards, log insights, and application monitoring for the CIA platform

    239 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • AWS security best practices, VPC security, IAM, KMS, CloudTrail, GuardDuty for CIA platform deployment

    239 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Typescript Strict Patterns

What does Typescript Strict Patterns do?

TypeScript strict mode, type safety, readonly patterns, type guards for frontend tooling used in CI/CD. Typescript Strict Patterns is an agent skill from Hack23/cia.

When should I use Typescript Strict Patterns?

Typescript Strict Patterns fits situations like: tasks that involve Type safety; tasks that involve CI/CD.

How do I install Typescript Strict Patterns in Claude Code?

Run `npx skills add Hack23/cia --skill typescript-strict-patterns -a claude-code`. Or copy the skill folder (.github/skills/typescript-strict-patterns in Hack23/cia) into .claude/skills/typescript-strict-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Typescript Strict Patterns in Codex?

Run `npx skills add Hack23/cia --skill typescript-strict-patterns -a codex`. Or copy the skill folder (.github/skills/typescript-strict-patterns in Hack23/cia) into .agents/skills/typescript-strict-patterns in your project. Codex loads it when a task matches its description.

Can I use Typescript Strict Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Hack23/cia --skill typescript-strict-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/typescript-strict-patterns, .gemini/skills/typescript-strict-patterns, .github/skills/typescript-strict-patterns and .opencode/skills/typescript-strict-patterns in your project.

What does Typescript Strict Patterns need to run?

Going by SKILL.md and its folder, Typescript Strict Patterns needs the command-line tools its instructions call (npm). Our summary lists: Node.js.

Does Typescript Strict Patterns access the network?

SKILL.md names 1 domain. In commands or code: data.riksdagen.se; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Typescript Strict Patterns safe to install?

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.

What licence does Typescript Strict Patterns use?

Typescript Strict Patterns is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Typescript Strict Patterns use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Typescript Strict Patterns?

Skills that share tags, products or a category with Typescript Strict Patterns: Linea Dependency Maintenance (Consensys-Incorporated/linea-attestation-registry, 177 stars), TrueLicense Maven Central Release (christian-schlichtherle/truelicense, 400 stars), Update Dependencies (alorence/django-modern-rpc, 111 stars) and Python Pypi Package Builder (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Typescript Strict Patterns?

Hack23 (a GitHub organization) maintains it in Hack23/cia, which has 239 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 7, 2026.

Source: Hack23/cia on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.