agentleFS
placethkplacethk/placet/skills/placet-env-setup/SKILL.md

placet-env-setup

Skill2 starsChanged 2 months agoMITView on GitHub

Auto-configure Node.js environment variables and tool paths. Detect installed node_modules, Python packages, and other common tools so you do not have to confirm tool locations in every conversation.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this Skill for environment detection and configuration before any task that needs to execute scripts or tools.

    line 14
  2. Very specific:

    Only codegraph --version works but build fails → print ⚠️ CodeGraph: CLI available but build failed, follow the large-project degrade …

    line 41
  3. Very specific:

    If the path does not exist, tell the user to run bash install.sh --tools to install the base toolkit

    line 47
  4. Distinctive:

    After detection, print an environment summary:

    line 66
  5. Very specific:

    When running Node.js scripts, use this form:

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Env Auto Setup

Detect and configure environment variables at the start of a conversation, especially Node.js tool paths, so each conversation does not need a manual confirm of tool install status.


Trigger

Run this Skill for environment detection and configuration before any task that needs to execute scripts or tools.

Natural language: environment setup / auto environment setup / environment detect

Command: /placet-env-setup


Execution

Phase 1 - Node.js environment detection

Automatically run these checks:

  1. Detect Node.js version (use node -p process.versions.node to avoid Windows CRLF parse issues)
    node -p "process.versions.node"
  2. Detect CodeGraph (speeds knowledge-base / change-impact analysis)
    source "$FRAMEWORK/scripts/node-detect.sh"
    node_detect_init
    codegraph_installed          # only means CLI --version works
    codegraph_build_works "<target-project-path>"  # actually confirms build works
    • codegraph_build_works succeeds → print ✅ CodeGraph: build available; knowledge-base tasks still MUST go through preflight-kb.sh first; for large projects, build only after user confirmation, then prefer reading .codegraph/
    • Only codegraph --version works but build fails → print ⚠️ CodeGraph: CLI available but build failed, follow the large-project degrade strategy
    • npm ls -g @optave/codegraph has a record but CLI fails → leftover install; need npm uninstall -g @optave/codegraph then reinstall (requires Node >= 22.12.0; on Windows see docs/CodeGraph-install-guide.md)
  3. Detect preinstalled node_modules path
    • Check: $HOME/.claude/tools/node-libs/node_modules
    • Confirm whether common libraries such as docx, mammoth, xlsx, pdf-parse, officeparser are installed
    • If the path does not exist, tell the user to run bash install.sh --tools to install the base toolkit
  4. Set NODE_PATH
    export NODE_PATH="$HOME/.claude/tools/node-libs/node_modules"

Phase 2 - Other common tools

  1. Python environment
    • Detect Python version: python --version or python3 --version
    • Detect pip-installed packages
  2. Other tool detection
    • git version
    • Other CLI tools that may be needed

Phase 3 - Confirm environment configuration

After detection, print an environment summary:

✅ Environment detection complete:
- Node.js: v20.20.0
- CodeGraph: build available / CLI available but build failed / not installed
- NODE_PATH: $HOME/.claude/tools/node-libs/node_modules
- Available libraries: docx, mammoth, xlsx, officeparser, etc.
- Node.js scripts can be run directly; no need to reinstall dependencies

How to use

In a conversation that needs to run scripts, call this Skill first for environment setup, then continue with later tasks.

Note: Environment variable settings are valid only in the current Bash session. Each new tool invocation needs them set again, or prefix the command with the variables.


Recommended execution

When running Node.js scripts, use this form:

NODE_PATH=$HOME/.claude/tools/node-libs/node_modules node your_script.js

Outputs

OutputNotes
Environment detection reportDetected Node.js version, npm, installed-tool list (human-readable text)
Environment variable settingsNODE_PATH / PATH available for this session (current Bash session only)
Tool path recordDetected paths for node_modules, Python packages, and other tools

Writes no persistent files; environment configuration applies to the current session only.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.