michael-andreuzza/astromax/get-tsconfig
Claude Code and agent skill by michael-andreuzza/astromax
- community
Checking that the SKILL.md file is still in the repository.
Find, parse, and query tsconfig.json files — extends resolution, file matching, path alias resolution. Use when reading tsconfig.json, checking if a file belongs to a tsconfig, resolving TypeScript path aliases, or working with tsconfig extends chains.
Install
npx vskill@latest install michael-andreuzza/astromax/get-tsconfigSKILL.md
get-tsconfig
Lightweight tsconfig.json parser. No TypeScript dependency. Tested against tsc for correctness.
API
| Function | Purpose | Returns | ||
|---|---|---|---|---|
getTsconfig(searchPath?, options?) | Find + parse nearest tsconfig | `TsconfigResult \ | undefined` | |
findTsconfig(searchPath?, options?) | Find nearest tsconfig path only | `string \ | undefined` | |
readTsconfig(path, options?) | Parse tsconfig at known path | TsconfigResult | ||
isFileIncluded(tsconfig, filePath) | Check if file is a root file (matches include/exclude/files globs) | boolean | ||
resolvePathAlias(tsconfig, specifier) | Resolve compilerOptions.paths alias | string[] | ||
getExtendsChain(path, options?) | Get raw extends chain before merging | TsconfigResult<TsconfigJson>[] | ||
resolveExtendsChain(chain) | Merge a collected chain (pure, no fs) | TsconfigResult |
Types
Use cases
Build tool / loader integration
Monorepo — per-file tsconfig lookup
The nearest tsconfig typically applies. Use getTsconfig with the file path — it walks up and finds the right one:
Cache deduplicates filesystem reads across calls. Create a new Map() to invalidate after filesystem changes.
Implied compiler options
Implied options are already normalized — no need to check parent flags:
Options not set and not implied remain undefined (not false). Use ?? false for boolean checks.
Watch mode — extends chain files
Modify config before merging
Language Server behavior
Understanding isFileIncluded
Checks whether a file matches include/exclude/files globs — whether it's a root file. This is NOT the same as "is this file part of the TypeScript program."
| Source | What it adds | Checked by isFileIncluded? | |
|---|---|---|---|
include/files globs | Root files | Yes | |
| Transitive imports | Files imported by root files (recursive) | No | |
@types packages | Auto-discovered from node_modules/@types/ | No | |
| Triple-slash directives | /// <reference path="..." /> | No |
- `exclude` only filters glob matching — if a root file imports an excluded file, that file is still in the program.
- `isFileIncluded` returning `false` doesn't mean the file won't be compiled — it may be pulled in via imports.
- For finding the nearest tsconfig regardless of glob matching, use
getTsconfig(filePath)withoutincludes.
Gotchas
| Issue | Detail | |
|---|---|---|
| Immutable tsconfig objects | isFileIncluded and resolvePathAlias cache per object identity. Do not mutate after first call. | |
extends must be resolved | isFileIncluded throws if config.extends is present. Use getTsconfig/readTsconfig output. | |
resolvePathAlias returns candidates | Returns paths from compilerOptions.paths, not verified files. Check existence yourself. | |
getExtendsChain resolves extends | The extends field in each entry is an absolute path, not the original string. |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingnode_modules/get-tsconfig/skills/get-tsconfig/SKILL.md
Popularity
- Repository stars
- 170
- Repository forks
- 51
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. 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
[](https://verified-skill.com/skills/michael-andreuzza/astromax/get-tsconfig)