squad-conventions

Establish core development conventions for the Squad CLI tool.

209|27|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/dotnet/maui-labs --skill squad-conventions-dotnet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: squad-conventions
Source: https://github.com/dotnet/maui-labs/tree/main/src/Comet/.copilot/skills/squad-conventions
Command: npx skills add https://github.com/dotnet/maui-labs --skill squad-conventions-dotnet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents Squad CLI development from drifting into fragile, inconsistent implementations by documenting the team’s core conventions for structure, reliability, and cross-platform behavior.

Core Features & Use Cases

  • Zero-dependency Node.js rules: Enforces using Node built-ins instead of adding npm dependencies, keeping the package minimal and deterministic.
  • Consistent testing workflow: Standardizes on Node’s built-in test runner (node:test) and strict assertions, aligning how tests are authored and executed.
  • Predictable error handling & UX: Requires the fatal(msg) pattern for clean user-facing failures and avoids raw stack traces.
  • Cross-platform filesystem safety: Mandates Windows-safe path handling via path.join() and safe recursive copy utilities.
  • Safe init/upgrade behavior: Defines idempotent init (skip-if-exists) while restricting overwrites to Squad-owned files during upgrades.

Quick Start

Use the conventions in this Skill when modifying Squad CLI code to ensure you follow the same zero-dependency, error-handling, testing, and filesystem patterns as the rest of the codebase.

Frequently Asked Questions about squad-conventions

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

FAQPage Schema
How do I handle cross-platform filesystem paths in Node.js CLI tools?

Cross-platform filesystem paths in Node.js CLI tools should be handled using path.join() to ensure Windows, macOS, and Linux compatibility. This approach prevents errors from inconsistent directory separators, maintaining safe and predictable filesystem operations across operating systems.

What is the best way to test Node.js CLI applications without external dependencies?

Testing Node.js CLI applications without external dependencies is best achieved using Node's built-in test runner, node:test, alongside strict assertions. This standardizes test authoring and execution while maintaining a minimal, deterministic zero-dependency npm package environment.

How do I display clean CLI errors without exposing raw stack traces to users?

To display clean CLI errors without raw stack traces, implement a fatal(msg) error handling pattern. This method outputs user-facing failure messages directly, hiding internal stack traces and providing a predictable, safe terminal experience during execution failures.

How do I write safe init and upgrade logic for a Node.js CLI tool?

Safe init and upgrade logic for a Node.js CLI tool requires idempotent initialization that skips existing files, while restricting overwrites to CLI-owned files during upgrades. This respects user-owned state and prevents accidental data loss across sessions.

Why do Node.js CLI tools need zero runtime npm dependencies?

Node.js CLI tools need zero runtime npm dependencies to keep the package minimal and deterministic. Relying strictly on Node built-ins prevents version conflicts, reduces installation overhead, and ensures consistent behavior across different execution environments.