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.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- public/llms-full.txtllms.txt
- public/llms.txtllms.txt
- add-componentSkill
- add-diagram-componentSkill
- add-languageSkill
- add-pageSkill
- ai-diff-reviewerSkill
- dailybotSkill
- deepworkplanSkill
- doc-editSkill
- fix-lintSkill
- git-commit-pushSkill
- pr-review-liteSkill
- quick-fixSkill
- refactor-safeSkill
- responsive-lighthouse-auditSkill
- security-checkSkill
- translate-syncSkill
- update-stylesSkill
- write-testsSkill
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
- Distinctive: line 24
Does NOT refactor logic or add features
- Distinctive: line 25
Does NOT change runtime behavior
- Distinctive: line 26
Does NOT modify more than 3 files
- Distinctive: line 27
Does NOT introduce new type files without agreement
- Distinctive: line 48
Before running this skill, ensure:
- Very specific: line 57
Run pnpm run astro:check or read IDE errors for the target files
- Distinctive: line 62
Add explicit parameter and return types
- Very specific: line 63
Use types from src/lib/types.ts or Astro's built-in types
- Very specific: line 64
Use import type for type-only imports
- Distinctive: line 66
Do not change logic
- Distinctive: line 117
Stop and escalate: if:
≈ “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.
Files
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 orastro checkoutput
Optional Parameters
$CONTEXT: Related type definitions to reuse (e.g., fromsrc/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:checkor 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.tsor Astro's built-in types - Use
import typefor type-only imports - Fix generic parameters if needed
- Do not change logic
Step 3: Validate
pnpm run astro:check
pnpm run biome:checkOutput 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:checkpassespnpm run biome:checkpasses
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
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
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.

