一键导入
check-imports
Import/export validation post-implementation. Checks that all imports resolve to actual exports, catches broken references and circular dependencies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Import/export validation post-implementation. Checks that all imports resolve to actual exports, catches broken references and circular dependencies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Merges bookend agent reports into revised readiness, complexity, and decomposition plan. Produces the final evidence-backed assessment consumed by sprint-architect-agent.
Fast filesystem readiness scan — counts docs, source files, manifests, platform signals. Produces initial ReadinessReport for agent spawning decisions.
Scores proposal complexity against codebase surface. Uses proposal text analysis and readiness stats to determine decomposition tier and agent count.
Generation-time design taste for web UI work. Anti-cliche bans, layout and motion hard rules, and client-intent dials. Advisory only - shapes drafts; declared measured contracts remain the sole gate authority.
Rigorously reasons about definitions, proofs, and computations in algebra, analysis, discrete math, probability, linear algebra, and applied math. Verifies derivations, spots invalid steps, and states assumptions clearly. Use when solving or proving math problems, reviewing mathematical arguments, modeling with equations, interpreting statistics, or when the user mentions proofs, lemmas, theorems, integrals, series, matrices, optimization, or numerical methods.
Visual verification for interactive elements (popups, modals, tooltips). Clicks elements and captures screenshots for analysis. Bypasses MCP browser tool limitations with cross-origin CSS.
| name | check-imports |
| description | Import/export validation post-implementation. Checks that all imports resolve to actual exports, catches broken references and circular dependencies. |
Validates import/export consistency after implementation. Catches broken imports, missing exports, and circular dependencies before code review.
{
"project_dir": "/path/to/project",
"scope": "changed|all",
"ticket_id": "TICKET-XXX"
}
cd $project_dir
# If scope=changed, get modified files
git diff --name-only HEAD~1 | grep -E '\.(js|jsx|ts|tsx|mjs)$'
# If scope=all, get all source files
find src -name "*.js" -o -name "*.jsx" -o -name "*.ts" -o -name "*.tsx"
For each file, extract import statements:
// Named imports
import { Foo, Bar } from './module'
// Default imports
import Baz from './module'
// Namespace imports
import * as Utils from './utils'
// Dynamic imports
const Module = await import('./module')
For each import statement:
1. Resolve import path relative to current file
2. Check if target file exists
3. If named import, check if export exists in target
4. If default import, check for default export
Build dependency graph:
A imports B
B imports C
C imports A → CIRCULAR!
Report cycles that include changed files
{
"skill": "check-imports",
"status": "success|errors",
"files_checked": 8,
"imports_validated": 42,
"issues": [
{
"type": "broken_import",
"file": "src/components/Dashboard.js",
"line": 5,
"import": "{ MetricCard }",
"from": "./MetricCard",
"error": "File not found: src/components/MetricCard.js",
"suggestion": "Check if file was created or path is correct"
},
{
"type": "missing_export",
"file": "src/utils/helpers.js",
"line": 2,
"import": "{ formatDate }",
"from": "./date-utils",
"error": "formatDate is not exported from ./date-utils",
"suggestion": "Add 'export' to formatDate function or check spelling"
},
{
"type": "circular_dependency",
"cycle": ["A.js", "B.js", "C.js", "A.js"],
"severity": "warning",
"suggestion": "Extract shared code to separate module"
}
],
"errors": [],
"warnings": [],
"next_action": "proceed|fix"
}
| Type | Severity | Blocking | Description |
|---|---|---|---|
broken_import | HIGH | YES | Import path doesn't exist |
missing_export | HIGH | YES | Named export not found |
missing_default | HIGH | YES | No default export |
circular_dependency | MEDIUM | NO | Circular import detected |
unused_export | LOW | NO | Export never imported |
Any broken_import or missing_export?
YES → status: "errors", next_action: "fix"
Only circular_dependency warnings?
YES → status: "success", add warnings
No issues?
YES → status: "success", next_action: "proceed"
Check changed files:
{
"project_dir": "/projects/oxygen_site",
"scope": "changed"
}
Check all files:
{
"project_dir": "/projects/oxygen_site",
"scope": "all"
}
Check ticket-specific files:
{
"project_dir": "/projects/oxygen_site",
"scope": "changed",
"ticket_id": "TICKET-OXY-003"
}
| Error | Fix |
|---|---|
| File not found | Check path spelling, ensure file was created |
| Named export missing | Add export keyword or check function name |
| Default export missing | Add export default or use named import |
| Circular dependency | Extract shared code to third module |
| Platform | Import Syntax | Resolution |
|---|---|---|
| JavaScript (ESM) | import/export | Relative paths |
| TypeScript | import/export | tsconfig paths |
| Node.js (CJS) | require/module.exports | node_modules |