coding-standards-current
Review or implement TypeScript and JavaScript changes using the project's actual types, ownership boundaries and failure contracts. Use for cross-cutting correctness reviews; load framework-specific guidance only when that framework is involved.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- coding-standards-current
- license
- MIT
- description
- Review or implement TypeScript and JavaScript changes using the project's actual types, ownership boundaries and failure contracts. Use for cross-cutting correctness reviews; load framework-specific guidance only when that framework is involved.
02 资源文件 5
- 许可证LICENSE1.0 KB
- 参考文档NOTICE.md879 B
- 参考文档provenance/original-agents/openai.yaml261 B
- 参考文档provenance/original-SKILL.md11.5 KB
- 脚本references/contracts.ts633 B
03 SKILL.md 正文
Coding standards
Apply the repository's mandatory agent tools
and controlling instructions before relevant work. This experimental overlay
preserves the locked source in provenance/; agent efficacy is unbenchmarked.
Start with the installed versions, callers and observable acceptance criteria. Use the existing compiler, formatter and architecture. Introduce an abstraction only when a demonstrated boundary or repeated behavior needs it.
- Treat incoming values as
unknownuntil validated. A generic return type oras Tassertion does not validate JSON. Keep invalid input, transport failure and programming errors distinct. With Zod 4, useerror.issues, not the removederror.errors. Validate at trust boundaries; do not impose a schema library on a project that already has one. - Preserve ownership: never mutate props, shared inputs or existing state. Mutating a newly created local array is fine. Copy before sorting a shared array. Use functional state updates when the next value depends on previous state; an independent replacement need not be a function.
- Check HTTP status before interpreting a success body. Keep the original
exception or attach it as
causewhen adding useful context. Propagate cancellation without converting it into a generic failure. Log once at the appropriate boundary, excluding secrets and sensitive bodies. - Await independent work together only when its failure and resource semantics
permit it.
Promise.alldoes not cancel sibling operations. Use explicit cancellation or settlement when cleanup or all results are required. - Prefer a discriminated result type when success and failure carry different fields. Match existing public contracts; a universal envelope or mandatory REST shape is not a reason to break clients.
- Name the behavior and its inputs clearly. Keep the patch scoped to the task.
Comments explain a nonobvious contract; they do not certify correctness with
a
GOODlabel. Avoid blanket bans on nesting, mutation or sequential work.
For copyable examples of sorting, status checks and Zod issues, read
contracts.ts. Its JSON result deliberately remains
unknown: callers must validate the expected payload. For React requests, use
the framework's existing data layer and the request-lifecycle review in the
separate frontend overlay.
Verify the changed boundary with meaningful failures: malformed input, non-success HTTP status, cancellation or a rejected dependency, and a frozen shared input where relevant. Type-check against the actual dependency versions. Report what ran and what remains untested. Component controls are not evidence that a skill improves an AI agent's performance.
04 同仓库更多 Skills
makefile-generator-project-wrappers
Repair Python, Java and generic GNU Make wrappers that report false success, miss changed inputs or clean dependency environments. Preserve the actual project build system and test runner; use when adapting the collection's original Makefile generator.
makefile-generator-go
Author or repair GNU Make wrappers for Go modules, retaining Go's dependency discovery and build cache. Use when wrapper timestamps hide embedded-resource changes or build failures; preserve the project's existing build system and real test commands.
strategic-compact-resume
Checkpoint and resume long agent work when context pressure or a handoff could lose constraints, verified progress, or ownership of active jobs.
makefile-generator-cpp
Author or repair GNU Make builds for C++ executables, preserving compiler/linker flags, header dependencies and real project test contracts. Use the optional scaffold for a flat src directory; retain an existing build system unless the task requires changing it.
eval-harness-integrity
Design and verify matched coding-agent evaluations when comparing skills, prompts, models, or harnesses using executable acceptance checks and native result evidence.
eval-harness-evidence
Design and verify matched coding-agent evaluations when comparing skills, prompts, models, or harnesses using executable acceptance checks and native result evidence.