Skip to content

op7418/guizang-sports-skill

fit-ride-studio

Unverified

Analyze one or more cycling, running, or hiking FIT/KML activity tracks, generate evidence-based single or aggregate reports, open the bundled local Ride Relief report page when the environment supports it, enrich results with user-confirmed public location context, and create shareable PNG or H.264 MP4 route stories on request. Use whenever a user wants to analyze, compare, visualize, or export .fit or .kml activities, including requests that mention a workout but do not yet include track files.

scripts/check-install.mjs

View on GitHub
#!/usr/bin/env node

import fs from 'node:fs';
import path from 'node:path';
import process from 'node:process';
import { createRequire } from 'node:module';
import { fileURLToPath } from 'node:url';

const skillRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const required = [
  'SKILL.md',
  'agents/openai.yaml',
  'package.json',
  'package-lock.json',
  'index.html',
  'vite.config.js',
  'samples/demo.kml',
  'scripts/analyze-fit.mjs',
  'scripts/check-install.mjs',
  'scripts/check-report-runtime.mjs',
  'scripts/prepare-report.mjs',
  'src/data.js',
  'src/main.js',
  'public/skill-analysis.json',
  'references/export-workflow.md',
  'references/location-enrichment.md',
  'references/report-contract.md',
  'references/ui-report-contract.md',
];
const moduleChecks = [
  '@phosphor-icons/web/regular',
  'exifr',
  'fit-file-parser',
  'h264-mp4-encoder',
  'html-to-image',
  'mediabunny',
  'three',
  'vite',
];
const ignoredDirectories = new Set(['.git', 'dist', 'node_modules', 'outputs', 'work']);

function machineList(values) {
  return values.length ? values.map((value) => encodeURIComponent(value)).join(',') : '-';
}

function nodeIsSupported(version = process.versions.node) {
  const [major, minor] = version.split('.').map(Number);
  return (major === 20 && minor >= 19) || (major === 22 && minor >= 12) || major > 22;
}

function markdownFiles(directory) {
  return fs.readdirSync(directory, { withFileTypes: true }).flatMap((entry) => {
    const absolute = path.join(directory, entry.name);
    if (entry.isDirectory()) return ignoredDirectories.has(entry.name) ? [] : markdownFiles(absolute);
    return entry.isFile() && entry.name.endsWith('.md') ? [absolute] : [];
  });
}

const missingFiles = required.filter((relativePath) => !fs.existsSync(path.join(skillRoot, relativePath)));
const markdown = markdownFiles(skillRoot);
const brokenLinks = [];
for (const markdownPath of markdown) {
  const source = fs.readFileSync(markdownPath, 'utf8');
  for (const match of source.matchAll(/\]\(([^)]+)\)/g)) {
    const target = match[1].trim().split('#')[0];
    if (!target || /^(?:https?:|mailto:)/.test(target)) continue;
    const resolved = path.resolve(path.dirname(markdownPath), decodeURIComponent(target));
    if (!fs.existsSync(resolved)) brokenLinks.push(`${path.relative(skillRoot, markdownPath)}->${target}`);
  }
}

if (missingFiles.length || brokenLinks.length) {
  console.log(`ERROR missing_files=${machineList(missingFiles)} broken_links=${machineList(brokenLinks)}`);
  process.exit(1);
}

if (!nodeIsSupported()) {
  console.log(`UNSUPPORTED_NODE current=${process.versions.node} required=${encodeURIComponent('^20.19.0 || >=22.12.0')}`);
  process.exit(3);
}

const resolveFromRoot = createRequire(path.join(skillRoot, 'package.json'));
const missingModules = moduleChecks.filter((moduleName) => {
  try {
    resolveFromRoot.resolve(moduleName);
    return false;
  } catch {
    return true;
  }
});

if (missingModules.length) {
  console.log(`NEED_INSTALL missing_modules=${machineList(missingModules)}`);
  process.exit(2);
}

console.log(`OK skill=fit-ride-studio required_files=${required.length} markdown_files=${markdown.length} node=${process.versions.node}`);
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: 198kUpdated 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