agentleFS
MicrosoftKnown publishermicrosoft/TypeScript/.github/skills/api-client/SKILL.md

api-client

Skill111k starsChanged 2 years agoApache-2.0View on GitHub

Instructions for working on the API client in ./packages/typescript

3 other projects use a version of this.

Trending

Steady talk.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 2 mentionsSep 2026: 1 mentionOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/TypeScript repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about microsoft/TypeScript

The biggest 5 of 104 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 104

Talked about on Bluesky, Hacker News and GitHub (104 times).

On Bluesky · 50

45 more on Bluesky

On Hacker News · 43

38 more on Hacker News

On GitHub · 11

6 more on GitHub
  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. fmind/dot★ 10same name
    2. SecuringTheRealm/str-agentic-adventures★ 4same name
    3. MauricioPerera/llms-txt-skills★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    When adding a property or method to Type or Symbol that references another Type or Symbol, decide how to represent it via this process:

    line 12
  2. Very specific:

    Add the method on Type

    line 15
  3. Very specific:

    Do not cache results on the Type.

    line 16
  4. Very specific:

    Do not precompute a result to include in TypeResponse

    line 20
  5. Very specific:

    Do include a backing cache field on Type, initialized to false, and update it after the first call.

    line 21
  6. Distinctive:

    If the situation doesn't seem to fit any of these categories, STOP and ask the user for guidance, and suggest updating these instructions.

    line 28

“Common” is measured: kept by at least 6 in 10 of the 3 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

Code comments

The user may tell you to reference Strada (the old TypeScript codebase) for implementation, but your code comments should not acknowledge that this codebase is a port of anything else. Comments should stand on their own and describe the code in the current codebase. Never say "Mirrors TypeScript's 'foo' function" or "...like the classic API's 'Bar' type."

Adding properties/methods to Type and Symbol

When adding a property or method to Type or Symbol that references another Type or Symbol, decide how to represent it via this process:

  • Does the public method take arguments, like type.getProperty(name)?
    • Add the method on Type
    • Do not cache results on the Type.
    • Result: every call will perform a fetch.
  • Otherwise, does the method take non-trivial work to compute its result, like type.getReducedType(), or might it return a huge number of results, like unionType.types()?
    • Add the method on Type
    • Do not precompute a result to include in TypeResponse
    • Do include a backing cache field on Type, initialized to false, and update it after the first call.
    • Result: the first call will always perform a fetch. Subsequent calls will use the cached result.
  • Otherwise, is the method trivial to compute, or represented as a plain property in the Go source?
    • Add the method on Type
    • Precompute the reference and include the ID in TypeResponse
    • Result: the first call will not perform a fetch if a Type/Symbol by that identity is already in the object registry.

If the situation doesn't seem to fit any of these categories, STOP and ask the user for guidance, and suggest updating these instructions.

Adding methods to Checker

If the method is an operation on a single Type or Symbol that takes no other arguments and returns a Type or Symbol, add the method on Type according to the earlier instructions, and implement the Checker method by delegating to the corresponding Type or Symbol method, so the result is cacheable.

Unnecessary spread and exactOptionalPropertyTypes

Never write code like ...(options ? { snapshot: options.snapshot } : {}). All optional properties should tolerate undefined. If --exactOptionalPropertyTypes is forcing you to write code this way, fix the offending type. Rewriting as if (options) foo.snapshot = options.snapshot is not an acceptable workaround; always fix the type. As a rule, object types used in input positions should always define optional properties with prop?: T | undefined so this isn't a problem.

What kinds of ID collisions matter?

Most API objects synchronize their client and server identities by some kind of handle or ID. Some care has to be taken when choosing an ID scheme.

What matters:

  • A single api.Session in LSP mode can have multiple simultaneous clients. Sometimes those clients will all talk about the same server object. Other times, a single client needs to create objects that are private to it, like resolution contexts or source file leases. In those cases, the server must generate the unique ID after creation to avoid ID collision of private objects between multiple clients.

What doesn't matter:

  • uint64 overflow
  • Passing objects between multiple API instances in the same JS process. We may eventually add some kind of central provenance validation. Do not add it on individual methods or flag it in reviews for now. It's not a realistic concern.

Reference equality guarantees are forfeited by disposing owners and clearing the source file cache

It's not a bug to observe a new object identity for an object whose owner was previously disposed or manually removed by api.clearSourceFileCache(). Review comments and tests that assert an ownership or lifetime bug that rely on testing reference equality after disposal or cache clearing will be rejected.

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.