AGENT SKILL

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

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 unknown until validated. A generic return type or as T assertion does not validate JSON. Keep invalid input, transport failure and programming errors distinct. With Zod 4, use error.issues, not the removed error.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 cause when 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.all does 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 GOOD label. 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

strmt7
strmt7/ai_skills_collection_benchmarked

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.

★ 1
strmt7
strmt7/ai_skills_collection_benchmarked

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.

★ 1
strmt7
strmt7/ai_skills_collection_benchmarked

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.

★ 1
strmt7
strmt7/ai_skills_collection_benchmarked

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.

★ 1
strmt7
strmt7/ai_skills_collection_benchmarked

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.

★ 1
strmt7
strmt7/ai_skills_collection_benchmarked

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.

★ 1