javascript
Debug JavaScript and TypeScript Logic
Async errors, shared mutations, and weak validation can make JavaScript behavior unreliable. This skill guides focused fixes using modern language features and defensive runtime practices.
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "javascript" from https://skillstore.io/skills/shreyam1008-javascript.md and its manifest at https://skillstore.io/api/skills/shreyam1008-javascript/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“javascript”。 My async forEach finishes before all updates complete.
预期结果:
- forEach does not await promises returned by its callback.
- Use sequential iteration when updates depend on earlier results.
- For independent updates, collect promises and await their combined completion.
- Handle rejections explicitly so failed updates remain visible.
正在使用“javascript”。 A zero quantity becomes the default quantity.
预期结果:
- Logical OR treats zero as a missing value because zero is falsy.
- Use nullish coalescing when only null and undefined should trigger the default.
- Check zero, empty strings, null, and undefined against the intended behavior.
正在使用“javascript”。 A browser module leaks memory after repeated mounting and teardown.
预期结果:
- Review listeners, observers, and timers that remain active after teardown.
- Check closures for references to detached DOM nodes.
- Use WeakMap for object metadata when the metadata must not retain its keys.
- WeakRef collection timing is nondeterministic and cannot replace explicit cleanup.
安全审计
安全All 31 static findings are false positives supported by the skill text. Markdown formatting, defensive programming guidance, and a cancellable fetch example explain the matches. No evidence found of prompt injection, unauthorized execution, reconnaissance, or data exfiltration.
风险因素
⚙️ 外部命令 (23)
🌐 网络访问 (1)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/shreyam1008-javascript/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/shreyam1008-javascript?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/shreyam1008-javascript?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/shreyam1008-javascript/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/shreyam1008-javascript.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
shreyam1008. (2026). javascript security audit report (audit version 1) [Author version unspecified]. Skillstore. https://skillstore.io/skills/shreyam1008-javascript/audits/1BibTeX 引用
@techreport{shreyam1008-shreyam1008-javascript-2026,
author = {shreyam1008},
title = {javascript security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/shreyam1008-javascript/audits/1},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "javascript security audit report (audit version 1)"
version: "unspecified"
type: report
authors:
- name: "shreyam1008"
date-released: "2026-10-02"
url: "https://skillstore.io/skills/shreyam1008-javascript/audits/1"
identifiers:
- type: other
value: "skillstore:shreyam1008-javascript:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 中你能构建什么
Correct asynchronous workflows
Review promise handling, asynchronous loops, cancellation, and independent operations in application logic.
Review browser safety and cleanup
Check untrusted DOM content, listener teardown, timers, and retained object references during frontend reviews.
Strengthen TypeScript boundaries
Improve external data checks, unknown narrowing, union models, and exported function types.
试试这些提示
Review this JavaScript expression: [expression]. Explain why zero or an empty string receives the fallback, and suggest a nullish default.
Review this async loop: [code]. Explain completion and rejection behavior, then suggest sequential or concurrent processing based on [requirements].
Review this TypeScript data boundary: [code]. Identify missing runtime validation, unsafe assertions, and HTML risks. Suggest strict types and defensive checks.
Audit this module: [code]. Evaluate stale requests, cancellation, retained references, event cleanup, and exhaustive states. Prioritize fixes and identify runtime compatibility constraints.
最佳实践
- Provide the relevant code, expected behavior, error details, and target runtime.
- Validate external data at boundaries and keep untrusted text away from executable and HTML sinks.
- Verify changes with focused tests, linting, and runtime compatibility checks.
避免
- Use async callbacks in forEach when completion must be awaited.
- Trust TypeScript assertions or TrustedHTML types without runtime validation or sanitization.
- Leave stale requests, listeners, observers, and timers active after teardown.
常见问题
Which AI tools are listed as supported?
Does this skill cover TypeScript?
Does it cover React rendering or UI design?
Does it install dependencies or run tests automatically?
Does the fetch example send information to a service?
Are all recommended APIs available in older runtimes?
开发者详情
作者
shreyam1008许可证
MIT
Skillstore 修订
r1
版本提示
作者未声明版本。
引用
bbec03cf10354f3aaccd6dd24eda4ac9ceeceac5
维护新鲜度
2026/10/2
使用量
0 次下载 · 0 次浏览
文件结构
📄 SKILL.md