Xpersona
P

project-init

CLAWHUB · Unverified

Scaffolds new projects with git, CI/CD workflows, pre-commit hooks, and build config Skill: project-init Owner: athola Summary: Scaffolds new projects with git, CI/CD workflows, pre-commit hooks, and build config Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:07:11.181Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:30:27.710Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:47:27.968Z | user Release v1.9.16 v1.9.15 | 2026-07-04T21:21:17.960Z | user Release v1.9.15 v1.9.14 | 2026-06-30T17

62
Rank
84
Safety
1.8k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.8K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-attune-project-init
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-attune-project-init/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

145,485 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: project-init
description: |
  Scaffolds new projects with git, CI/CD workflows, pre-commit hooks, and build config
version: 1.9.8
triggers:
  - starting a new Python
  - Rust
  - or TypeScript project from scratch
metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/attune", "emoji": "\ud83e\udd9e"}}
source: claude-night-market
source_plugin: attune
---

> **Night Market Skill** — ported from [claude-night-market/attune](https://github.com/athola/claude-night-market/tree/master/plugins/attune). For the full experience with agents, hooks, and commands, install the Claude Code plugin.


## Table of Contents

- [Use When](#use-when)
- [Workflow](#workflow)
- [1. Detect or Select Language](#1-detect-or-select-language)
- [2. Collect Project Metadata](#2-collect-project-metadata)
- [3. Review Existing Files](#3-review-existing-files)
- [4. Render and Apply Templates](#4-render-and-apply-templates)
- [5. Initialize Git (if needed)](#5-initialize-git-(if-needed))
- [6. Verify Setup](#6-verify-setup)
- [7. Next Steps](#7-next-steps)
- [Error Handling](#error-handling)
- [Success Criteria](#success-criteria)
- [Examples](#examples)
- [Example 1: New Python Project](#example-1:-new-python-project)


# Project Initialization Skill

Interactive workflow for initializing new software projects with complete development infrastructure.

## Use When

- Starting a new Python, Rust, or TypeScript project
- Updating existing project tooling to current standards
- Need to set up git, GitHub workflows, pre-commit hooks, Makefile
- Want consistent project structure across team
- Converting unstructured project to best practices
- Adding missing configurations to established codebases

## Workflow

### 1. Detect or Select Language

Load `modules/language-detection.md`

- Auto-detect from existing files (pyproject.toml, Cargo.toml, package.json)
- If ambiguous or empty directory, ask user to select
- Validate language is supported (python, rust, typescript)

### 2. Collect Project Metadata

Load `modules/metadata-collection.md`

Gather:
- Project name (default: directory name)
- Author name and email
- Project description
- Language-specific settings:
  - Python: version (default 3.10)
  - Rust: edition (default 2021)
  - TypeScript: framework (React, Vue, etc.)
- License type (MIT, Apache, GPL, etc.)

### 3. Review Existing Files

Check for existing configurations:
```bash
ls -la
```
**Verification:** Run the command with `--help` flag to verify availability.

If files exist (Makefile, .gitignore, etc.):
- Show what would be overwritten
- Ask for confirmation or selective overwrite
- Offer merge mode (preserve custom content)

### 4. Render and Apply Templates

Load `modules/template-rendering.md`

Run initialization script:
```bash
python3 plugins/attune/scripts/attune_init.py \
  --lang {{LANGUAGE}} \
  --name {{PROJECT_NAME}} \
  --author {{AUTHOR}} \
  --email {{EMAIL}} \
  --python-version {{PYTHON_VERSIO

_meta.json

{
  "ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
  "slug": "nm-attune-project-init",
  "version": "1.9.19",
  "publishedAt": 1787749631181
}

modules/language-detection.md

# Language Detection Module

Automatically detect project language or help user choose.

## Detection Strategy

### 1. Check for Language-Specific Files

**Python indicators**:
- `pyproject.toml`
- `setup.py`
- `requirements.txt`
- `Pipfile`

**Rust indicators**:
- `Cargo.toml`
- `Cargo.lock`

**TypeScript indicators**:
- `tsconfig.json`
- `package.json` with TypeScript dependencies

### 2. Scan Source Files

If no config files found, check `src/` directory:

```bash
# Count file types
find src -name "*.py" | wc -l
find src -name "*.rs" | wc -l
find src -name "*.ts" -o -name "*.tsx" | wc -l
```

Language with most files wins.

### 3. Ask User

If still ambiguous:

```
Unable to auto-detect project language.

Please select:
  1. Python
  2. Rust
  3. TypeScript/React

Choice [1-3]:
```

## Implementation

Use `project_detector.py`:

```python
from project_detector import ProjectDetector

detector = ProjectDetector(Path.cwd())
language = detector.detect_language()

if not language:
    # Ask user
    print("Select language:")
    print("  1. Python")
    print("  2. Rust")
    print("  3. TypeScript")
    choice = input("Choice [1-3]: ")
    language = ["python", "rust", "typescript"][int(choice) - 1]
```

## Output

Set language variable for subsequent modules:
- `LANGUAGE` = "python" | "rust" | "typescript"

## Edge Cases

- **Multiple languages detected**: Ask user which is primary
- **No source files**: Default to Python (most common for new projects)
- **Mixed JavaScript/TypeScript**: Prefer TypeScript if tsconfig.json exists

modules/metadata-collection.md

# Metadata Collection Module

Collect project metadata from user or infer from environment.

## Required Metadata

### Universal (All Languages)

1. **Project Name**
   - Default: Current directory name
   - Validation: lowercase, hyphens allowed, no spaces
   - Example: `my-awesome-project`

2. **Author Name**
   - Try to infer from git config: `git config user.name`
   - Fallback: Ask user
   - Example: `Alex Thola`

3. **Author Email**
   - Try to infer from git config: `git config user.email`
   - Fallback: Ask user
   - Example: `alex@example.com`

4. **Project Description**
   - Short one-liner
   - Default: "A new [language] project"
   - Example: `A CLI tool for managing tasks`

5. **License Type**
   - Options: MIT, Apache-2.0, GPL-3.0, BSD-3-Clause
   - Default: MIT
   - Example: `MIT`

### Language-Specific

**Python**:
- `python_version`: Default "3.10"
  - Check installed Python: `python3 --version`
  - Options: 3.10, 3.11, 3.12, 3.13

**Rust**:
- `rust_edition`: Default "2021"
  - Options: 2015, 2018, 2021, 2024

**TypeScript**:
- `framework`: React, Vue, Svelte, None
- `package_manager`: npm, pnpm, yarn

## Inference Strategy

```bash
# Try git config first
AUTHOR=$(git config user.name 2>/dev/null || echo "Your Name")
EMAIL=$(git config user.email 2>/dev/null || echo "you@example.com")

# Try to detect Python version
PYTHON_VERSION=$(python3 --version 2>/dev/null | cut -d' ' -f2 | cut -d'.' -f1,2)
```

## Interactive Prompts

If values can't be inferred:

```
Project Metadata
================

Project name [my-project]:
Author name [Your Name]: Alex Thola
Author email [you@example.com]: alex@example.com
Description: A CLI tool for managing tasks
Python version [3.10]: 3.12
License [MIT]:

Continue with these settings? [Y/n]:
```

## Validation

- **Project name**: Must be valid Python module name (or Rust crate, npm package)
  - Convert spaces to hyphens
  - Lowercase only
  - No special characters except hyphen/underscore

- **Email**: Basic format check (contains @)

- **Python version**: Must be supported (>= 3.10)

## Output Variables

Store in dictionary for template rendering:

```python
metadata = {
    "PROJECT_NAME": "my-awesome-project",
    "PROJECT_MODULE": "my_awesome_project",  # Python module name
    "AUTHOR": "Alex Thola",
    "EMAIL": "alex@example.com",
    "PYTHON_VERSION": "3.12",
    "DESCRIPTION": "A CLI tool for managing tasks",
    "LICENSE": "MIT",
    "YEAR": "2026",
}
```

## Examples

### Example 1: Fully Inferred

```bash
# Git config exists, Python version detected
Inferred project metadata:
  Name: awesome-cli (from directory)
  Author: Alex Thola (from git config)
  Email: alex@example.com (from git config)
  Python: 3.12 (detected)
  License: MIT (default)

Accept these settings? [Y/n]: y
```

### Example 2: Interactive

```bash
# No git config, ask user
Project name [awesome-cli]:
Author name: Alex Thola
Author email: alex@example.com
Description: A CLI tool for managing tasks
Python version [3.1

modules/template-rendering.md

# Template Rendering Module

Render templates with collected metadata and copy to project.

## Template Variables

Available in all templates:

```python
{
    "PROJECT_NAME": "my-awesome-project",       # Project name with hyphens
    "PROJECT_MODULE": "my_awesome_project",     # Python module name (underscores)
    "AUTHOR": "Alex Thola",                     # Author name
    "EMAIL": "alex@example.com",                # Author email
    "PYTHON_VERSION": "3.12",                   # Python version (e.g., "3.12")
    "PYTHON_VERSION_SHORT": "312",              # Short version (e.g., "312")
    "LICENSE": "MIT",                           # License type
    "DESCRIPTION": "A CLI tool",                # Short description
    "YEAR": "2026",                             # Current year
}
```

## Template Syntax

Use simple `{{VARIABLE}}` replacement:

```toml
# pyproject.toml.template
[project]
name = "{{PROJECT_NAME}}"
version = "0.1.0"
description = "{{PROJECT_DESCRIPTION}}"
authors = [
    {name = "{{AUTHOR}}", email = "{{EMAIL}}"}
]
```

## Rendering Process

### 1. Find Templates

```bash
TEMPLATE_DIR="plugins/attune/templates/python"
find "$TEMPLATE_DIR" -name "*.template"
```

### 2. Process Each Template

```python
from template_engine import TemplateEngine

engine = TemplateEngine(variables)

for template_path in template_files:
    # Calculate output path (remove .template extension)
    output_path = str(template_path).replace(".template", "")

    # Render template
    engine.render_file(template_path, output_path)
```

### 3. Handle Conflicts

If output file exists:

```
File exists: pyproject.toml

Options:
  1. Skip (keep existing)
  2. Overwrite (replace with template)
  3. Diff (show differences)
  4. Merge (combine both) [Not implemented yet]

Choice [1-4]:
```

## Safety Checks

### Before Rendering

- ✅ Check output file doesn't exist (unless --force)
- ✅ Validate all template variables are provided
- ✅ Check write permissions on output directory

### During Rendering

- ✅ Create parent directories if needed
- ✅ Log each file created
- ✅ Track success/failure for each template

### After Rendering

- ✅ Verify all expected files created
- ✅ Check file permissions are correct
- ✅ Run basic validation (e.g., `make help`)

## Error Handling

**Template variable missing**:
```python
# In template: {{UNKNOWN_VAR}}
# Result: Leaves {{UNKNOWN_VAR}} unchanged (visible in output)
# Better: Raise error before rendering
```

**Write permission denied**:
```python
try:
    output_path.write_text(rendered)
except PermissionError:
    print(f"✗ Permission denied: {output_path}")
    print("  Try: chmod +w .")
```

**Directory creation fails**:
```python
try:
    output_path.parent.mkdir(parents=True, exist_ok=True)
except OSError as e:
    print(f"✗ Cannot create directory: {e}")
```

## Post-Rendering Actions

### Python Projects

1. **Create source structure**:
   ```python
   src_dir = Path("src") / metadata["PROJECT_MODULE"]
   src_dir.mkdir(

Sponsored

Ads related to project-init and adjacent AI workflows.