@skyf0xx/hedgehog-core-full-stack-app 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.core.md +147 -0
- package/LICENSE +21 -0
- package/README.md +41 -0
- package/agents/backend-eng.md +189 -0
- package/agents/front-end-eng.md +176 -0
- package/agents/ux-planner.md +174 -0
- package/hedgehog-core.yaml +20 -0
- package/package.json +41 -0
- package/skills/hedgehog-bootstrap/SKILL.md +324 -0
- package/skills/hedgehog-bootstrap-full-stack-app-core/SKILL.md +411 -0
- package/skills/hedgehog-loop/SKILL.md +643 -0
- package/skills/link-workspace-packages/SKILL.md +41 -0
- package/skills/nx-generate/SKILL.md +165 -0
- package/skills/nx-run-tasks/SKILL.md +52 -0
- package/skills/nx-workspace/SKILL.md +261 -0
- package/skills/nx-workspace/references/AFFECTED.md +27 -0
- package/vendor-skills/GSAP/ATTRIBUTION.md +30 -0
- package/vendor-skills/GSAP/LICENSE +21 -0
- package/vendor-skills/GSAP/gsap-core/SKILL.md +254 -0
- package/vendor-skills/GSAP/gsap-frameworks/SKILL.md +266 -0
- package/vendor-skills/GSAP/gsap-performance/SKILL.md +79 -0
- package/vendor-skills/GSAP/gsap-plugins/SKILL.md +433 -0
- package/vendor-skills/GSAP/gsap-react/SKILL.md +136 -0
- package/vendor-skills/GSAP/gsap-scrolltrigger/SKILL.md +296 -0
- package/vendor-skills/GSAP/gsap-timeline/SKILL.md +107 -0
- package/vendor-skills/GSAP/gsap-utils/SKILL.md +284 -0
- package/vendor-skills/GSAP/llms.txt +39 -0
- package/workspace/.env.example +5 -0
- package/workspace/.github/workflows/phase-gate.yml +17 -0
- package/workspace/.prettierignore +5 -0
- package/workspace/.prettierrc +3 -0
- package/workspace/.vscode/extensions.json +3 -0
- package/workspace/apps/api/eslint.config.mjs +3 -0
- package/workspace/apps/api/package.json +117 -0
- package/workspace/apps/api/src/app/app.module.spec.ts +15 -0
- package/workspace/apps/api/src/app/app.module.ts +15 -0
- package/workspace/apps/api/src/app/feature-modules.ts +8 -0
- package/workspace/apps/api/src/app/health.controller.ts +9 -0
- package/workspace/apps/api/src/assets/.gitkeep +0 -0
- package/workspace/apps/api/src/main.ts +32 -0
- package/workspace/apps/api/tsconfig.app.json +22 -0
- package/workspace/apps/api/tsconfig.json +13 -0
- package/workspace/apps/api/tsconfig.spec.json +36 -0
- package/workspace/apps/api/vitest.config.mts +18 -0
- package/workspace/apps/api/webpack.config.cjs +25 -0
- package/workspace/apps/api-e2e/eslint.config.mjs +3 -0
- package/workspace/apps/api-e2e/package.json +28 -0
- package/workspace/apps/api-e2e/src/api/api.spec.ts +11 -0
- package/workspace/apps/api-e2e/src/support/global-setup.ts +17 -0
- package/workspace/apps/api-e2e/src/support/test-setup.ts +6 -0
- package/workspace/apps/api-e2e/tsconfig.json +10 -0
- package/workspace/apps/api-e2e/tsconfig.spec.json +28 -0
- package/workspace/apps/api-e2e/vitest.config.mts +20 -0
- package/workspace/apps/web/.env.example +12 -0
- package/workspace/apps/web/.prettierrc.js +10 -0
- package/workspace/apps/web/.swcrc +30 -0
- package/workspace/apps/web/components.json +21 -0
- package/workspace/apps/web/eslint.config.mjs +12 -0
- package/workspace/apps/web/index.d.ts +7 -0
- package/workspace/apps/web/next-env.d.ts +7 -0
- package/workspace/apps/web/next.config.js +9 -0
- package/workspace/apps/web/package.json +38 -0
- package/workspace/apps/web/postcss.config.mjs +7 -0
- package/workspace/apps/web/public/.gitkeep +0 -0
- package/workspace/apps/web/public/favicon.ico +0 -0
- package/workspace/apps/web/src/app/global.css +83 -0
- package/workspace/apps/web/src/app/layout.tsx +34 -0
- package/workspace/apps/web/src/app/module-routes.ts +13 -0
- package/workspace/apps/web/src/app/page.tsx +34 -0
- package/workspace/apps/web/src/app/providers.tsx +12 -0
- package/workspace/apps/web/src/components/theme-toggle.spec.tsx +20 -0
- package/workspace/apps/web/src/components/theme-toggle.tsx +32 -0
- package/workspace/apps/web/src/components/ui/button.tsx +60 -0
- package/workspace/apps/web/src/lib/utils.ts +6 -0
- package/workspace/apps/web/src/test-setup.ts +1 -0
- package/workspace/apps/web/tsconfig.json +62 -0
- package/workspace/apps/web/tsconfig.spec.json +37 -0
- package/workspace/apps/web/vitest.config.mts +27 -0
- package/workspace/apps/web-e2e/eslint.config.mjs +12 -0
- package/workspace/apps/web-e2e/package.json +10 -0
- package/workspace/apps/web-e2e/playwright.config.mts +75 -0
- package/workspace/apps/web-e2e/src/example.spec.ts +7 -0
- package/workspace/apps/web-e2e/tsconfig.json +26 -0
- package/workspace/commitlint.config.cjs +3 -0
- package/workspace/core.yaml +68 -0
- package/workspace/docker-compose.yml +14 -0
- package/workspace/eslint.config.mjs +15 -0
- package/workspace/gitignore.template +24 -0
- package/workspace/lefthook.yml +52 -0
- package/workspace/nx.json +90 -0
- package/workspace/package.json +99 -0
- package/workspace/packages/config/eslint-base.js +205 -0
- package/workspace/packages/config/package.json +28 -0
- package/workspace/packages/config/prettier.js +13 -0
- package/workspace/packages/config/src/env.schema.spec.ts +38 -0
- package/workspace/packages/config/src/env.schema.ts +18 -0
- package/workspace/packages/config/src/index.ts +1 -0
- package/workspace/packages/config/tsconfig.json +13 -0
- package/workspace/packages/config/tsconfig.lib.json +27 -0
- package/workspace/packages/config/tsconfig.spec.json +34 -0
- package/workspace/packages/config/vitest.config.mts +18 -0
- package/workspace/packages/db/package.json +27 -0
- package/workspace/packages/db/src/index.ts +2 -0
- package/workspace/packages/db/src/lib/db.spec.ts +48 -0
- package/workspace/packages/db/src/lib/db.ts +54 -0
- package/workspace/packages/db/src/schema/index.ts +4 -0
- package/workspace/packages/db/tsconfig.json +13 -0
- package/workspace/packages/db/tsconfig.lib.json +27 -0
- package/workspace/packages/db/tsconfig.spec.json +34 -0
- package/workspace/packages/db/vitest.config.mts +18 -0
- package/workspace/pnpm-lock.yaml +23719 -0
- package/workspace/pnpm-workspace.yaml +7 -0
- package/workspace/tools/generate-feature-modules.cjs +104 -0
- package/workspace/tools/generate-module-routes.cjs +89 -0
- package/workspace/tools/generators/contract/generator.ts +336 -0
- package/workspace/tools/generators/contract/schema.json +24 -0
- package/workspace/tools/generators/controller/generator.ts +390 -0
- package/workspace/tools/generators/controller/schema.json +24 -0
- package/workspace/tools/generators/fields.ts +160 -0
- package/workspace/tools/generators/generators.json +42 -0
- package/workspace/tools/generators/hook/generator.ts +291 -0
- package/workspace/tools/generators/hook/schema.json +19 -0
- package/workspace/tools/generators/lib-shell.ts +124 -0
- package/workspace/tools/generators/naming.ts +84 -0
- package/workspace/tools/generators/package.json +6 -0
- package/workspace/tools/generators/repository/generator.ts +298 -0
- package/workspace/tools/generators/repository/schema.json +15 -0
- package/workspace/tools/generators/schema/generator.ts +169 -0
- package/workspace/tools/generators/schema/schema.json +20 -0
- package/workspace/tools/generators/screen/generator.ts +218 -0
- package/workspace/tools/generators/screen/schema.json +15 -0
- package/workspace/tools/generators/service/generator.ts +270 -0
- package/workspace/tools/generators/service/schema.json +19 -0
- package/workspace/tools/phase-gate.cjs +77 -0
- package/workspace/tsconfig.base.json +21 -0
- package/workspace/tsconfig.json +25 -0
- package/workspace/vitest.workspace.ts +4 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: link-workspace-packages
|
|
3
|
+
description: 'Link workspace packages in the Hedgehog pnpm monorepo. USE WHEN: (1) you just created or generated new packages and need to wire up their dependencies, (2) code imports from a sibling package and needs it added as a dependency, (3) you get resolution errors for workspace packages (@org/*) like "cannot find module", "failed to resolve import", "TS2307", or "cannot resolve". DO NOT patch around with tsconfig paths or manual package.json edits - use pnpm''s workspace commands to fix actual linking.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Link Workspace Packages
|
|
7
|
+
|
|
8
|
+
Add dependencies between packages in the workspace using pnpm's `workspace:` protocol — symlinks are only created when a dependency is explicitly declared this way.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Identify consumer package (the one importing)
|
|
13
|
+
2. Identify provider package(s) (being imported)
|
|
14
|
+
3. Add the dependency:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# From consumer directory
|
|
18
|
+
pnpm add @org/ui --workspace
|
|
19
|
+
|
|
20
|
+
# Or with --filter from anywhere
|
|
21
|
+
pnpm add @org/ui --filter @org/app --workspace
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Result in `package.json`:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{ "dependencies": { "@org/ui": "workspace:*" } }
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
4. Verify the symlink was created in the consumer's `node_modules/@org/<package>`
|
|
31
|
+
|
|
32
|
+
## Debugging "Cannot find module"
|
|
33
|
+
|
|
34
|
+
1. Check if the dependency is declared in the consumer's `package.json`
|
|
35
|
+
2. If not, add it using the command above
|
|
36
|
+
3. Run `pnpm install`
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
|
|
40
|
+
- pnpm uses strict isolation (no hoisting) — a package must be an explicit dependency to be resolvable, even if it's installed elsewhere in the workspace. This prevents phantom deps.
|
|
41
|
+
- Root `package.json` should have `"private": true` to prevent accidental publish.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nx-generate
|
|
3
|
+
description: Generate code using nx generators. INVOKE IMMEDIATELY when user mentions scaffolding, setup, structure, creating apps/libs, or setting up project structure. Trigger words - scaffold, setup, create a new app, create a new lib, project structure, generate, add a new project. ALWAYS use this BEFORE calling nx_docs or exploring - this skill handles discovery internally.
|
|
4
|
+
subagent: general-purpose
|
|
5
|
+
context: fork
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Run Nx Generator
|
|
9
|
+
|
|
10
|
+
Nx generators are powerful tools that scaffold projects, make automated code migrations or automate repetitive tasks in a monorepo. They ensure consistency across the codebase and reduce boilerplate work.
|
|
11
|
+
|
|
12
|
+
This skill applies when the user wants to:
|
|
13
|
+
|
|
14
|
+
- Create new projects like libraries or applications
|
|
15
|
+
- Scaffold features or boilerplate code
|
|
16
|
+
- Run workspace-specific or custom generators
|
|
17
|
+
- Do anything else that an nx generator exists for
|
|
18
|
+
|
|
19
|
+
## Key Principles
|
|
20
|
+
|
|
21
|
+
1. **Always use `--no-interactive`** - Prevents prompts that would hang execution
|
|
22
|
+
2. **Read the generator source code** - The schema alone is not enough; understand what the generator actually does
|
|
23
|
+
3. **Match existing repo patterns** - Study similar artifacts in the repo and follow their conventions
|
|
24
|
+
4. **Verify with lint/test/build/typecheck etc.** - Generated code must pass verification, using whatever targets are appropriate for this workspace (CI config is a good guide for which ones are critical).
|
|
25
|
+
|
|
26
|
+
## Steps
|
|
27
|
+
|
|
28
|
+
### 1. Discover Available Generators
|
|
29
|
+
|
|
30
|
+
Use the Nx CLI to discover available generators:
|
|
31
|
+
|
|
32
|
+
- List all generators for a plugin: `pnpm nx list @nx/react`
|
|
33
|
+
- View available plugins: `pnpm nx list`
|
|
34
|
+
|
|
35
|
+
This includes plugin generators (e.g., `@nx/react:library`) and local workspace generators.
|
|
36
|
+
|
|
37
|
+
### 2. Match Generator to User Request
|
|
38
|
+
|
|
39
|
+
Identify which generator(s) could fulfill the user's needs. Consider what artifact type they want, which framework is relevant, and any specific generator names mentioned.
|
|
40
|
+
|
|
41
|
+
**IMPORTANT**: When both a local workspace generator and an external plugin generator could satisfy the request, **always prefer the local workspace generator**. Local generators are customized for the specific repo's patterns.
|
|
42
|
+
|
|
43
|
+
If no suitable generator exists, you can stop using this skill. However, the burden of proof is high—carefully consider all available generators before deciding none apply.
|
|
44
|
+
|
|
45
|
+
### 3. Get Generator Options
|
|
46
|
+
|
|
47
|
+
Use the `--help` flag to understand available options:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pnpm nx g @nx/react:library --help
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Pay attention to required options, defaults that might need overriding, and options relevant to the user's request.
|
|
54
|
+
|
|
55
|
+
### Library Buildability
|
|
56
|
+
|
|
57
|
+
**Default to non-buildable libraries** unless there's a specific reason for buildable.
|
|
58
|
+
|
|
59
|
+
| Type | When to use | Generator flags |
|
|
60
|
+
| --------------------------- | ----------------------------------------------------------------- | ----------------------------------- |
|
|
61
|
+
| **Non-buildable** (default) | Internal monorepo libs consumed by apps | No `--bundler` flag |
|
|
62
|
+
| **Buildable** | Publishing to npm, cross-repo sharing, stable libs for cache hits | `--bundler=vite` or `--bundler=swc` |
|
|
63
|
+
|
|
64
|
+
Non-buildable libs:
|
|
65
|
+
|
|
66
|
+
- Export `.ts`/`.tsx` source directly
|
|
67
|
+
- Consumer's bundler compiles them
|
|
68
|
+
- Faster dev experience, less config
|
|
69
|
+
|
|
70
|
+
Buildable libs:
|
|
71
|
+
|
|
72
|
+
- Have their own build target
|
|
73
|
+
- Useful for stable libs that rarely change (cache hits)
|
|
74
|
+
- Required for npm publishing
|
|
75
|
+
|
|
76
|
+
**If unclear, ask the user:** "Should this library be buildable (own build step, better caching) or non-buildable (source consumed directly, simpler setup)?"
|
|
77
|
+
|
|
78
|
+
### 4. Read Generator Source Code
|
|
79
|
+
|
|
80
|
+
**This step is critical.** The schema alone does not tell you everything. Reading the source code helps you:
|
|
81
|
+
|
|
82
|
+
- Know exactly what files will be created/modified and where
|
|
83
|
+
- Understand side effects (updating configs, installing deps, etc.)
|
|
84
|
+
- Identify behaviors and options not obvious from the schema
|
|
85
|
+
- Understand how options interact with each other
|
|
86
|
+
|
|
87
|
+
To find generator source code:
|
|
88
|
+
|
|
89
|
+
- For plugin generators: Use `node -e "console.log(require.resolve('@nx/<plugin>/generators.json'));"` to find the generators.json, then locate the source from there
|
|
90
|
+
- If that fails, read directly from `node_modules/<plugin>/generators.json`
|
|
91
|
+
- For local generators: Typically in `tools/generators/` or a local plugin directory. Search the repo for the generator name.
|
|
92
|
+
|
|
93
|
+
After reading the source, reconsider: Is this the right generator? If not, go back to step 2.
|
|
94
|
+
|
|
95
|
+
> **⚠️ `--directory` flag behavior can be misleading.**
|
|
96
|
+
> It should specify the full path of the generated library or component, not the parent path that it will be generated in.
|
|
97
|
+
>
|
|
98
|
+
> ```bash
|
|
99
|
+
> # ✅ Correct - directory is the full path for the library
|
|
100
|
+
> nx g @nx/react:library --directory=libs/my-lib
|
|
101
|
+
> # generates libs/my-lib/package.json and more
|
|
102
|
+
>
|
|
103
|
+
> # ❌ Wrong - this will create files at libs and libs/src/...
|
|
104
|
+
> nx g @nx/react:library --name=my-lib --directory=libs
|
|
105
|
+
> # generates libs/package.json and more
|
|
106
|
+
> ```
|
|
107
|
+
|
|
108
|
+
### 5. Examine Existing Patterns
|
|
109
|
+
|
|
110
|
+
Before generating, examine the target area of the codebase:
|
|
111
|
+
|
|
112
|
+
- Look at similar existing artifacts (other libraries, applications, etc.)
|
|
113
|
+
- Identify naming conventions, file structures, and configuration patterns
|
|
114
|
+
- Note which test runners, build tools, and linters are used
|
|
115
|
+
- Configure the generator to match these patterns
|
|
116
|
+
|
|
117
|
+
### 6. Dry-Run to Verify File Placement
|
|
118
|
+
|
|
119
|
+
**Always run with `--dry-run` first** to verify files will be created in the correct location:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
pnpm nx g @nx/react:library --name=my-lib --dry-run --no-interactive
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Review the output carefully. If files would be created in the wrong location, adjust your options based on what you learned from the generator source code.
|
|
126
|
+
|
|
127
|
+
Note: Some generators don't support dry-run (e.g., if they install npm packages). If dry-run fails for this reason, proceed to running the generator for real.
|
|
128
|
+
|
|
129
|
+
### 7. Run the Generator
|
|
130
|
+
|
|
131
|
+
Execute the generator:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pnpm nx generate <generator-name> <options> --no-interactive
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
> **Tip:** New packages often need workspace dependencies wired up (e.g., importing shared types, being consumed by apps). The `link-workspace-packages` skill can help add these correctly.
|
|
138
|
+
|
|
139
|
+
### 8. Modify Generated Code (If Needed)
|
|
140
|
+
|
|
141
|
+
Generators provide a starting point. Modify the output as needed to:
|
|
142
|
+
|
|
143
|
+
- Add or modify functionality as requested
|
|
144
|
+
- Adjust imports, exports, or configurations
|
|
145
|
+
- Integrate with existing code patterns
|
|
146
|
+
|
|
147
|
+
**Important:** If you replace or delete generated test files (e.g., `*.spec.ts`), either write meaningful replacement tests or remove the `test` target from the project configuration. Empty test suites will cause `nx test` to fail.
|
|
148
|
+
|
|
149
|
+
### 9. Format and Verify
|
|
150
|
+
|
|
151
|
+
Format all generated/modified files:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
pnpm nx format --fix
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
This example is for built-in nx formatting with prettier. There might be other formatting tools for this workspace, use these when appropriate.
|
|
158
|
+
|
|
159
|
+
Then verify the generated code works. Keep in mind that the changes you make with a generator or subsequent modifications might impact various projects so it's usually not enough to only run targets for the artifact you just created.
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
pnpm nx run-many -t build,lint,test,typecheck
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
If verification fails with manageable issues (a few lint errors, minor type issues), fix them. If issues are extensive, attempt obvious fixes first, then escalate to the user with details about what was generated, what's failing, and what you've attempted.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nx-run-tasks
|
|
3
|
+
description: Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run tasks via `pnpm nx` (see the `nx-workspace` skill for the pnpm-only convention and for checking which targets a project has before running one).
|
|
7
|
+
|
|
8
|
+
For more details on any command, run it with `--help` (e.g. `pnpm nx run-many --help`, `pnpm nx affected --help`).
|
|
9
|
+
|
|
10
|
+
## Run a single task
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
pnpm nx run <project>:<task>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
where `project` is the project name defined in `package.json` or `project.json` (if present).
|
|
17
|
+
|
|
18
|
+
## Run multiple tasks
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
pnpm nx run-many -t build test lint typecheck
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
You can pass a `-p` flag to filter to specific projects, otherwise it runs on all projects. You can also use `--exclude` to exclude projects, and `--parallel` to control the number of parallel processes (default is 3).
|
|
25
|
+
|
|
26
|
+
Examples:
|
|
27
|
+
|
|
28
|
+
- `pnpm nx run-many -t test -p proj1 proj2` — test specific projects
|
|
29
|
+
- `pnpm nx run-many -t test --projects=*-app --exclude=excluded-app` — test projects matching a pattern
|
|
30
|
+
- `pnpm nx run-many -t test --projects=tag:api-*` — test projects by tag
|
|
31
|
+
|
|
32
|
+
## Run tasks for affected projects
|
|
33
|
+
|
|
34
|
+
Use `pnpm nx affected` to only run tasks on projects that have been changed and projects that depend on changed projects. This is especially useful in CI and for large workspaces.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
pnpm nx affected -t build test lint
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
By default it compares against the base branch. You can customize this:
|
|
41
|
+
|
|
42
|
+
- `pnpm nx affected -t test --base=main --head=HEAD` — compare against a specific base and head
|
|
43
|
+
- `pnpm nx affected -t test --files=libs/mylib/src/index.ts` — specify changed files directly
|
|
44
|
+
|
|
45
|
+
## Useful flags
|
|
46
|
+
|
|
47
|
+
These flags work with `run`, `run-many`, and `affected`:
|
|
48
|
+
|
|
49
|
+
- `--skipNxCache` — rerun tasks even when results are cached
|
|
50
|
+
- `--verbose` — print additional information such as stack traces
|
|
51
|
+
- `--nxBail` — stop execution after the first failed task
|
|
52
|
+
- `--configuration=<name>` — use a specific configuration (e.g. `production`)
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nx-workspace
|
|
3
|
+
description: "Explore and understand Nx workspaces. USE WHEN answering questions about the workspace, projects, or tasks. ALSO USE WHEN an nx command fails or you need to check available targets/configuration before running a task. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What depends on library Y?', 'What targets can I run?', 'Cannot find configuration for task', 'debug nx task failure'."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Nx Workspace Exploration
|
|
7
|
+
|
|
8
|
+
This skill provides read-only exploration of Nx workspaces. Use it to understand workspace structure, project configuration, available targets, and dependencies.
|
|
9
|
+
|
|
10
|
+
Run all commands via `pnpm nx` (Hedgehog workspaces are pnpm-only).
|
|
11
|
+
|
|
12
|
+
## Listing Projects
|
|
13
|
+
|
|
14
|
+
Use `pnpm nx show projects` to list projects in the workspace.
|
|
15
|
+
|
|
16
|
+
The project filtering syntax (`-p`/`--projects`) works across many Nx commands including `nx run-many`, `nx release`, `nx show projects`, and more. Filters support explicit names, glob patterns, tag references (e.g. `tag:name`), directories, and negation (e.g. `!project-name`).
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# List all projects
|
|
20
|
+
pnpm nx show projects
|
|
21
|
+
|
|
22
|
+
# Filter by pattern (glob)
|
|
23
|
+
pnpm nx show projects --projects "apps/*"
|
|
24
|
+
pnpm nx show projects --projects "shared-*"
|
|
25
|
+
|
|
26
|
+
# Filter by tag
|
|
27
|
+
pnpm nx show projects --projects "tag:publishable"
|
|
28
|
+
pnpm nx show projects -p 'tag:publishable,!tag:internal'
|
|
29
|
+
|
|
30
|
+
# Filter by target (projects that have a specific target)
|
|
31
|
+
pnpm nx show projects --withTarget build
|
|
32
|
+
|
|
33
|
+
# Combine filters
|
|
34
|
+
pnpm nx show projects --type lib --withTarget test
|
|
35
|
+
pnpm nx show projects --affected --exclude="*-e2e"
|
|
36
|
+
pnpm nx show projects -p "tag:scope:client,packages/*"
|
|
37
|
+
|
|
38
|
+
# Negate patterns
|
|
39
|
+
pnpm nx show projects -p '!tag:private'
|
|
40
|
+
pnpm nx show projects -p '!*-e2e'
|
|
41
|
+
|
|
42
|
+
# Output as JSON
|
|
43
|
+
pnpm nx show projects --json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Project Configuration
|
|
47
|
+
|
|
48
|
+
Use `pnpm nx show project <name> --json` to get the full resolved configuration for a project.
|
|
49
|
+
|
|
50
|
+
**Important**: Do NOT read `project.json` directly - it only contains partial configuration. The `nx show project --json` command returns the full resolved config including inferred targets from plugins.
|
|
51
|
+
|
|
52
|
+
You can read the full project schema at `node_modules/nx/schemas/project-schema.json` to understand nx project configuration options.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Get full project configuration
|
|
56
|
+
pnpm nx show project my-app --json
|
|
57
|
+
|
|
58
|
+
# Extract specific parts from the JSON
|
|
59
|
+
pnpm nx show project my-app --json | jq '.targets'
|
|
60
|
+
pnpm nx show project my-app --json | jq '.targets.build'
|
|
61
|
+
pnpm nx show project my-app --json | jq '.targets | keys'
|
|
62
|
+
|
|
63
|
+
# Check project metadata
|
|
64
|
+
pnpm nx show project my-app --json | jq '{name, root, sourceRoot, projectType, tags}'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Target Information
|
|
68
|
+
|
|
69
|
+
Targets define what tasks can be run on a project.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# List all targets for a project
|
|
73
|
+
pnpm nx show project my-app --json | jq '.targets | keys'
|
|
74
|
+
|
|
75
|
+
# Get full target configuration
|
|
76
|
+
pnpm nx show project my-app --json | jq '.targets.build'
|
|
77
|
+
|
|
78
|
+
# Check target executor/command
|
|
79
|
+
pnpm nx show project my-app --json | jq '.targets.build.executor'
|
|
80
|
+
pnpm nx show project my-app --json | jq '.targets.build.command'
|
|
81
|
+
|
|
82
|
+
# View target options
|
|
83
|
+
pnpm nx show project my-app --json | jq '.targets.build.options'
|
|
84
|
+
|
|
85
|
+
# Check target inputs/outputs (for caching)
|
|
86
|
+
pnpm nx show project my-app --json | jq '.targets.build.inputs'
|
|
87
|
+
pnpm nx show project my-app --json | jq '.targets.build.outputs'
|
|
88
|
+
|
|
89
|
+
# Find projects with a specific target
|
|
90
|
+
pnpm nx show projects --withTarget serve
|
|
91
|
+
pnpm nx show projects --withTarget e2e
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Workspace Configuration
|
|
95
|
+
|
|
96
|
+
Read `nx.json` directly for workspace-level configuration.
|
|
97
|
+
You can read the full project schema at `node_modules/nx/schemas/nx-schema.json` to understand nx project configuration options.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Read the full nx.json
|
|
101
|
+
cat nx.json
|
|
102
|
+
|
|
103
|
+
# Or use jq for specific sections
|
|
104
|
+
cat nx.json | jq '.targetDefaults'
|
|
105
|
+
cat nx.json | jq '.namedInputs'
|
|
106
|
+
cat nx.json | jq '.plugins'
|
|
107
|
+
cat nx.json | jq '.generators'
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Key nx.json sections:
|
|
111
|
+
|
|
112
|
+
- `targetDefaults` - Default configuration applied to all targets of a given name
|
|
113
|
+
- `namedInputs` - Reusable input definitions for caching
|
|
114
|
+
- `plugins` - Nx plugins and their configuration
|
|
115
|
+
|
|
116
|
+
## Affected Projects
|
|
117
|
+
|
|
118
|
+
If the user is asking about affected projects, read the [affected projects reference](references/AFFECTED.md) for detailed commands and examples.
|
|
119
|
+
|
|
120
|
+
## Programmatic Answers
|
|
121
|
+
|
|
122
|
+
When processing nx CLI results, use command-line tools to compute the answer programmatically rather than counting or parsing output manually. Always use `--json` flags to get structured output that can be processed with `jq`, `grep`, or other tools you have installed locally.
|
|
123
|
+
|
|
124
|
+
### Listing Projects ("What's in this workspace?")
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
pnpm nx show projects --json
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Example output:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
["my-app", "my-app-e2e", "shared-ui", "shared-utils", "api"]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Common operations:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Count projects
|
|
140
|
+
pnpm nx show projects --json | jq 'length'
|
|
141
|
+
|
|
142
|
+
# Filter by pattern
|
|
143
|
+
pnpm nx show projects --json | jq '.[] | select(startswith("shared-"))'
|
|
144
|
+
|
|
145
|
+
# Get affected projects as array
|
|
146
|
+
pnpm nx show projects --affected --json | jq '.'
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Project Details ("How do I build/test/lint project X?")
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
pnpm nx show project my-app --json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Example output:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"root": "apps/my-app",
|
|
160
|
+
"name": "my-app",
|
|
161
|
+
"sourceRoot": "apps/my-app/src",
|
|
162
|
+
"projectType": "application",
|
|
163
|
+
"tags": ["type:app", "scope:client"],
|
|
164
|
+
"targets": {
|
|
165
|
+
"build": {
|
|
166
|
+
"executor": "@nx/vite:build",
|
|
167
|
+
"options": { "outputPath": "dist/apps/my-app" }
|
|
168
|
+
},
|
|
169
|
+
"serve": {
|
|
170
|
+
"executor": "@nx/vite:dev-server",
|
|
171
|
+
"options": { "buildTarget": "my-app:build" }
|
|
172
|
+
},
|
|
173
|
+
"test": {
|
|
174
|
+
"executor": "@nx/vite:test",
|
|
175
|
+
"options": {}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"implicitDependencies": []
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Common operations:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# Get target names
|
|
186
|
+
pnpm nx show project my-app --json | jq '.targets | keys'
|
|
187
|
+
|
|
188
|
+
# Get specific target config
|
|
189
|
+
pnpm nx show project my-app --json | jq '.targets.build'
|
|
190
|
+
|
|
191
|
+
# Get tags
|
|
192
|
+
pnpm nx show project my-app --json | jq '.tags'
|
|
193
|
+
|
|
194
|
+
# Get project root
|
|
195
|
+
pnpm nx show project my-app --json | jq -r '.root'
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Project Graph ("What depends on library Y?")
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
pnpm nx graph --print
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Example output:
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"graph": {
|
|
209
|
+
"nodes": {
|
|
210
|
+
"my-app": {
|
|
211
|
+
"name": "my-app",
|
|
212
|
+
"type": "app",
|
|
213
|
+
"data": { "root": "apps/my-app", "tags": ["type:app"] }
|
|
214
|
+
},
|
|
215
|
+
"shared-ui": {
|
|
216
|
+
"name": "shared-ui",
|
|
217
|
+
"type": "lib",
|
|
218
|
+
"data": { "root": "libs/shared-ui", "tags": ["type:ui"] }
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"dependencies": {
|
|
222
|
+
"my-app": [
|
|
223
|
+
{ "source": "my-app", "target": "shared-ui", "type": "static" }
|
|
224
|
+
],
|
|
225
|
+
"shared-ui": []
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Common operations:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# Get all project names from graph
|
|
235
|
+
pnpm nx graph --print | jq '.graph.nodes | keys'
|
|
236
|
+
|
|
237
|
+
# Find dependencies of a project
|
|
238
|
+
pnpm nx graph --print | jq '.graph.dependencies["my-app"]'
|
|
239
|
+
|
|
240
|
+
# Find projects that depend on a library
|
|
241
|
+
pnpm nx graph --print | jq '.graph.dependencies | to_entries[] | select(.value[].target == "shared-ui") | .key'
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Troubleshooting
|
|
245
|
+
|
|
246
|
+
### "Cannot find configuration for task X:target"
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# Check what targets exist on the project
|
|
250
|
+
pnpm nx show project X --json | jq '.targets | keys'
|
|
251
|
+
|
|
252
|
+
# Check if any projects have that target
|
|
253
|
+
pnpm nx show projects --withTarget target
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### "The workspace is out of sync"
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
pnpm nx sync
|
|
260
|
+
pnpm nx reset # if sync doesn't fix stale cache
|
|
261
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
## Affected Projects
|
|
2
|
+
|
|
3
|
+
Find projects affected by changes in the current branch.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# Affected since base branch (auto-detected)
|
|
7
|
+
pnpm nx show projects --affected
|
|
8
|
+
|
|
9
|
+
# Affected with explicit base
|
|
10
|
+
pnpm nx show projects --affected --base=main
|
|
11
|
+
pnpm nx show projects --affected --base=origin/main
|
|
12
|
+
|
|
13
|
+
# Affected between two commits
|
|
14
|
+
pnpm nx show projects --affected --base=abc123 --head=def456
|
|
15
|
+
|
|
16
|
+
# Affected apps only
|
|
17
|
+
pnpm nx show projects --affected --type app
|
|
18
|
+
|
|
19
|
+
# Affected excluding e2e projects
|
|
20
|
+
pnpm nx show projects --affected --exclude="*-e2e"
|
|
21
|
+
|
|
22
|
+
# Affected by uncommitted changes
|
|
23
|
+
pnpm nx show projects --affected --uncommitted
|
|
24
|
+
|
|
25
|
+
# Affected by untracked files
|
|
26
|
+
pnpm nx show projects --affected --untracked
|
|
27
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Attribution
|
|
2
|
+
|
|
3
|
+
This directory vendors the skill shelf from
|
|
4
|
+
[gsap-skills](https://github.com/greensock/gsap-skills) (`greensock/gsap-skills`),
|
|
5
|
+
MIT-licensed. See `LICENSE` in this directory for the full license text.
|
|
6
|
+
|
|
7
|
+
- **Source repo:** https://github.com/greensock/gsap-skills
|
|
8
|
+
- **Vendored from:** `main` branch, commit `aed9cfd3277740755f6bfc1155c7aa645403b760`
|
|
9
|
+
- **Vendored on:** 2026-07-27
|
|
10
|
+
|
|
11
|
+
## What's vendored
|
|
12
|
+
|
|
13
|
+
All eight skills from the source repo's `skills/` directory, plus the
|
|
14
|
+
skill index, unmodified:
|
|
15
|
+
|
|
16
|
+
- `gsap-core`, `gsap-timeline`, `gsap-scrolltrigger`, `gsap-plugins`,
|
|
17
|
+
`gsap-utils`, `gsap-react`, `gsap-performance`, `gsap-frameworks`
|
|
18
|
+
- `llms.txt` (skill index: names, summaries, trigger terms)
|
|
19
|
+
|
|
20
|
+
The source repo's plugin scaffolding (`.claude-plugin/`, `.cursor-plugin/`),
|
|
21
|
+
Copilot instructions (`.github/`), assets, and framework example apps
|
|
22
|
+
(`examples/`) are not vendored — Hedgehog's own agents (`front-end-eng`,
|
|
23
|
+
`ux-planner`) are the entry point into these skills, not a marketplace
|
|
24
|
+
install or per-agent instruction file.
|
|
25
|
+
|
|
26
|
+
## Re-vendoring
|
|
27
|
+
|
|
28
|
+
Pinned deliberately. Re-vendoring against a newer gsap-skills commit is a
|
|
29
|
+
manual act: repeat the fetch against the new ref and update this file's
|
|
30
|
+
pinned commit and date.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GreenSock
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|