Narrow overly-broad pathPatterns in several skill manifests (+ optional test-file guard)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 287
- Forks
- 58
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 17
Description
Summary
Several skills in vercel-plugin auto-trigger on files they shouldn't match, causing spurious skill activations in large monorepos. I've been running a local patch that narrows these patterns and wanted to propose the same narrowing upstream.
Motivation
In a multi-app Next.js monorepo, I've observed the following false-positive triggers:
react-best-practicesfiring on*.test.tsxfiles (tests shouldn't need the same review pass)deployments-cicdfiring on every.github/workflows/*.yml(most workflows aren't deployment-related)vercel-agentfiring on any workflow file withdeployorpreviewin the namevercel-storagefiring on every file undersupabase/**bootstrapfiring on everyREADME*andpackage.jsonnext-upgradefiring on everypackage.jsonworkflowfiring on anything matching*workflow*anywhere in the repo
Suggested skill-manifest.json narrowing
"vercel-agent":
"pathPatterns": [
".github/workflows/vercel*.yml",
- ".github/workflows/vercel*.yaml",
- ".github/workflows/deploy*.yml",
- ".github/workflows/deploy*.yaml",
- ".github/workflows/preview*.yml",
- ".github/workflows/preview*.yaml"
+ ".github/workflows/vercel*.yaml"
]
"deployments-cicd":
"pathPatterns": [
- ".github/workflows/*.yml",
- ".github/workflows/*.yaml",
".gitlab-ci.yml", "bitbucket-pipelines.yml", "vercel.json", "apps/*/vercel.json"
]
"vercel-storage":
"pathPatterns": [
...
- "supabase/**",
"lib/supabase.*", ...
]
"bootstrap":
"pathPatterns": [
".env.example", ".env.sample", ".env.template",
- "README*",
- "docs/**/setup*",
- "package.json",
"drizzle.config.*", ...
]
"workflow":
"pathPatterns": [
"lib/workflow/**", "src/lib/workflow/**",
- "workflows/**",
"lib/workflow.*", "src/lib/workflow.*", "workflow.*",
- "*workflow*",
- "*workflow*/**",
...
]
"next-upgrade":
"pathPatterns": [
- "next.config.*", "package.json"
+ "next.config.*"
]
"next-forge":
"pathPatterns": [
...
- "biome.jsonc", "**/keys.ts", "**/env.ts", "**/proxy.ts"
]
Optional: test-file guard in hooks/src/patterns.mts
A pragmatic addition is a single-line guard that skips path-based matching on test files:
if (filePath && /\.(test|spec)\.[a-zA-Z0-9]+$/.test(filePath)) return null;
Narrow by design — doesn't affect import-based matching, so skills still trigger when a test legitimately imports the framework. A schema-pure alternative would be adding an excludePathPatterns field to each skill manifest. Happy to prototype either.
Known-remaining patterns I didn't touch (flagging for maintainer review)
next-forge.pathPatternscontainspnpm-workspace.yaml— matches any pnpm monorepo, not just next-forge projectsworkflow.importPatternscontains bare'workflow'and'*workflow*'— matches anyfrom "workflow"import
Happy to PR
Let me know the preferred direction (narrowed patterns, test-file guard, schema change, or some combination) and I can open a PR against whichever approach you'd prefer.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with skill-manifest.json and compare the listed pathPatterns against the false-positive cases in the issue. Then read hooks/src/patterns.mts to evaluate the optional test-file guard, and check the existing pattern-matching tests if present. Done means the chosen approach is agreed, the unintended matches are narrowed without breaking intended triggers, and coverage verifies the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100