Development v1.0.0

missing-imports

Code uses a symbol that isn't imported, or imports a symbol that doesn't exist in the source module.

mvogt99 更新于 2026-04-27 1 浏览
下载 SKILL

技能说明

Code uses a symbol that isn't imported, or imports a symbol that doesn't exist in the source module.

使用场景

The generated code uses a name that hasn't been brought into scope, or imports from a module that doesn't export the named symbol. A guaranteed runtime NameError / ReferenceError / ImportError.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/missing-imports
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 16 kB
SKILL.md text/markdown
---
name: missing-imports
description: Code uses a symbol that isn't imported, or imports a symbol that doesn't exist in the source module.
emoji: 📦
metadata:
  clawdis:
    os: [macos, linux, windows]
---

# missing-imports

The generated code uses a name that hasn't been brought into scope, or imports from a module that doesn't export the named symbol. A guaranteed runtime `NameError` / `ReferenceError` / `ImportError`.

## Symptoms

- Code uses `Foo` but `Foo` is never imported.
- `from mod import X` where `mod` exists but does not export `X`.
- `import { x } from "pkg"` with no matching named export.
- Static analysis flags `unused-import` alongside `undefined-name` — common when the agent copy-pastes between files.

## What to do

- For every symbol used in the diff, confirm there is a corresponding import in the same file or that the symbol is defined locally.
- For every new import, verify the target module actually exports that name. Open the module if needed.
- Don't guess at package layout. When unsure, read the package's `package.json` exports, `__init__.py`, or equivalent.
- Run the static checker (tsc, mypy, pyright, etc.) after every non-trivial change. Missing imports almost always surface there.
- Remove unused imports in the same change so the surface stays honest — stale imports mask real failures.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。