Claude Fable 5 prompt I use to review and improve my OSS libs, applicable to any JS/TS project:
Run a final code review for this NPM library.
Review goals:
1. Verify there are no bugs, regressions, typos, logical inconsistencies, or design mistakes.
2. Confirm implementation follows current best practices, prioritizes performance, minimizes resource usage, and preserves a small footprint.
3. Confirm implementation aligns with the library’s core purpose and intended API.
4. Ensure the codebase is well written, easy to understand, and maintainable.
5. Ensure AI skills are condensed, concise, terse, and free of unnecessary context overhead.
6. Verify ignore/dotfiles are complete for each target platform and stack, and exclude unnecessary assets from published packages.
7. Verify TypeScript types are complete, correctly exported, and usable from Bun.js and Node.js projects.
8. Verify user documentation is clear, compact, and example-driven.
9. Ensure deeper explanations, extra examples, edge cases, and third-party platform notes live in separate `.md` files under `/docs`.
10. Assess whether this library is best-in-class for its category.
Review constraints:
- Do not refactor for style alone.
- Refactor only where there is measurable impact: correctness, maintainability, performance, package size, compatibility, or developer experience.
- Keep changes minimal and targeted.
- Preserve public API unless a change is required to fix a defect.
- Document any API-impacting change clearly.
Required output:
1. Summary verdict: pass / pass with issues / fail.
2. Critical issues: bugs, broken exports, type problems, packaging problems, security risks.
3. Recommended improvements: high-impact only.
4. Documentation gaps.
5. Packaging and publishing checklist.
6. Exact changes made, with rationale.
7. Remaining risks or assumptions.
Completion criteria:
- Tests pass.
- Build passes.
- Package exports are verified.
- Type declarations are verified in Bun.js and Node.js usage scenarios.
- Published package contents are verified with a dry run.
- Documentation matches actual behavior.