cargdev/endorsment/alias-guardian

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Refactors relative imports into tsconfig/Vite aliases (e.g., `@/components`) to keep imports consistent and resilient to file moves.

Install

npx vskill@latest install cargdev/endorsment/alias-guardian

SKILL.md

Alias Guardian

When to use this skill

  • Run after adding tsconfig path aliases or when many long relative imports exist.
  • Triggered by prompts to convert ../../.. style imports to @/ aliases.

Instructions

  1. First Step: Ensure tsconfig.json has paths configured ("@/*": ["src/*"]) and vite.config.ts supports the aliases (via vite-tsconfig-paths or manual resolve.alias).
  1. Second Step: Use an AST-based tool (e.g., jscodeshift, ts-morph) or a controlled regex to find and replace relative import paths. Prefer AST to avoid accidental matches.
  1. Third Step: Update affected files' imports to the alias form and run TypeScript to verify no resolution errors.

Examples

  • Before: import PaperCard from '../../components/molecules/PaperCard'
  • After: import PaperCard from '@/components/molecules/PaperCard'

Additional Resources

  • ts-morph: https://github.com/dsherret/ts-morph
  • jscodeshift: https://github.com/facebook/jscodeshift

Notes

  • Always run tests and TypeScript type-check after mass refactors; commit in a dedicated branch and use Git to move files safely.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cargdev/endorsment/alias-guardian/badge)](https://verified-skill.com/skills/cargdev/endorsment/alias-guardian)

Something wrong with this skill or its page? Tell us.