stacks-path

Resolve framework-specific absolute and relative project paths for Bun/TypeScript projects.

622|17|Updated Apr 26, 2022
One-click install
npx skills add https://github.com/stacksjs/stacks --skill stacks-path
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacks-path
Source: https://github.com/stacksjs/stacks/tree/main/.claude/skills/stacks-path
Command: npx skills add https://github.com/stacksjs/stacks --skill stacks-path

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manage and resolve path references across every directory in a Stacks project using a unified, framework-aware API, avoiding brittle string concatenation.

Core Features & Use Cases

  • Framework Path Builders: a suite of helpers like actionsPath(), appPath(), databasePath(), and more to produce absolute framework directory paths.
  • Node.js Path Re-exports: access common Node.js path utilities through the Stacks path layer for consistency.
  • Relative Variants & Build Paths: support for relative path variants and dedicated build/framework output paths to streamline tooling and deployment.

Quick Start

Import the stacks-path module and call actionsPath() to resolve an absolute path for a framework directory.

Frequently Asked Questions about stacks-path

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resolve absolute paths for TypeScript project directories?

Type-safe path builders resolve absolute paths for TypeScript project directories by calling framework-aware helpers like actionsPath() or appPath(). They return absolute paths by default and accept an optional relative suffix for flexible directory resolution.

What is the best way to avoid brittle string concatenation for Node.js paths?

Using a unified framework-aware API avoids brittle string concatenation for Node.js paths by re-exporting common path utilities and providing type-safe access to 100+ path builders for app, framework, and resource directories.

Can I generate relative path variants for build output directories?

Yes, you can generate relative path variants for build output directories. The path builders support dedicated build and framework output paths, returning relative paths when you pass an optional relative suffix to functions like databasePath() or storagePath().

Does this path resolution approach work with Bun and TypeScript projects?

Yes, this path resolution approach works with Bun and TypeScript projects. It provides a type-safe API specifically designed to resolve framework-specific paths across actions, app, config, database, models, routes, and storage directories.

How do I get the file path for a specific app directory like models or routes?

You can get the file path for specific app directories by calling dedicated path builders such as modelsPath() or routesPath(). These helpers return the absolute path for the respective framework directory by default, or a relative path with an optional suffix.