flavien-ia/hypervibe-harness/detect-project-root
Claude Code and agent skill by flavien-ia/hypervibe-harness
- community
Checking that the SKILL.md file is still in the repository.
Internal helper to detect the basic structure of the current project (project name, monorepo vs single app, web directory path, Next.js detection). Returns a minimal set of 4 variables that most add-* skills need at the very beginning of their execution. Idempotent and fast. Not meant to be invoked directly by users.
Install
npx vskill@latest install flavien-ia/hypervibe-harness/detect-project-rootSKILL.md
Detect Project Root - Internal helper
Communication
- Detect the user's language from the conversation (the user's own messages, anywhere in the session - not just this invocation: a bare slash command like
/bootstrapcarries no language signal by itself). If nothing in the conversation gives a signal, fall back to the OS locale (node -e "console.log(Intl.DateTimeFormat().resolvedOptions().locale)") before defaulting to English. ALWAYS reply in that language for every user-facing message: questions, progress, confirmations, summaries, errors - including any example text quoted in this skill, which is illustrative and must be translated, never sent verbatim. - Use plain, non-technical business language. Never expose internal script names (*.mjs) or jargon; describe actions in human terms.
- When generating user-facing content for the scaffolded project (UI labels, emails, copy), write it in the user's language too.
- Show progress as a short natural-language checklist (in-progress and done states).
You detect the basic structure of the current project and return a minimal set of variables that the caller can reuse. You work silently, without bothering the user unless the project cannot be detected.
What this helper returns
A 4-variable snapshot:
| Variable | Possible values | Used by | |
|---|---|---|---|
PROJECT_NAME | my-app, hypervibe, etc. | Everything: R2 bucket names, workers, monorepo packages, render.yaml, etc. | |
WEB_DIR | . (single app) or apps/web (monorepo) | add-db, add-cron, add-auth, _create-*-worker | |
IS_MONOREPO | yes / no | add-automation, add-db, _create-cloudflare-worker, _create-render-worker | |
IS_NEXTJS | yes / no | All add-* skills (to refuse if the project is not Next.js) |
This is intentionally minimal. Specific checks like HAS_DB, HAS_AUTH, HAS_RESEND remain inline in the skills that need them - they are contextual and shouldn't pollute every skill's context.
Step 1 - Detect monorepo vs single app
Set IS_MONOREPO accordingly:
monorepo→IS_MONOREPO=yes,WEB_DIR=apps/websingle→IS_MONOREPO=no,WEB_DIR=.
Step 2 - Read the project name
For single app (WEB_DIR=.):
For monorepo (WEB_DIR=apps/web):
- Try the root
package.jsonfirst (Bootstrap's convention is that the root package has the "real" project name):
``bash node -e "process.stdout.write(require('./package.json').name)" ``
- If the root name contains
-monoreposuffix (e.g.hypervibe-monorepo), strip it to get the logical project name. - Fallback: read
apps/web/package.jsonif root is missing.
Set PROJECT_NAME.
Step 3 - Verify Next.js
Replace WEB_DIR with the detected value. If the output is none, set IS_NEXTJS=no. Otherwise IS_NEXTJS=yes.
Step 4 - Sanity check
If PROJECT_NAME is empty or IS_NEXTJS=no:
Tell the user:
I cannot detect a Next.js project in the current folder. Check that:- You are at the root of the project (or inapps/web/ another T3 folder)- Apackage.jsonexists and listsnextas a dependencyIf this is a new project, run/bootstrapfirst.
Then return an error state to the caller (so it can abort).
Step 5 - Return the snapshot
Report to the caller in this exact format so it can parse the values:
Example success output:
The caller reads these 4 lines and uses them throughout its own execution without having to redetect anything.
When to invoke this helper
Every add-* skill should call this in Step 1 (or wherever it currently does test -f package.json), replacing the ad-hoc detection code. The invocation is a single line:
Invoke_detect-project-rootto get PROJECT_NAME, WEB_DIR, IS_MONOREPO, IS_NEXTJS.
The helper is idempotent - calling it multiple times in the same session is fine (it just re-reads the filesystem).
What this helper does NOT detect
These checks remain inline in the skills that need them, because they are contextual and used by only 1-2 skills each:
HAS_REAL_DB- mandatory robust check (used byadd-auth,add-backup-db, and any skill that needs a real cloud DB): (1)DATABASE_URLpresent in.env, AND (2) its value does not point to local and is not a placeholder - reject if the value matches@localhost:/@127\.0\.0\.1:/placeholder///postgres:postgres@/YOUR_DB(bootstrapped T3 projects ship a default likepostgresql://postgres:password@localhost:5432/testthat passes Zod validation but is not wired up), AND (3) adrizzle.config.ts/.jsexists (root,apps/web/, orpackages/db/). NEVER rely ongrep DATABASE_URL .envalone - guaranteed false positives.HAS_AUTH- checksrc/server/auth.ts→ only used byadd-google-auth,add-github-authHAS_RESEND/HAS_BREVO- check API key presence → only used byadd-domainVERCEL_LINKED- check.vercel/project.json→ only used by_setup-github-deploy,add-domain,_push-env-vars
Do not try to add these to _detect-project-root. The helper stays minimal.
Security
- Security scanPassed, 90 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 repositoryCheckingskills/_detect-project-root/SKILL.md
Popularity
- 7-day trend score
- 0
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/flavien-ia/hypervibe-harness/detect-project-root)