project-detection_skill

This skill detects project type, package manager, and monorepo layout to provide cached, correct commands for builds, tests, and linting.
  • Shell

13

GitHub Stars

4

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill gruckion/marathon-ralph --skill project-detection

  • monorepo.md3.9 KB
  • node.md2.5 KB
  • python.md3.0 KB
  • SKILL.md4.3 KB

Overview

This skill detects a project's language, package manager, and monorepo structure, then generates standardized commands for install, dev, build, test, lint, and typecheck. It runs once at initialization, caches results in the marathon state, and is intended to be consulted before running any build or test commands. The cached JSON ensures consistent command selection across CI and local workflows.

How this skill works

The detection script inspects repository files (lockfiles, package.json, pyproject.toml, go.mod, Cargo.toml, monorepo config files) to infer language, package manager, and monorepo type. It maps findings to a canonical set of commands (install, run/dev, build, test, lint, typecheck) and returns JSON. Results are written to the marathon state under the project key with a timestamp. The skill is read from state before executing commands and will re-run detection if no cache exists.

When to use it

  • Run at project initialization to create a cached command set.
  • Before any build, test, lint, or dev task to ensure correct commands are used.
  • In CI pipeline setup to pick the right install and run commands for each job.
  • When onboarding to a new repo or switching branches that may change project layout.
  • Before running workspace-targeted operations in monorepos.

Best practices

  • Always read project.commands from state and only re-run detection when the cache is missing or stale.
  • Commit or persist the state file where CI and local tooling can access it to avoid repeated detection overhead.
  • Prefer workspace-targeted commands (testWorkspace) for monorepos to limit scope and speed up runs.
  • Fallback to reference patterns only if detection fails; surface detection failures to the user for corrective action.
  • Update detection logic if you add new package managers or monorepo tools to the repo.

Example use cases

  • Detect package manager (bun/pnpm/yarn/npm) and return the exact install and run commands for local development.
  • Identify a Turborepo and produce workspace-aware test/build commands like turbo run test or filtered runner commands.
  • Detect a Python project using poetry or poe and return poetry install + poe test when appropriate.
  • Cache commands after first run so CI jobs read the same commands without re-detection.
  • Select pnpm workspace commands when pnpm-workspace.yaml or package.json workspaces are present.

FAQ

If detection is wrong, update or delete the cached project entry so the script can re-run; the skill falls back to reference patterns if detection fails.

How does the skill handle monorepos?

It detects monorepo type (turborepo, nx, lerna, pnpm workspaces, npm/yarn workspaces) and exposes workspace-aware commands and a testWorkspace template for targeted operations.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational