wdk-review-dts
Skill3 starsChanged 3 months agoApache-2.0View on GitHub
Review and maintain WDK generated .d.ts type definitions (manual updates, exports, internal exclusion, interface/abstract emission, no build:types).
In this repository4 other files it gives its agents.
- code-of-conductSkill
- wdk-review-jsdocsSkill
- wdk-review-testsSkill
- wdkSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
After modifying public JSDoc, do not run npm run build:types (tsc).
- Very specific: line 32
Every new @typedef that's part of the public API must appear in types/index.d.ts.
- Very specific: line 50
When a module extends another WDK module's public types, re-export those types from the extending module's index.js so consumers don't need …
- Very specific: line 85
After resolving review feedback that touches JSDoc or type annotations, hand-edit the affected .d.ts files (do not run npm run build:types) …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
WDK .d.ts Maintenance Review
You are reviewing the generated .d.ts type definitions of a WDK module. Apply the rules below. The rules are repository-agnostic — no WDK module is a "golden reference"; apply every rule to every module equally, and if existing declarations conflict with a rule, the declaration is the candidate for change, not the rule. Type accuracy itself (runtime types matching the .d.ts) is rule R23 in the companion skill wdk-review-jsdocs.
For each violation found, report:
- Rule violated (e.g., TD1, TD2, etc.)
- File and line
- The offending code
- Suggested fix with corrected code
Group findings by file. After all files are reviewed, provide a summary with total violation counts per rule.
Type Definition Conventions
TD1. Update .d.ts manually after API changes — do not run npm run build:types
After modifying public JSDoc, do not run npm run build:types (tsc). Instead, hand-edit the affected .d.ts files so they reflect the JSDoc/type changes, and commit the updated type files alongside the source changes. Only touch the declarations that actually changed.
TD2. Update types/index.d.ts when adding new public types
Every new @typedef that's part of the public API must appear in types/index.d.ts. Add the corresponding declaration manually (see TD1).
TD3. Export new types from index.js
New public types must be re-exported from index.js so consumers can import them.
// index.js
export { default as WalletAccountBtc } from './src/wallet-account-btc.js'
/** @typedef {import('./src/wallet-account-btc.js').GetBalanceResult} GetBalanceResult */TD4. Re-export parent module types from child modules
When a module extends another WDK module's public types, re-export those types from the extending module's index.js so consumers don't need a direct dependency on the parent.
TD5. Export custom error types from both index.js and types/
Custom error classes must be exported from index.js and have corresponding declarations in types/. Consumers need to catch and type-check errors.
TD6. Exclude internal types from types/ folder
Types for internal modules (prefixed with _, inside src/internal/) must not appear in the public types/ output. Use tsconfig.json exclusions or @internal.
TD7. Interfaces use interface in .d.ts
JSDoc @interface classes must generate interface declarations (not class) in .d.ts.
export class IElectrumClient { ... } // wrong
export interface IElectrumClient { ... } // correctTD8. Abstract classes use abstract class in .d.ts
JSDoc @abstract classes must generate abstract class declarations.
TD9. Update .d.ts manually after addressing review changes
After resolving review feedback that touches JSDoc or type annotations, hand-edit the affected .d.ts files (do not run npm run build:types) and include the updated declarations in the follow-up commit.
Review Workflow
- Never regenerate — do not run
npm run build:types(tsc). Hand-edit the affected.d.tsfiles so they reflect the JSDoc/type changes, touching only the declarations that actually changed, and commit them alongside the source changes (TD1, TD9). - Public types exported — every new public
@typedefappears intypes/index.d.tsand is re-exported fromindex.js; parent-module types are re-exported from child modules; and custom error classes are exported from bothindex.jsandtypes/(TD2–TD5). - Internal types excluded — types for internal modules (prefixed with
_, insidesrc/internal/) must never appear in the publictypes/output; enforce this withtsconfig.jsonexclusions or@internal(TD6). - Interface / abstract emission — confirm
@interfaceclasses emitinterfacedeclarations (notclass) and@abstractclasses emitabstract classdeclarations in the.d.ts(TD7, TD8). - Diff and audit — diff the
types/folder against its previous state and review every edit for correctness; treat every removed declaration as a possible public-API regression until you have confirmed the removal is intentional.
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.

