joncrangle

code-style

Discovery, typing, and execution standards.

joncrangle 8 Updated 7mo ago
GitHub

Install

npx skillscat add joncrangle/dotfiles/code-style

Install via the SkillsCat registry.

About this skill

Establishes discovery, typing, and execution standards for code development, requiring agents to search existing patterns and read similar files before writing any code. It enforces strict TypeScript practices, structured error handling, test-driven verification, and linting to ensure consistent code quality. Use this skill when implementing or modifying code to maintain project conventions and reduce errors.

SKILL.md
# Code Style & Discovery

🔍 Discovery Phase (Mandatory)

Before writing any code:

  1. Search: Search for existing patterns using the search_files tool.
  2. Read: Read similar files to match style.
  3. Types: Find the TypeScript interfaces/types defined in the project.

🛡️ Coding Standards

  • Strict TypeScript: No any. Define interfaces.
  • Error Handling: Use try/catch with specific error logging. No silent failures.
  • Comments: Comment why, not what.
  • Imports: Use absolute imports if project configured (check tsconfig).

🧪 Verification

  • Test-Driven: Create/Update tests for every logic change.
  • Lint: Run linting before reporting success.

🛠️ Tooling

  • Use bun tools/hotspots.ts to find frequently changed files.
  • Use list_files to explore the directory structure.</skill_doc>