agentleFS
MicrosoftKnown publishermicrosoft/typespec/.github/skills/code-review/SKILL.md

code-review

Skill5.9k starsChanged 4 months agoMITView on GitHub

Review TypeSpec pull requests against the project's own rules: the Tier 0-3 breaking change policy, `.chronus` changelog requirements, compiler API usage, test framework conventions, and emitter output stability. Use when reviewing a diff or pull request in this repository.

188 other projects use a version of this.

Trending

Quiet since September.about the whole repository

Dec 2025: 0 mentionsJan 2026: 1 mentionFeb 2026: 3 mentionsMar 2026: 8 mentionsApr 2026: 2 mentionsMay 2026: 2 mentionsJun 2026: 0 mentionsJul 2026: 3 mentionsAug 2026: 2 mentionsSep 2026: 3 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/typespec 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/typespec

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

See all 37

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

On GitHub · 32

27 more on GitHub

On Bluesky · 4

On Hacker News · 1

  • Sep 20, 2024TypeSpec1 point · 1 comment

Used with

Projects with it also use starter, media-processing and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ww-w-aiSkill

    starter

    Static web development guide for beginners. Covers HTML/CSS/JavaScript and Next.js App Router basics. Project initialization with "init starter". Triggers: static website, portfolio, landing page, HTML CSS, beginner, 정적 웹, 포트폴리오, 초보자, 静的サイト, 初心者, 静态网站, 初学者, sitio web estático, site statique, statische Website, sito web statico Do NOT use for: fullstack apps (use $dynamic), enterprise (use $enterprise).

    Also in 4 projects that use this

  • mrgoonieSkill

    media-processing

    Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.

    Also in 5 projects that use this

  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 15 projects that use this

  • mrgoonieSkill

    aesthetic

    Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

    Also in 4 projects that use this

  • AWSSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 32 projects that use this

  • AWSSkill

    resolving-merge-conflicts

    Use when you need to resolve an in-progress git merge/rebase conflict.

    Also in 48 projects that use this

  • +1 more from mrgoonie
  • +2 more from aws

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 2

    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:

    Every package with a user-visible change needs an entry.

    line 79
  2. Very specific:

    Prefer stable public APIs: Use exported helpers and TypeKits over the checker, symbols, or AST (Tier 2, see §1).

    line 112
  3. Very specific:

    Every new code path, branch, diagnostic, and public API needs a test co-located in the package's test/.

    line 118
  4. Very specific:

    Assert diagnostics with the helpers: Use expectDiagnostics / expectDiagnosticEmpty from @typespec/compiler/testing, not hand-rolled checks …

    line 124
  5. Very specific:

    Verify imports resolve: If a test imports a helper from src, confirm that symbol is actually exported there.

    line 131
  6. Distinctive:

    Unexplained snapshot changes are the headline risk: Every changed snapshot must be an intentional, explained consequence of the change.

    line 144
  7. Distinctive:

    Don't repeat a point another comment already makes.

    line 162

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

TypeSpec code review

Review the diff against the rules this project actually enforces. Every comment must point at a concrete problem in the changed code and cite the rule or code that makes it a problem — if you cannot cite it, do not post it.

Scope

