.claude/skills/ftc-events-api/SKILL.md
Integrate with the official FIRST Tech Challenge Events API in FTC Metrics. Use when fetching events, teams, matches, scores, rankings, or troubleshooting FTC API authentication and responses.
npx skillsauth add ftc8569/ftcmetrics ftc-events-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The FTC Events API provides official data for FIRST Tech Challenge competitions. FTC Metrics uses this to fetch events, teams, match schedules, scores, and rankings.
.env:
FTC_API_USERNAME=your_username
FTC_API_TOKEN=your_token
import { getFTCApi } from "@ftcmetrics/api/lib/ftc-api";
const api = getFTCApi();
// Get all events for current season
const { events } = await api.getEvents();
// Get teams at an event
const { teams } = await api.getEventTeams("USNCCRR");
// Get match scores
const { matchScores } = await api.getScores("USNCCRR", "qual");
| Method | Description |
|--------|-------------|
| getEvents() | List all events for current season |
| getEvent(code) | Get specific event details |
| getEventTeams(code) | Get teams registered at event |
| getTeam(number) | Get team info by number |
| getSchedule(code, level) | Get match schedule |
| getMatches(code, level) | Get match results |
| getScores(code, level) | Get detailed match scores |
| getRankings(code) | Get team rankings at event |
| getTeamEvents(number) | Get events a team is registered for |
"qual" - Qualification matches (default)"playoff" - Elimination matchesinterface FTCEvent {
eventCode: string;
name: string;
venue: string;
city: string;
stateProv: string;
country: string;
dateStart: string;
dateEnd: string;
type: string;
timezone: string;
}
interface FTCMatchScore {
matchLevel: string;
matchNumber: number;
alliances: {
alliance: "Red" | "Blue";
totalPoints: number;
autoPoints: number;
dcPoints: number;
endgamePoints: number;
penaltyPointsCommitted: number;
team1: number;
team2: number;
}[];
}
The API uses HTTP Basic Auth with base64-encoded credentials:
private getAuthHeader(): string {
const credentials = Buffer.from(`${username}:${token}`).toString("base64");
return `Basic ${credentials}`;
}
async function getFullEventData(eventCode: string) {
const api = getFTCApi();
const [eventData, teams, schedule, scores, rankings] = await Promise.all([
api.getEvent(eventCode),
api.getEventTeams(eventCode),
api.getSchedule(eventCode, "qual"),
api.getScores(eventCode, "qual"),
api.getRankings(eventCode),
]);
return { eventData, teams, schedule, scores, rankings };
}
// Matches may not have scores yet (scheduled but not played)
const { matchScores } = await api.getScores(eventCode, "qual");
const completedMatches = matchScores.filter(
(match) => match.alliances[0].totalPoints > 0
);
Ensure FTC_API_USERNAME and FTC_API_TOKEN are set in your .env file.
Credentials are invalid. Verify at https://ftc-events.firstinspires.org/services/API
Event code doesn't exist or season is wrong. Current season is 2025 (DECODE).
The API client is configured for the 2025 DECODE season:
const CURRENT_SEASON = 2025;
development
Configure TypeScript in a Bun/npm workspaces monorepo with shared base config, package-specific overrides, path aliases, and cross-package type sharing. Use when setting up tsconfig files, configuring path aliases, resolving module errors, or sharing types between packages.
development
Tailwind CSS styling for FTC Metrics with official FIRST colors and component patterns. Use when styling React components, creating responsive layouts, or implementing dark mode.
development
Configure and integrate Soketi WebSocket server with FTC Metrics for real-time updates. Use when setting up WebSocket connections, broadcasting scouting data changes, implementing presence channels for team collaboration, or debugging real-time features.
development
Create, structure, and optimize skills for the FTC Metrics project. Use when creating a new skill, improving an existing skill, or needing guidance on skill design patterns, triggers, frontmatter, and progressive disclosure.