Skip to content

teaceo-debug/DEEP6 / .claude/skills/nt8-build-verify

nt8-build-verify

Verified

FileKindSize
README.mdmarkdown13.6 KB
SKILL.mdskill md1.5 KB
fixes/BRACE_MISMATCH.mdmarkdown5.1 KB
fixes/CS0019.mdmarkdown4.7 KB
fixes/CS0101.mdmarkdown4.9 KB
fixes/CS0103.mdmarkdown4.0 KB
fixes/CS0246.mdmarkdown5.4 KB
fixes/CS0535.mdmarkdown3.6 KB
fixes/CS1061.mdmarkdown5.0 KB
fixes/MISSING_ATTRIBUTE.mdmarkdown5.9 KB
knowledge.mdmarkdown3.5 KB
lib/__init__.pyscript0 B
lib/diagnostics.pyscript2.3 KB
lib/nt8_paths.pyscript3.8 KB
scripts/compile_editor.ps1script5.1 KB
scripts/compile_headless.ps1script9.2 KB
scripts/deploy.ps1script2.6 KB
scripts/fix_loop.ps1script19.7 KB
scripts/fix_router.pyscript15.8 KB
scripts/install_indicator.ps1script16.0 KB
scripts/modal_detect.ps1script10.9 KB
scripts/orchestrator.ps1script19.8 KB
scripts/parse_errors.pyscript4.6 KB
scripts/runtime_check.ps1script2.9 KB
scripts/screenshot_chart.ps1script7.5 KB
scripts/verify_visual.pyscript8.0 KB
scripts/workspace_mutator.pyscript17.6 KB

lib/nt8_paths.py

View on GitHub
from __future__ import annotations

import datetime
import glob
import json
import os
from pathlib import Path
import urllib.error
import urllib.request


class NT8Paths:
    def __init__(self) -> None:
        userprofile = os.environ.get("USERPROFILE", r"C:\Users\Tea")
        self.userprofile = userprofile
        self.nt8_root = os.path.join(userprofile, "Documents", "NinjaTrader 8")
        self.custom_source = os.path.join(self.nt8_root, "bin", "Custom")
        self.custom_dll = os.path.join(self.custom_source, "NinjaTrader.Custom.dll")
        self.indicators_dir = os.path.join(self.custom_source, "Indicators")
        self.strategies_dir = os.path.join(self.custom_source, "Strategies")
        self.log_dir = os.path.join(self.nt8_root, "log")
        self.workspaces_dir = os.path.join(self.nt8_root, "workspaces")
        self.install_xml = os.path.join(self.log_dir, "Install.xml")
        self.repo_source = self._detect_repo_source()
        self.ninjascript_exe = r"C:\Program Files\NinjaTrader 8\bin\NinjaScript.exe"

    def _detect_repo_source(self) -> str:
        env_repo = os.environ.get("DEEP6_REPO_ROOT")
        if env_repo:
            return os.path.join(env_repo, "ninjatrader", "Custom")

        here = Path(__file__).resolve()
        repo_root = here.parents[4] if len(here.parents) >= 5 else Path(self.userprofile).parent
        candidate = repo_root / "ninjatrader" / "Custom"
        if candidate.exists() or repo_root.exists():
            return str(candidate)

        return r"C:\Users\Tea\DEEP6\ninjatrader\Custom"

    def _path_map(self) -> dict[str, str]:
        return {
            "nt8_root": self.nt8_root,
            "custom_source": self.custom_source,
            "custom_dll": self.custom_dll,
            "indicators_dir": self.indicators_dir,
            "strategies_dir": self.strategies_dir,
            "log_dir": self.log_dir,
            "workspaces_dir": self.workspaces_dir,
            "install_xml": self.install_xml,
            "repo_source": self.repo_source,
            "ninjascript_exe": self.ninjascript_exe,
        }

    def validate(self) -> dict:
        return {
            name: {"path": path, "exists": os.path.exists(path)}
            for name, path in self._path_map().items()
        }

    def check_devaddon(self) -> bool:
        try:
            with urllib.request.urlopen("http://localhost:19206/health", timeout=2) as response:
                return response.status == 200
        except Exception:
            return False

    def available_compile_paths(self) -> list[str]:
        available = []
        if self.check_devaddon():
            available.append("devaddon_http")
        if os.path.exists(self.ninjascript_exe):
            available.append("ninjascript_exe")
        available.append("editor_uia")
        return available

    def get_latest_log(self) -> str | None:
        log_dir = Path(self.log_dir)
        if not log_dir.exists():
            return None

        today = datetime.datetime.now().strftime("%Y%m%d")
        pattern = os.path.join(self.log_dir, f"log.{today}.*.txt")
        matches = glob.glob(pattern)
        if not matches:
            return None

        latest_path = max(matches, key=lambda p: os.path.getmtime(p))
        return latest_path

    def to_json(self) -> str:
        validation = self.validate()
        report = {
            "message": "NT8 paths detected" if any(item["exists"] for item in validation.values()) else "NT8 not installed or not found",
            "paths": {name: item["path"] for name, item in validation.items()},
            "validation": validation,
            "available_compile_paths": self.available_compile_paths(),
            "latest_log": self.get_latest_log(),
        }
        return json.dumps(report, indent=2)


if __name__ == "__main__":
    paths = NT8Paths()
    print(paths.to_json())
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 197kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall