Skip to content

SepineTam/mcp-for-stata / .claude/skills/mcp-smoke-test

mcp-smoke-test

Verified

Run a local smoke test for the Stata-MCP server.

FileKindSize
SKILL.mdskill md5.7 KB
config/debug.example.tomlconfig1.1 KB
examples.mdmarkdown3.9 KB
scripts/boundary.doother29 B
scripts/cleanup.shexecutablescript865 B
scripts/gen_mock_data.pyscript4.7 KB
scripts/legal.doother90 B
scripts/prepare_smoke_test.shexecutablescript1.6 KB

scripts/prepare_smoke_test.sh

View on GitHub
#!/usr/bin/env bash
#
# Copyright (C) 2026 - Present Sepine Tam, Inc. All Rights Reserved
#
# @Author : Sepine Tam (谭淞)
# @Email  : sepinetam@gmail.com
# @File   : .claude/skills/mcp-smoke-test/scripts/prepare_smoke_test.sh

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../../../../" && pwd)"
SKILL_DIR="${PROJECT_ROOT}/.claude/skills/mcp-smoke-test"

echo "Project root: ${PROJECT_ROOT}"

# Ensure a fresh cache directory for get_data_info.
CACHE_DIR="${PROJECT_ROOT}/.statamcp/stata-mcp-tmp"
if [[ -d "${CACHE_DIR}" ]]; then
    echo "Clearing cached data_info summaries..."
    rm -rf "${CACHE_DIR}/data_info__"*
fi

# Locate a usable auto.dta, preferring the real Stata samples.
AUTO_DTA=""
for candidate in \
    "/Applications/Stata/auto.dta" \
    "/Applications/StataNow/auto.dta" \
    "${PROJECT_ROOT}/tests/fixtures/dataset/auto.dta"; do
    if [[ -f "${candidate}" ]]; then
        AUTO_DTA="${candidate}"
        echo "Found auto.dta: ${AUTO_DTA}"
        break
    fi
done

if [[ -z "${AUTO_DTA}" ]]; then
    echo "No system auto.dta found; generating mock data..."
    cd "${PROJECT_ROOT}"
    uv run "${SKILL_DIR}/scripts/gen_mock_data.py" --output-dir "${PROJECT_ROOT}/tmp" --name auto_mock
    AUTO_DTA="${PROJECT_ROOT}/tmp/auto_mock.dta"
fi

# Copy data and boundary dofile to /tmp for the security boundary test.
echo "Copying test artifacts to /tmp..."
cp "${AUTO_DTA}" /tmp/auto.dta
cp "${SKILL_DIR}/scripts/boundary.do" /tmp/mcp_smoke_test_boundary.do

echo "Smoke test preparation complete."
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall