agentleFS
BTMuliBTMuli/TeyvatGuide/.agents/skills/typescript-standards/SKILL.md

typescript-standards

Skill428 starsChanged 10 days agoMITView on GitHub

Write and review TypeScript and Vue code using TeyvatGuide's ESLint, Prettier, type declaration, const-enum, runtime-value, and TSDoc conventions. Use when changing .ts, .d.ts, or .vue files, especially types, enums, exported APIs, and Vue state.

We split this skill into the rules it gives an agent

6 rules. 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read ../../rules/typescript-rules.md, source metadata rules, and the nearest code before editing.

    line 8
  2. Very specific:

    Treat eslint/vueEslint.js, .prettierrc.yml, and tsconfig.json as executable sources of truth when prose and configuration differ.

    line 10
  3. Very specific:

    Use Array<T>, type, explicit public function types, and angle-bracket assertions where an assertion is unavoidable.

    line 12
  4. Very specific:

    Do not add native TypeScript enum.

    line 16
  5. Very specific:

    Read TSDoc conventions when adding or changing functions, types, or exported declarations.

    line 18
  6. Very specific:

    Use package.json's since (never version) for changed file headers and affected declaration tags.

    line 19

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “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

TypeScript Standards

  1. Read ../../rules/typescript-rules.md, source metadata rules, and the nearest code before editing.
  2. Treat eslint/vueEslint.js, .prettierrc.yml, and tsconfig.json as executable sources of truth when prose and configuration differ.
  3. Use Array<T>, type, explicit public function types, and angle-bracket assertions where an assertion is unavoidable. Prefer narrowing and unknown first.
  4. Reuse shared types from src/types/<Domain>/*.d.ts (or an existing plugin types directory) and keep file-local types near their use; do not create Types/ or a separate types.ts just for types.
  5. Do not add native TypeScript enum. Read enum patterns when adding a value set or mapping declaration-space values to runtime objects.
  6. Read TSDoc conventions when adding or changing functions, types, or exported declarations. Use package.json's since (never version) for changed file headers and affected declaration tags; non-Vue functions changed without docs need a short TSDoc, while Vue files keep the documented header exception.
  7. Preserve NodeNext .js import extensions, follow the grouping enforced by import-x/order, and use import type { ... } for type-only imports.
  8. Respect the ESLint TS error rules: no unused variables or expressions (including short-circuit/ternary chains), no @ts-ignore/@ts-nocheck or description-less @ts-expect-error, no runtime namespaces (declare only in .d.ts), and as const/<const> over literal type assertions.
  9. Validate with pnpm lint-vue and pnpm lint:code; add pnpm lint:style when Vue styles change.

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.