agentleFS
DailybotHQDailybotHQ/deepworkplan-website/.agents/skills/type-fix/SKILL.md

type-fix

Skill15 starsChanged 5 months agoMITView on GitHub

Fix TypeScript type errors in 1-3 files (explicit types, prefer no any). Use proactively for TypeScript type issues.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Does NOT refactor logic or add features

    line 24
  2. Distinctive:

    Does NOT change runtime behavior

    line 25
  3. Distinctive:

    Does NOT modify more than 3 files

    line 26
  4. Distinctive:

    Does NOT introduce new type files without agreement

    line 27
  5. Distinctive:

    Before running this skill, ensure:

    line 48
  6. Very specific:

    Run pnpm run astro:check or read IDE errors for the target files

    line 57
  7. Distinctive:

    Add explicit parameter and return types

    line 62
  8. Very specific:

    Use types from src/lib/types.ts or Astro's built-in types

    line 63
  9. Very specific:

    Use import type for type-only imports

    line 64
  10. Distinctive:

    Do not change logic

    line 66
  11. Distinctive:

    Stop and escalate: if:

    line 117

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Type Fix

Objective

Fix TypeScript compilation errors related to types in 1-3 files: add explicit type annotations, fix return types and argument types. Adapted for this repo: Astro, Svelte, TypeScript; follow AGENTS.md and existing type patterns in src/lib/types.ts.

Non-Goals

  • Does NOT refactor logic or add features
  • Does NOT change runtime behavior
  • Does NOT modify more than 3 files
  • Does NOT introduce new type files without agreement

Tier Classification

Tier: 1 - Light/Cheap

Reasoning: Mechanical type fixes in small scope; low risk; pattern-following (existing types in lib/).

Inputs

Required Parameters

  • $FILES: File(s) with type errors (or "current file" / leave empty to use compiler output)
  • $ERRORS: Optional — specific error messages or astro check output

Optional Parameters

  • $CONTEXT: Related type definitions to reuse (e.g., from src/lib/types.ts)

Prerequisites

Before running this skill, ensure:

  • Type errors are from TypeScript compiler or IDE (not runtime)
  • No uncommitted changes or working on a dedicated branch

Steps

Step 1: Identify Errors

  • Run pnpm run astro:check or read IDE errors for the target files
  • List missing types, incompatible signatures

Step 2: Apply Type Fixes

  • Add explicit parameter and return types
  • Use types from src/lib/types.ts or Astro's built-in types
  • Use import type for type-only imports
  • Fix generic parameters if needed
  • Do not change logic

Step 3: Validate

pnpm run astro:check
pnpm run biome:check

Output Format

Success Output

## ✅ Type Fix Complete

### Files
- `{file1}`: {what was fixed}
- `{file2}`: {what was fixed}

### Validation
- TypeScript: ✅ No errors
- pnpm run astro:check: ✅
- pnpm run biome:check: ✅

### Commit Message
fix: resolve TypeScript types in {files}

Escalation

## ❌ Type Fix Not Enough

### Reason
{Errors require new type definitions / many files / architectural types}

### Recommendation
Escalate to Tier 2 or architect for type design.

Guardrails

Scope Limits

  • Maximum files: 3
  • Maximum LOC changed: 100
  • Allowed: Annotations, using existing types from lib/types.ts

Stop Conditions

Stop and escalate if:

  • New shared types needed
  • More than 3 files affected
  • Changes affect component API surface

Definition of Done

  • No TypeScript errors in target files
  • pnpm run astro:check passes
  • pnpm run biome:check passes

Common Astro Types

// Built-in Astro types
import type { APIRoute } from 'astro';
import type { CollectionEntry } from 'astro:content';

// Content Collection types
type MethodologyDoc = CollectionEntry<'methodology'>;
type KitEntry = CollectionEntry<'kit'>;

// Component props
interface Props {
  title: string;
  description?: string;
}

Related

  • fix-lint - Biome/style fixes
  • quick-fix - Small bug fixes
  • reviewer - Review type quality

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.