Applies to the whole repository: the pnpm workspace packages (packages/compiler, packages/http, packages/openapi3, packages/json-schema, packages/versioning, …), the language emitter packages (packages/http-client-{csharp,java,python}), .chronus/changes/**, and their tests.

For the language emitter packages, §1 (tier policy) does not apply to their internal APIs and their own rules in .github/instructions/*.instructions.md take precedence — but §2 (changeset), §3 (compiler API usage) and §4 (tests) apply everywhere.

Out of scope — do not comment on:

  • Generated artifacts: pnpm-lock.yaml, generated Python/C#/Java code under generator/, tests/generated/, and generated reference docs under website/src/content/docs/docs/libraries/*/reference/**.
  • Formatting and lint-covered issues — prettier (pnpm format) and oxlint own those.
  • Naming/style preferences, or unchanged code surrounding the diff.

Read before judging

Consult these and cite them in findings:

  • website/src/content/docs/docs/handbook/breaking-change-policy.mdx — the authoritative tier table and the bug exception.
  • .chronus/config.yaml — the valid changeKind values and the changedFiles exclusions.
  • .github/copilot-instructions.md — changelog message guidelines and the TDD expectation.
  • Sibling tests in the touched package — the established tester/assertion patterns.
  • The public compiler API (@typespec/compiler) and @typespec/compiler/testing exports — to confirm a used API exists and behaves as the change assumes.

1. Breaking changes and public surface

Decide which tier each change touches, then whether it breaks an existing spec or consumer. Adding new syntax, types, or capabilities is not breaking; changing how something that already worked behaves is.

  • Tier 0 — language syntax/semantics, the type graph (Type), default TypeKits, exported helper and accessor functions. Flag: an existing valid spec that now parses differently, fails, or produces a different type graph; a removed/renamed export or changed signature; a changed runtime result for existing input; a removed or repurposed field on a Type. Adding a required field to a Type is allowed by policy but breaks downstream construction — call it out.
  • Tier 1 — the AST (Node, SyntaxKind). Appended enum members and new union variants are allowed (TypeScript exhaustiveness errors are explicitly not breaking). Flag renumbered enums (members inserted rather than appended), removed node kinds, and changed shapes of existing nodes.
  • Tier 2 — checker, symbols, @internal / /internals / /experimental exports, template declarations, stdout/stderr output. Not breaking; mention only if a change here silently alters observable behavior.
  • Tier 3 — formatter and emitter output. Semantically equivalent output changes are not breaking; see §5 for the risk that matters.
  • Bug exception. A technically breaking change that fixes clearly unintended behavior is not a breaking change — but say so explicitly rather than staying silent.

A change you judge breaking that has no breaking changeset is the highest-value finding in a review. Raise it first.

2. Changeset (.chronus)

  • Valid changeKind values are exactly: internal, fix, dependencies, feature, deprecation, breaking. Anything else (feat, docs, patch, minor, major) is invalid.
  • The kind must match reality: a new capability is feature, a fix is fix, and anything breaking per §1 is breaking.
  • One entry per package and per change type. A single entry bundling a feature in one package with a fix in another must be split.
  • packages: must list exactly the affected packages.
  • Every package with a user-visible change needs an entry. Missing one is a finding — but note the exclusions in .chronus/config.yaml: **/*.md, test files, and packages/*/test/** don't require a changeset, so docs-only or test-only changes legitimately have none.
  • Message quality: describes the change from the user's perspective; area tag only when targeting a secondary area of a multi-area package, in [bracket] form (e.g. [converter], [formatter]) — no generic core - prefixes; a feature entry includes a short illustrative code block, a simple fix does not.

3. Compiler API usage

Judge whether the change uses the TypeSpec compiler API the way the compiler expects, not merely whether it type-checks.

  • Diagnostic targets decide whether a diagnostic can be suppressed. A diagnostic reported with NoTarget can never be suppressed (packages/compiler/src/core/program.ts — target === NoTarget returns early before the #suppress lookup), and a diagnostic with severity: "error" can never be suppressed either (suppressing one produces suppress-error). So a diagnostic the user is meant to be able to silence must be a warning and carry a real node/type target. Flag any target that resolves to NoTarget on a realistic input as "not actually suppressible".
  • Pick the most precise target available, falling back deliberately: the offending type → the service namespace → program.getGlobalNamespaceType() → NoTarget only for genuinely program-wide failures with no node to point at.
  • Don't assume the program has a service. listServices(program) returns a possibly empty array; [0] is undefined for model-only or service-less programs. Same for any lookup that can return undefined — ask what happens in that case, and whether the diagnostic is still reachable and suppressible there.
  • Severity changes have control-flow consequences. error blocks emission via program.hasError(); downgrading to warning means everything downstream now runs in a state it previously never saw. Verify the continue path is safe and intended.
  • Diagnostic hygiene. Report through the library's reportDiagnostic/createDiagnostic with a catalog entry and stable code; never throw for a user error. The message text must still match the behavior after the change — a message saying the emitter "requires" something it now merely warns about is a finding.
  • Prefer stable public APIs. Use exported helpers and TypeKits over the checker, symbols, or AST (Tier 2, see §1); use resolvePath/joinPaths rather than node:path; exclude template declarations with isTemplateDeclaration when navigating types.

4. Tests

  • Every new code path, branch, diagnostic, and public API needs a test co-located in the package's test/**. New behavior with no test is a finding.
  • Reuse the package's shared tester. Packages export one from test/test-host.ts or test/tester.ts (e.g. packages/http/test/test-host.ts, packages/compiler/test/tester.ts). Calling createTester(...) inline in a new test file duplicates library/import setup and drifts — flag it and point at the existing module.
  • Assert diagnostics with the helpers. Use expectDiagnostics / expectDiagnosticEmpty from @typespec/compiler/testing, not hand-rolled checks like program.diagnostics.some((x) => x.code.endsWith(...)), which silently pass when the code, severity, or target is wrong.
  • Exercise the real entrypoint. A test must drive the shipped path ($onEmit, the decorator, the emitter run) rather than re-implement the logic or call a helper in isolation — otherwise it passes while the actual behavior is broken.
  • Verify imports resolve. If a test imports a helper from src, confirm that symbol is actually exported there; an import of a non-existent export makes the whole file fail to load.
  • Tests must be meaningful: they should fail if the change were reverted. Flag tests that only smoke run or assert nothing specific to the new behavior.
  • Beyond the happy path: error and diagnostic paths, empty/anonymous forms, templates, and negative cases — including the fallback branches identified in §3.
  • Flag any weakening of existing coverage: .skip/.only, deleted assertions, or matchers broadened to make a change pass.

5. Emitter output stability

For packages/{openapi3,openapi,json-schema,http,http-server-*}:

  • Unexplained snapshot changes are the headline risk. Every changed snapshot must be an intentional, explained consequence of the change. A snapshot diff for specs unrelated to the feature means existing users' output changed — raise it.
  • Inline-vs-hoist, component naming, and declaration-creation changes must preserve behavior for existing named types and only affect genuinely new inputs. Anonymous/empty-named types inline; named types hoist without key collisions.
  • $ref and component-key correctness: reordering name validation relative to ref generation must not silently drop validation that previously errored — if that is an intended fix, it needs to be called out and changeset'd.
  • Emitters must handle new type-graph shapes defensively (new node kinds, new union variants) rather than crash on them.

How to comment

  • One issue per comment, anchored on the offending line.
  • State the problem, cite the rule (policy section, .chronus/config.yaml, guideline) or the relevant file:line, and suggest the concrete fix.
  • One or two sentences. No preamble, no summarizing the diff back to the author.
  • Don't repeat a point another comment already makes.
  • Lead with correctness, compatibility, and coverage. Minor suggestions are welcome only when they are actionable and specific.

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.