Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

prompt-templates

БесплатноБез исполняемых скриптовНе проверен

Reusable prompt templates for construction AI tasks: cost estimation, schedule analysis, document processing, BIM queries. Structured prompts for consistent…

datadrivenconstructionот datadrivenconstruction★ 461 звезда на GitHub

Об этом скилле

Prompt Templates for Construction AI

Overview

Structured, reusable prompt templates optimized for construction industry AI tasks. These templates ensure consistent, high-quality outputs for cost estimation, schedule analysis, document processing, and BIM data queries.

Template Framework

Base Template Structure

from dataclasses import dataclass, field
from typing import Dict, Any, List, Optional
from string import Template
import json

@dataclass
class PromptTemplate:
    name: str
    description: str
    template: str
    input_variables: List[str]
    output_format: Optional[str] = None
    examples: List[Dict[str, Any]] = field(default_factory=list)
    category: str = "general"
    version: str = "1.0"

    def format(self, **kwargs) -> str:
        """Format template with provided variables."""
        # Validate all required variables are provided
        missing = [v for v in self.input_variables if v not in kwargs]
        if missing:
            raise ValueError(f"Missing required variables: {missing}")

        # Format template
        prompt = Template(self.template).safe_substitute(**kwargs)

        # Add output format if specified
        if self.output_format:
            prompt += f"\n\nOutput Format:\n{self.output_format}"

        return prompt

    def with_examples(self, n: int = 2) -> str:
        """Return template with few-shot examples."""
        examples_text = ""
        for i, ex in enumerate(self.examples[:n], 1):
            examples_text += f"\nExample {i}:\n"
            examples_text += f"Input: {ex.get('input', '')}\n"
            examples_text += f"Output: {ex.get('output', '')}\n"

        return f"{examples_text}\n{self.template}"


class ConstructionPromptLibrary:
    """Library of construction-specific prompt templates."""

    def __init__(self):
        self.templates: Dict[str, PromptTemplate] = {}
        self._register_defaults()

    def register(self, template: PromptTemplate):
        self.templates[template.name] = template

    def get(self, name: str) -> Optional[PromptTemplate]:
        return self.templates.get(name)

    def list_by_category(self, category: str) -> List[PromptTemplate]:
        return [t for t in self.templates.values() if t.category == category]

    def _register_defaults(self):
        # Register all default templates
        for template in DEFAULT_TEMPLATES:
            self.register(template)

Cost Estimation Templates

Line Item Classification

COST_LINE_ITEM_CLASSIFICATION = PromptTemplate(
    name="cost_line_item_classification",
    description="Classify cost estimate line items to CSI MasterFormat divisions",
    category="cost_estimation",
    input_variables=["line_items"],
    template="""You are a construction cost estimator. Classify each line item to its appropriate CSI MasterFormat division.

Line Items to Classify:
$line_items

For each line item, provide:
1. CSI Division (2-digit)
2. CSI Section (6-digit code)
3. Confidence level (high/medium/low)

Use standard CSI MasterFormat 2020 divisions:
- 03: Concrete
- 04: Masonry
- 05: Metals
- 06: Wood, Plastics, Composites
- 07: Thermal and Moisture Protection
- 08: Openings
- 09: Finishes
- 22: Plumbing
- 23: HVAC
- 26: Electrical
- 31: Earthwork
- 32: Exterior Improvements
- 33: Utilities
""",
    output_format="""JSON array with format:
[
  {
    "line_item": "original description",
    "csi_division": "XX",
    "csi_section": "XX XX XX",
    "csi_title": "Section Title",
    "confidence": "high|medium|low"
  }
]""",
    examples=[
        {
            "input": "4000 PSI concrete for foundations",
            "output": '{"csi_division": "03", "csi_section": "03 30 00", "csi_title": "Cast-in-Place Concrete", "confidence": "high"}'
        }
    ]
)

Unit Cost Validation

COST_UNIT_PRICE_VALIDATION = PromptTemplate(
    name="cost_unit_price_validation",
    description="Validate unit prices against industry standards",
    category="cost_estimation",
    input_variables=["line_items", "location", "year"],
    template="""You are a construction cost analyst. Review these unit prices for reasonableness.

Project Location: $location
Cost Year: $year

Line Items to Review:
$line_items

For each line item:
1. Assess if the unit price is reasonable for the location and year
2. Flag any outliers (too high or too low)
3. Suggest corrections if needed

Consider regional cost factors, labor rates, and material costs for $location.
""",
    output_format="""JSON array:
[
  {
    "line_item": "description",
    "current_unit_cost": 0.00,
    "assessment": "reasonable|high|low",
    "typical_range": {"low": 0.00, "high": 0.00},
    "suggested_unit_cost": 0.00,
    "notes": "explanation"
  }
]"""
)

Estimate Summary Generation

COST_ESTIMATE_SUMMARY = PromptTemplate(
    name="cost_estimate_summary",
    description="Generate executive summary from detailed estimate",
    category="cost_estimation",
Полный SKILL.md на GitHub

Установить prompt-templates в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

claw.jsoninstructions.md

FAQ

Что делает скилл prompt-templates?

Reusable prompt templates for construction AI tasks: cost estimation, schedule analysis, document processing, BIM queries. Structured prompts for consistent results.

Как установить скилл prompt-templates?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл prompt-templates запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить prompt-templates с