スキル一覧に戻る
gruckion

project-detection

by gruckion

9🍴 0📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: project-detection description: Detects project type, package manager, and monorepo structure. Returns correct commands for test/build/lint/dev. Run at project initialization and cache results in state. Use before running any build/test commands.

Project Detection

Detects project configuration and provides standardized commands. Run once at init, cache in state file.

Usage

Run the detection script from the project root:

./marathon-ralph/skills/project-detection/scripts/detect.sh /path/to/project

Returns JSON:

{
  "language": "node",
  "packageManager": "bun",
  "monorepo": {
    "type": "turbo",
    "workspaces": ["apps/web", "apps/api", "packages/shared"]
  },
  "commands": {
    "install": "bun install",
    "dev": "bun run dev",
    "build": "bun run build",
    "test": "bun run test",
    "testWorkspace": "bun run --filter={workspace} test",
    "lint": "bun run lint",
    "typecheck": "bun run check-types"
  }
}

Caching Results

After detection, store in marathon state file under project key:

{
  "project": {
    "language": "node",
    "packageManager": "bun",
    "monorepo": { "type": "turbo", "workspaces": [...] },
    "commands": { ... },
    "detectedAt": "2024-01-03T12:00:00Z"
  }
}

Using Cached Commands

When running commands, always check state first:

  1. Read project.commands from state
  2. If not present, run detection script
  3. Use the appropriate command from the cache

For Monorepos

When tests/builds need to target a specific workspace:

# Use testWorkspace with the workspace name
bun run --filter=web test

# Or for all workspaces
turbo run test

Command Selection Priority

  1. Use cached command from state
  2. If no cache, run detection
  3. If detection fails, fall back to reference patterns

Detection Logic

Package Manager Detection (by lock file)

Lock FilePackage ManagerInstallRun
bun.lock or bun.lockbbunbun installbun run
pnpm-lock.yamlpnpmpnpm installpnpm run
yarn.lockyarnyarn installyarn
package-lock.jsonnpmnpm installnpm run

Monorepo Detection

Config FileMonorepo Type
turbo.jsonTurborepo
nx.jsonNx
lerna.jsonLerna
pnpm-workspace.yamlpnpm workspaces
package.json with workspacesnpm/yarn workspaces

Language Detection

IndicatorLanguage
package.jsonNode.js
pyproject.toml, setup.pyPython
go.modGo
Cargo.tomlRust
build.gradle, pom.xmlJava

Python Project Commands

For Python projects:

ToolInstallRun ScriptTest
poetrypoetry installpoetry run {script}poetry run pytest
poetry+poepoetry installpoe {task}poe test
pip + venvpip install -r requirements.txtpython -m {module}pytest
uvuv pip install -r requirements.txtuv run {script}uv run pytest
pipenvpipenv installpipenv run {script}pipenv run pytest

Note: If [tool.poe.tasks] exists in pyproject.toml, poe commands are preferred.

Reference Files

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です