skills/check-imports/SKILL.md
Import/export validation post-implementation. Checks that all imports resolve to actual exports, catches broken references and circular dependencies.
npx skillsauth add astro44/Autonom8-Agents check-importsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 |
development
Scores proposal complexity against codebase surface. Uses proposal text analysis and readiness stats to determine decomposition tier and agent count.
testing
Fast filesystem readiness scan — counts docs, source files, manifests, platform signals. Produces initial ReadinessReport for agent spawning decisions.
testing
Merges bookend agent reports into revised readiness, complexity, and decomposition plan. Produces the final evidence-backed assessment consumed by sprint-architect-agent.
development
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.