| name | project-setup |
| description | Set up a new coding project with proper structure, dependencies, and configuration |
Project Setup
When to Use
Use this skill when you need to create a new project from scratch or scaffold a new module within an existing workspace.
Procedure
1. Determine Project Type and Requirements
Read the task description to identify:
- Language/runtime (Node.js, Python, shell, etc.)
- Project type (library, CLI tool, service, script)
- Any specified dependencies or frameworks
2. Create Directory Structure
PROJECT_NAME="my-project"
PROJECT_DIR=~/workspace/$PROJECT_NAME
mkdir -p "$PROJECT_DIR"/{src,tests,config}
cd "$PROJECT_DIR"
For a Node.js project:
mkdir -p "$PROJECT_DIR"/{src,tests,config,scripts}
For a Python project:
mkdir -p "$PROJECT_DIR"/{src/$PROJECT_NAME,tests,config,scripts}
touch "$PROJECT_DIR/src/$PROJECT_NAME/__init__.py"
3. Initialize Package Manager
Node.js:
cd "$PROJECT_DIR"
cat > package.json <<'EOF'
{
"name": "PROJECT_NAME",
"version": "0.1.0",
"description": "",
"main": "src/index.js",
"scripts": {
"start": "node src/index.js",
"test": "node --test tests/"
},
"keywords": [],
"license": "UNLICENSED"
}
EOF
sed -i "s/PROJECT_NAME/$PROJECT_NAME/" package.json
npm install
Python:
cd "$PROJECT_DIR"
cat > pyproject.toml <<EOF
[project]
name = "$PROJECT_NAME"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = []
[project.optional-dependencies]
dev = ["pytest"]
EOF
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
4. Create Initial Files
README.md:
cat > README.md <<EOF
# $PROJECT_NAME
## Overview
Brief description of what this project does.
## Setup
\`\`\`bash
# installation steps
\`\`\`
## Usage
\`\`\`bash
# usage example
\`\`\`
EOF
.gitignore:
cat > .gitignore <<'EOF'
node_modules/
.venv/
__pycache__/
*.pyc
.env
dist/
build/
*.egg-info/
.DS_Store
coverage/
*.log
EOF
Entry point (Node.js):
cat > src/index.js <<'EOF'
"use strict";
function main() {
console.log("Hello from PROJECT_NAME");
}
main();
EOF
chmod +x src/index.js
Entry point (Python):
cat > src/$PROJECT_NAME/main.py <<'EOF'
"""Main entry point."""
def main():
print("Hello from PROJECT_NAME")
if __name__ == "__main__":
main()
EOF
chmod +x src/$PROJECT_NAME/main.py
5. Initialize Git
cd "$PROJECT_DIR"
git init
git add -A
git commit -m "Initial project scaffold for $PROJECT_NAME"
6. Share to Shared Workspace (if needed by other agents)
cp -r "$PROJECT_DIR" /home/shared/
bash /home/shared/scripts/artifact.sh register \
--name "$PROJECT_NAME" \
--type "project" \
--path "/home/shared/$PROJECT_NAME" \
--description "Project scaffold for $PROJECT_NAME"
7. Validate
cd "$PROJECT_DIR"
tree -L 2 --dirsfirst
npm start 2>&1 || python3 -m $PROJECT_NAME 2>&1
npm test 2>&1 || python3 -m pytest tests/ 2>&1
Checklist Before Marking Complete