Nx project

From qauth-labs/qauth · View interactive version

Nx project is an AI agent skill from the GitHub repository qauth-labs/qauth. Create and manage Nx projects (libraries and applications). Use when creating new libs, organizing projects, or setting up project tags and dependencies.

How to use this skill

Skill file

Nx Project Management

Project Naming Convention

Library Domains

| Domain | Path | Tag |

| ----------------- | ----------------------------- | ---------------------- |

| fastify/plugins | libs/fastify/plugins/{name} | scope:fastify-plugin |

| infra | libs/infra/{name} | scope:infra |

| server | libs/server/{name} | scope:server |

| shared | libs/shared/{name} | scope:shared |

Module Boundaries

| Source Tag | Only Depend On |

| --------------- | -------------------------------------------------------------- |

| scope:shared | scope:shared |

| type:testing | scope:shared, scope:infra, scope:server, scope:fastify |

| scope:infra | scope:infra, scope:shared |

| scope:server | scope:server, scope:shared |

| scope:fastify | scope:fastify, scope:server, scope:infra, scope:shared |

| scope:app | scope:fastify, scope:shared, scope:server-config |

Creating New Libraries

ALWAYS use Nx generators. NEVER create libraries manually.

pnpm nx generate @nx/js:library \
  --name={name} \
  --directory=libs/{domain}/{name} \
  --projectNameAndRootFormat=as-provided \
  --importPath=@qauth-labs/{domain}-{name} \
  --bundler=none \
  --linter=none \
  --unitTestRunner=none \
  --no-interactive

Examples

# Server library
pnpm nx generate @nx/js:library \
  --name=auth \
  --directory=libs/server/auth \
  --projectNameAndRootFormat=as-provided \
  --importPath=@qauth-labs/{domain}-{name} \
  --bundler=none \
  --linter=none \
  --unitTestRunner=none \
  --no-interactive

# Fastify plugin
pnpm nx generate @nx/js:library \
  --name=auth \
  --directory=libs/fastify/plugins/auth \
  --projectNameAndRootFormat=as-provided \
  --importPath=@qauth-labs/{domain}-{name} \
  --bundler=none \
  --linter=none \
  --unitTestRunner=none \
  --no-interactive

After Generation

  1. Add tags to project.json:

```json

"tags": ["scope:{domain}", "type:{type}"]

```

  1. Update index.ts exports
  1. Verify path alias in tsconfig.base.json

Project Tags

Viewing Projects

pnpm nx show project {project-name}
pnpm nx graph
pnpm nx show projects
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.