aacode

Defines coding conventions and linting rules for consistent style across projects.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/ahmadawais/skills --skill aacode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aacode
Source: https://github.com/ahmadawais/skills/tree/main/skills/aacode
Command: npx skills add https://github.com/ahmadawais/skills --skill aacode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps teams adopt a strict, functional-first TypeScript style, eliminating common anti-patterns and improving maintainability.

Core Features & Use Cases

  • Enforces strict TypeScript with explicit return types, branded IDs, and readonly data.
  • Prohibits classes, this, and new, promoting pure functions and data-driven design.
  • Encourages guard clauses and early returns to reduce nesting and improve readability.

Quick Start

Refactor the target module to be pure functions, with explicit return types, no classes, and early guard clauses.

Frequently Asked Questions about aacode

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor TypeScript code to use pure functions instead of classes?

Refactoring TypeScript code to pure functions requires eliminating classes, the `this` keyword, and `new` keywords. You must transition to data-driven designs using explicit return types, immutable readonly data, and branded IDs to maintain strict functional discipline.

What is the best way to enforce immutable data and functional patterns in TypeScript?

To enforce immutable data and functional patterns in TypeScript, apply readonly properties to data structures and thread state explicitly across modules. This approach eliminates hidden mutations and ensures reliability without relying on class-based state management.

Does a strict functional TypeScript style allow any class-based patterns?

A strict functional TypeScript style prohibits all class-based patterns, including the use of classes, `this`, and `new` keywords. It enforces pure functions and data-driven design to improve maintainability and reduce side effects.

How do I handle errors in functional TypeScript without deep nesting?

Handle errors in functional TypeScript by using guard clauses and early returns to reduce nesting and improve readability. This technique ensures rigorous type discipline and reliable error handling without relying on complex nested control structures.

When do I need Zod validation boundaries in a functional TypeScript module?

You need Zod validation boundaries in a functional TypeScript module when enforcing rigorous type discipline at system edges. They ensure explicit state threading and pure functions maintain reliability by validating external data entering the functional core.

Why should I use branded IDs and explicit return types in TypeScript functional programming?

Using branded IDs and explicit return types in TypeScript functional programming enforces strict type discipline and prevents type coercion errors. This practice ensures immutable data handling and reliable pure function execution across refactored modules.